<s>[INST] Why does the beta distribution become U shaped when $\alpha$ and $\beta$ <1? In the Beta distribution (used to model Bernoulli probabilities), the $\alpha$ and $\beta$ parameters can be interpreted as the number of heads$+1$ and the number of tails$+1$ seen. So, if they were both $2$, it would lean towards the coin being fair and have a maximum at $0.5$. If they are both $20$, the distribution would become even surer we're dealing with a fair coin and peak even more at $p=0.5$.
What I don't get is its behavior when $\alpha$ and $\beta$ both become $<1$. 
In that case, it becomes U-shaped and the density peaks at $p=0$ and $p=1$. Meaning the coin is likely to be two-sided. I know there is an intuition for this since I think I had an idea about it a long time ago. However, I've been trying to recollect all day and can't piece it together. Does anyone have an intuition? 
 [/INST] The Beta distribution is
$\dfrac{x^{a-1}(1-x)^{b-1}}{B(a, b)}
$
so the shape depends only on
$f(x)
=x^{a-1}(1-x)^{b-1}
$.
$f'(x)
=(a - 1) x^{a - 2} (1 - x)^{b - 1} - (b - 1) x^{a - 1} (1 - x)^{b - 2}\\
=x^{a - 2} (1 - x)^{b - 2}((a - 1)  (1 - x) - (b - 1) x)
$
so $f'(x) = 0$
when
$(a - 1)  (1 - x) 
= (b - 1) x
$
or
$a-1
=x(b-1+a-1)
=x(a+b-2)
$
or
$x
=\dfrac{a-1}{a+b-2}
$.
Note that
$1-x
=\dfrac{b-1}{a+b-2}
$.
$\begin{array}\\
f''(x)
&=x^{a - 3} (1 - x)^{b - 3} ( x^2 (a + b - 3) (a + b - 2) - 2 (a - 1)  (a + b - 3)x+a^2 - 3 a + 2)\\
&=x^{a - 3} (1 - x)^{b - 3} ( x^2 (a + b - 3) (a + b - 2) - 2 (a - 1)  (a + b - 3)x+(a-1)(a-2))\\
&=x^{a - 3} (1 - x)^{b - 3} g(x)\\
\end{array}
$
where
$g(x)
= x^2 (a + b - 3) (a + b - 2) - 2 (a - 1)  (a + b - 3)x+(a-1)(a-2)
$
(according to Wolfy).
If $a < 1$ and $b < 1$
then
$(a + b - 3) (a + b - 2)
\gt 0
$
so g(x) is u-shaped
and
$x^{a - 3} (1 - x)^{b - 3}
$
is u-shaped,
so their product
is u-shaped.
$g(0) 
=(a-1)(a-2)
\gt 0$
and
$g(1)
=(b-1)(b-2)
\gt 0
$.
Also, 
the discriminant of $g(x)$ is
$\begin{array}\\
d
&=(2 (a - 1)  (a + b - 3))^2
-4(a-1)(a-2)(a + b - 3) (a + b - 2)\\
&=4(a-1)(a+b-3)( (a - 1)  (a + b - 3)
-(a-2) (a + b - 2))\\
&=4(a-1)(a+b-3)( (a - 1)  (a + b - 3)
-(a-2) (a + b - 2))\\
&=4(a-1)(a+b-3)(b-1)
\qquad\text{(quite surprisingly, to me}\\
\end{array}
$
If $a < 1$ and $b < 1$
then $d < 0$
(since all three terms
are negative),
so $g(x)$
has no real roots
so is always positive.
</s>