# Maximum a posteriori

##### New member
Here's the problem:

Suppose that Carl wants to estimate the proportion of books that he likes, denoted by 𝜃. He modeled
𝜃 as a probability distribution given in the following table. In the year 2019, he likes 17 books out of a
total of 20 books that he read. Using this information, determine 𝜃̂ using Maximum a Posteriori method.
_____________
𝜃 | 0.8 | 0.9 |
𝑝(𝜃 )| 0.6 |0.4 |
_____________

My attempt at a solution:
I know I have to use Bayes theorem to solve this, so the equation is:
f(𝜃 |x) = (f(𝜃 )f(x|𝜃 ))/f(x).

So next, I have to find f(𝜃 ) and f(x|𝜃 ) and realize that f(x) is the marginal pdf of x - which I can solve by
integrating f(𝜃 )f(x|𝜃 )d𝜃

However, I'm stuck on the first step as I'm not entirely sure how to express the data on the table as the pdf f(𝜃 ) and the conditional probability f(x|𝜃 ).
While I can reasonably attempt the math, I would like help translating the words of this problem into actual equations that I can use to solve the problem. Thank you