document.write( "Question 1209943: 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( "
Algebra.Com's Answer #851144 by CPhill(1959)![]() ![]() You can put this solution on YOUR website! Let's break down this problem using Bayesian inference for each prior.\r \n" ); document.write( "\n" ); document.write( "**1. Likelihood Function**\r \n" ); document.write( "\n" ); document.write( "The likelihood function is the probability of observing 8 heads in 10 flips given a probability $p$ of heads. This follows a binomial distribution:\r \n" ); document.write( "\n" ); document.write( "$L(p) = \binom{10}{8} p^8 (1-p)^2 = 45 p^8 (1-p)^2$\r \n" ); document.write( "\n" ); document.write( "**2. Bayesian Inference**\r \n" ); document.write( "\n" ); document.write( "Bayesian inference combines the likelihood function with a prior distribution to obtain a posterior distribution.\r \n" ); document.write( "\n" ); document.write( "**a) No Prior Knowledge (Uniform Prior)**\r \n" ); document.write( "\n" ); document.write( "* Prior: $P(p) = 1$ for $0 \le p \le 1$ (uniform distribution) \n" ); document.write( "* Posterior: $P(p | \text{data}) \propto L(p) P(p) = 45 p^8 (1-p)^2$ \n" ); document.write( "* To find the estimated value of $p$, we need to find the maximum of the posterior. This is equivalent to maximizing the likelihood since the prior is uniform. \n" ); document.write( "* To find the maximum, we take the derivative of $L(p)$ and set it to 0: \n" ); document.write( " * $L'(p) = 45 (8 p^7 (1-p)^2 - 2 p^8 (1-p)) = 0$ \n" ); document.write( " * $8 (1-p) - 2 p = 0$ \n" ); document.write( " * $8 - 8p - 2p = 0$ \n" ); document.write( " * $10p = 8$ \n" ); document.write( " * $p = 0.8$\r \n" ); document.write( "\n" ); document.write( "* (1) Estimated $p = 0.8$ \n" ); document.write( "* (2) Yes, $p > 0.6$\r \n" ); document.write( "\n" ); document.write( "**b) Coin is Likely Fair (Prior around 0.5)**\r \n" ); document.write( "\n" ); document.write( "* Prior: A beta distribution centered around 0.5. Let's use $\text{Beta}(5, 5)$, for example. \n" ); document.write( " * $P(p) \propto p^4 (1-p)^4$ \n" ); document.write( "* Posterior: $P(p | \text{data}) \propto p^8 (1-p)^2 \cdot p^4 (1-p)^4 = p^{12} (1-p)^6$ \n" ); document.write( "* Maximize the posterior: \n" ); document.write( " * $12 (1-p) - 6 p = 0$ \n" ); document.write( " * $12 - 12p - 6p = 0$ \n" ); document.write( " * $18p = 12$ \n" ); document.write( " * $p = 2/3 \approx 0.667$\r \n" ); document.write( "\n" ); document.write( "* (1) Estimated $p \approx 0.667$ \n" ); document.write( "* (2) Yes, $p > 0.6$\r \n" ); document.write( "\n" ); document.write( "**c) Coin is Likely Biased (Prior around 0 or 1)**\r \n" ); document.write( "\n" ); document.write( "* Prior: A beta distribution centered around 0 or 1. Let's use $\text{Beta}(8, 2)$, for example. \n" ); document.write( " * $P(p) \propto p^7 (1-p)^1$ \n" ); document.write( "* Posterior: $P(p | \text{data}) \propto p^8 (1-p)^2 \cdot p^7 (1-p)^1 = p^{15} (1-p)^3$ \n" ); document.write( "* Maximize the posterior: \n" ); document.write( " * $15 (1-p) - 3 p = 0$ \n" ); document.write( " * $15 - 15p - 3p = 0$ \n" ); document.write( " * $18p = 15$ \n" ); document.write( " * $p = 5/6 \approx 0.833$\r \n" ); document.write( "\n" ); document.write( "* (1) Estimated $p \approx 0.833$ \n" ); document.write( "* (2) Yes, $p > 0.6$\r \n" ); document.write( "\n" ); document.write( "**d) 𝑝 can only take values 0.2, 0.7, or 0.9**\r \n" ); document.write( "\n" ); document.write( "* Prior: We need to assign probabilities to each value. Let's assume equal prior probabilities: $P(0.2) = P(0.7) = P(0.9) = 1/3$. \n" ); document.write( "* Likelihoods: \n" ); document.write( " * $L(0.2) = 45 (0.2)^8 (0.8)^2 \approx 0.000046$ \n" ); document.write( " * $L(0.7) = 45 (0.7)^8 (0.3)^2 \approx 0.19$ \n" ); document.write( " * $L(0.9) = 45 (0.9)^8 (0.1)^2 \approx 0.196$ \n" ); document.write( "* Posterior (proportional to likelihood since prior is uniform): \n" ); document.write( " * $P(0.2 | \text{data}) \propto 0.000046$ \n" ); document.write( " * $P(0.7 | \text{data}) \propto 0.19$ \n" ); document.write( " * $P(0.9 | \text{data}) \propto 0.196$ \n" ); document.write( "* The highest posterior is for $p = 0.9$.\r \n" ); document.write( "\n" ); document.write( "* (1) Estimated $p = 0.9$ \n" ); document.write( "* (2) Yes, $p > 0.6$\r \n" ); document.write( "\n" ); document.write( "**e) 0.4 ≤ 𝑝 ≤ 0.9**\r \n" ); document.write( "\n" ); document.write( "* Prior: A uniform distribution on the interval $[0.4, 0.9]$. \n" ); document.write( " * $P(p) \propto 1$ for $0.4 \le p \le 0.9$, and $0$ elsewhere. \n" ); document.write( "* Posterior: $P(p | \text{data}) \propto p^8 (1-p)^2$ for $0.4 \le p \le 0.9$, and $0$ elsewhere. \n" ); document.write( "* The maximum of $p^8 (1-p)^2$ occurs at $p = 0.8$, which is within the range $[0.4, 0.9]$.\r \n" ); document.write( "\n" ); document.write( "* (1) Estimated $p = 0.8$ \n" ); document.write( "* (2) Yes, $p > 0.6$\r \n" ); document.write( "\n" ); document.write( "**Summary**\r \n" ); document.write( "\n" ); document.write( "In all cases, the estimated value of $p$ is greater than 0.6. The exact value of $p$ varies depending on the prior information, but it is always in the range of 0.667 to 0.9. \n" ); document.write( " \n" ); document.write( " |