Posterior and MAP for a Coin With a Uniform Prior

Reported in interviews at Squarepoint Capital

Problem statement

You flip a coin 30 times and observe 18 heads and 12 tails. With a uniform prior on its heads probability $p$, what is the Maximum A Posteriori (MAP) estimate of $p$?

Show hint

Which named family of distributions on $[0,1]$ includes the uniform as a special case and pairs naturally with a coin-flip likelihood?

Relevant roles: Data Scientist, Applied Scientist, ML Engineer and Research Scientist.

Related free problems