document.write( "Question 1209944: A coin has a probability 𝑝 of landing heads. It is flipped 10 times, resulting in 8 heads. Using Bayesian inference with the following prior information
\n" ); document.write( "(a) No prior knowledge about 𝑝.
\n" ); document.write( "(b) The coin is likely fair (𝑝 around 0.5).
\n" ); document.write( "(c) The coin is likely biased (𝑝 around 0 or 1).
\n" ); document.write( "(d) 𝑝 can only take one of three values: 0.2, 0.7, or 0.9.
\n" ); document.write( "(e) 𝑝 is restricted to the range 0.4 ≤ 𝑝 ≤ 0.9.
\n" ); document.write( ", answer the following questions:
\n" ); document.write( "(1) What is the estimated value of 𝑝?
\n" ); document.write( "(2) Is 𝑝 greater than 0.6?
\n" ); document.write( "The solution provided by @CPhill is completely incorrect.
\n" ); document.write( "

Algebra.Com's Answer #851148 by ElectricPavlov(122)\"\" \"About 
You can put this solution on YOUR website!
Let's break down each case using Bayesian inference:\r
\n" ); document.write( "\n" ); document.write( "**Likelihood:**
\n" ); document.write( "The likelihood of observing 8 heads in 10 flips is given by the binomial distribution:
\n" ); document.write( "$$L(p|X=8) = \binom{10}{8} p^8 (1-p)^2 = 45 p^8 (1-p)^2$$\r
\n" ); document.write( "\n" ); document.write( "**(a) No prior knowledge about 𝑝.**
\n" ); document.write( "* **Prior:** Uniform distribution over [0, 1], i.e., $P(p) \propto 1$.
\n" ); document.write( "* **Posterior:** $P(p|X=8) \propto L(p|X=8) \times P(p) \propto p^8 (1-p)^2$.
\n" ); document.write( "* **Estimated 𝑝:** To find the maximum, we differentiate and set to zero:
\n" ); document.write( " * $\frac{d}{dp} [p^8 (1-p)^2] = 0$
\n" ); document.write( " * This leads to $p = 8/10 = 0.8$.
\n" ); document.write( "* **(1) Estimated 𝑝 = 0.8**
\n" ); document.write( "* **(2) Yes, 𝑝 > 0.6**\r
\n" ); document.write( "\n" ); document.write( "**(b) The coin is likely fair (𝑝 around 0.5).**
\n" ); document.write( "* **Prior:** Beta distribution centered around 0.5, e.g., Beta(5, 5), so $P(p) \propto p^4(1-p)^4$.
\n" ); document.write( " * For the sake of simplicity I will use Beta(6,6), which is also centered at 0.5.
\n" ); document.write( "* **Posterior:** $P(p|X=8) \propto p^8 (1-p)^2 \times p^5 (1-p)^5 = p^{13} (1-p)^7$.
\n" ); document.write( "* **Estimated 𝑝:** Differentiate and set to zero:
\n" ); document.write( " * $\frac{d}{dp} [p^{13} (1-p)^7] = 0$
\n" ); document.write( " * This leads to $p = 13/20 = 0.65$.
\n" ); document.write( "* **(1) Estimated 𝑝 = 0.65**
\n" ); document.write( "* **(2) Yes, 𝑝 > 0.6**\r
\n" ); document.write( "\n" ); document.write( "**(c) The coin is likely biased (𝑝 around 0 or 1).**
\n" ); document.write( "* **Prior:** Beta distribution biased towards 0 or 1, e.g., Beta(9, 1). So $P(p) \propto p^8(1-p)^0$.
\n" ); document.write( "* **Posterior** $P(p|X=8) \propto p^8(1-p)^2 * p^8 = p^{16}(1-p)^2$.
\n" ); document.write( "* **Estimated p**
\n" ); document.write( " * $\frac{d}{dp}(p^{16}(1-p)^2) = 16p^{15}(1-p)^2-2p^{16}(1-p) = 0$
\n" ); document.write( " * $16(1-p)-2p = 0$
\n" ); document.write( " * $16-18p = 0$
\n" ); document.write( " * $p= 16/18 = 8/9 \approx 0.888$.
\n" ); document.write( "* **(1) Estimated 𝑝 ≈ 0.888**
\n" ); document.write( "* **(2) Yes, 𝑝 > 0.6**\r
\n" ); document.write( "\n" ); document.write( "**(d) 𝑝 can only take one of three values: 0.2, 0.7, or 0.9.**
\n" ); document.write( "* **Prior:** We assume a uniform prior, i.e., each value has equal probability.
\n" ); document.write( "* **Posterior:** Calculate the likelihood for each value:
\n" ); document.write( " * $L(0.2) = 45 (0.2)^8 (0.8)^2 \approx 1.15 \times 10^{-5}$
\n" ); document.write( " * $L(0.7) = 45 (0.7)^8 (0.3)^2 \approx 0.0307$
\n" ); document.write( " * $L(0.9) = 45 (0.9)^8 (0.1)^2 \approx 0.0194$
\n" ); document.write( "* **Estimated 𝑝:** The value with the highest likelihood is 0.7.
\n" ); document.write( "* **(1) Estimated 𝑝 = 0.7**
\n" ); document.write( "* **(2) Yes, 𝑝 > 0.6**\r
\n" ); document.write( "\n" ); document.write( "**(e) 𝑝 is restricted to the range 0.4 ≤ 𝑝 ≤ 0.9.**
\n" ); document.write( "* **Prior:** Uniform distribution over [0.4, 0.9].
\n" ); document.write( "* **Posterior:** $P(p|X=8) \propto p^8 (1-p)^2$ within the range [0.4, 0.9].
\n" ); document.write( "* **Estimated 𝑝:** From (a), the maximum likelihood occurs at 0.8, which is within the range.
\n" ); document.write( "* **(1) Estimated 𝑝 = 0.8**
\n" ); document.write( "* **(2) Yes, 𝑝 > 0.6**\r
\n" ); document.write( "\n" ); document.write( "**Summary:**\r
\n" ); document.write( "\n" ); document.write( "* **(a) 𝑝 = 0.8, Yes**
\n" ); document.write( "* **(b) 𝑝 = 0.65, Yes**
\n" ); document.write( "* **(c) 𝑝 ≈ 0.888, Yes**
\n" ); document.write( "* **(d) 𝑝 = 0.7, Yes**
\n" ); document.write( "* **(e) 𝑝 = 0.8, Yes**
\n" ); document.write( "
\n" ); document.write( "
\n" );