# Estimate parameters of unimodal beta distribution from sample data?

I would like to parameterize a unimodal beta distribution from samples of a Bernoulli random variable. I'd strongly prefer a method that simply defines $\alpha$ and $\beta$ analytically as functions of the sample mean and variance or sample quantiles, rather than an iterative method. Everything I've found on the method of moments results in u-shaped (bi-modal) parameterizations, i.e. $\alpha < 1$ and $\beta < 1$. My attempts to solve the system of equations has run into the algebraic weeds. What is the right way to do this? It seems that there should be a way via sample quantiles (see this thesis, this question, and this one).

• Can you clarify your situation? Why are you trying to do this? What does it mean to "parameterize a unimodal beta distribution from samples of a Bernoulli random variable"? Is this something like an empirical Bayesian approach, & you want to determine what the prior should be based on a different dataset? Commented Apr 5, 2017 at 21:25
• There is only one specific value for the parameters $\alpha$ and $\beta$ that makes the beta unimodal with the mode at 1/2. Commented Apr 5, 2017 at 21:29
• @MichaelChernick - I would have thought all values of $\alpha=\beta\gt 1$ would make the Beta distribution unimodal with a mode at $\frac12$ Commented Apr 5, 2017 at 21:32
• I assume you are looking for a conjugate prior for the probability parameter of your Bernouilli random variable. If your sample of the Bernoulli random variable produces $x$ successes out of $n$ attempts, then $\alpha= x+k$ and $\beta=n-x+k$ might be an option for some non-negative constant $k$. If $k\ge 1$ or both $x \ge 1$ and $n-x \ge 1$ then this will be unimodal (strictly unimodal if the inequalities are also strict) Commented Apr 5, 2017 at 21:37
• @MichaelChernick all parameterizations for which $\alpha = \beta$ are symmetric about 1/2. With that constraint, for $\alpha > 1, \beta > 1$ there is a single mode at 1/2. As the parameters approach 1 dispersion increases until the mode disapears at $\alpha = \beta = 1$. Commented Apr 5, 2017 at 21:58

I assume you are looking for a conjugate prior for the probability parameter of your Bernoulli random variable. If your sample of the Bernoulli random variable produces $x$ successes out of $n$ attempts, then $α=x+c$ and $β=n−x+k$ might be an option for some non-negative constants $c$ and $k$. Unless you have other prior information, it would be natural to take $c=k$
So long as at least one of $\alpha$ and $\beta$ is greater than or equal to $1$, you will have unimodal distribution (though uniform if $\alpha=\beta=1$, and a distribution concentrated on a single point if $\alpha$ or $\beta$ is $0$). So your posterior distribution after at least one sample will be unimodal no matter what $c$ and $k$ you choose; if you want the prior distribution to be unimodal too and symmetric, then choose $c=k\gt 1$.
For other people less worried about the shape of the prior distribution, common choices which have some sort of "uniformative" rationalisation are $c=k=0$ (giving $\alpha=x$ and $\beta=n-x$ so an unbiased posterior expected value of $\frac{x}n$), $c=k=\frac12$ (the Jeffreys prior) or $c=k=1$ (the uniform prior)