Tom K. answered 05/31/21
Knowledgeable and Friendly Math and Statistics Tutor
The prior is f(θ) = 1 0 <= θ <= 1
Then
With continuous distributions, f(θ|x) = f(x|θ)f(θ)/ I(-∞,∞)f(θ) f(x|θ)dθ
This is actually the negative binomial. The probability that 10 items were tested to get 4 failures is
C(9,3)θ4(1-θ)10-4 = C(9,3)θ4(1-θ)6
Then, we have
f(θ|x) = f(x|θ)f(θ)/ I(-∞,∞)f(θ) f(x|θ)dθ =
C(9,3)θ4(1-θ)6 /I[0,1]C(9,3)θ4(1-θ)6 dθ =
θ4(1-θ)6 /I[0,1]θ4(1-θ)6 dθ
We can solve this either by integrating the denominator (integration by parts 4 times) or noting that the distribution will be
Cθ4(1-θ)6 from 0 to 1, which is B(4+1, 6+1) = B(5, 7)
C = Γ(5 + 7)/(Γ(5)Γ(7)) = 11!/(4!6!) = 11 * C(10,4) = 11 * 210 = 2310
f(θ|x) = Γ(5 + 7)/(Γ(5)Γ(7)) = 2310 θ4(1-θ)6 or simply f(θ|x) ~ B(5,7)