# Math Help - Beta Distribution Proof

1. ## Beta Distribution Proof

The probability p of an event is supposed to have a prior distribution
Beta(a,B) so that its prior density is

f(p) = [B(α, β)]^-1 p^(α-1) (1-p)^(β-1)

Show that for any constant d,
E[p(1-p)(p-d)2] is minimised wwhen d = (α+1) / (α+β+2)

_____

So far iv got

E[p(1-p)(p-d)2] = ∫ p(1-p)(p-d)2 f(p) dp

= ∫ [B(α, β)]^-1 p^α (1-p)^β (p-d)^2 dp

= [B(α, β)]^-1 ∫ p^α (1-p)^β (p-d)^2 dp

Any help will be appreciated
Thanks a lot

2. Originally Posted by gethin08
The probability p of an event is supposed to have a prior distribution
Beta(a,B) so that its prior density is

f(p) = [B(α, β)]^-1 p^(α-1) (1-p)^(β-1)

Show that for any constant d,
E[p(1-p)(p-d)2] is minimised wwhen d = (α+1) / (α+β+2)

_____

So far iv got

E[p(1-p)(p-d)2] = ∫ p(1-p)(p-d)2 f(p) dp

= ∫ [B(α, β)]^-1 p^α (1-p)^β (p-d)^2 dp

= [B(α, β)]^-1 ∫ p^α (1-p)^β (p-d)^2 dp

Any help will be appreciated
Thanks a lot
Expand $(p -d)^2$ and re-arrange the integral into:

$\frac{1}{B(\alpha, \beta)} \left[ \int_0^1 p^{\alpha + 2} (1 - p)^{\beta} \, dp - 2 d \int_0^1 p^{\alpha + 1} (1 - p)^{\beta} \, dp + d^2 \int_0^1 p^{\alpha} (1 - p)^{\beta} \, dp\right]$.

Evaluate each integral using the formula here: Beta Integral -- from Wolfram MathWorld

Simplify the resulting expression using the formula here: Beta Function -- from Wolfram MathWorld

You now have a simple quadratic function in d. Find the value of d that minimises this quadratic.

3. Thanks alot
Been stuck on that one for a few days
Much appreciated

4. Sorry I thought I got this but im not getting the right answer...

If I expand

[B(α, β)]^-1 . ∫ p^(α+2) (1-p)^β dp -2d . ∫ p^(α+1) (1-p)^β dp +d^2 . ∫ p^α (1-p)^β dp

I get

[B(α, β)]^-1 . [B(α+3, β+1) - 2d] . [B(α+2, β+1) + d^2] . B(α+1, β+1)

I can substitue for the gamma function and the factorial function but they dont seem to cancel and lead to d = (α+1) / (α+β+2)

Can you explain to me where to go from here

Thanks alot

5. Originally Posted by gethin08
Sorry I thought I got this but im not getting the right answer...

If I expand

[B(α, β)]^-1 . ∫ p^(α+2) (1-p)^β dp -2d . ∫ p^(α+1) (1-p)^β dp +d^2 . ∫ p^α (1-p)^β dp

I get

[B(α, β)]^-1 . [B(α+3, β+1) - 2d] . [B(α+2, β+1) + d^2] . B(α+1, β+1)

I can substitue for the gamma function and the factorial function but they dont seem to cancel and lead to d = (α+1) / (α+β+2)

Can you explain to me where to go from here

Thanks alot
Please go back and look at the expression I posted. At a glance, it does not look to me like you've done the basic calculation properly.

6. aw rite im with you
i read you expression the wrong way
got the right answer now though
thanks again