SOLUTION: 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 (a) No prior knowledge

Algebra.Com
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
(a) No prior knowledge about 𝑝.
(b) The coin is likely fair (𝑝 around 0.5).
(c) The coin is likely biased (𝑝 around 0 or 1).
(d) 𝑝 can only take one of three values: 0.2, 0.7, or 0.9.
(e) 𝑝 is restricted to the range 0.4 ≤ 𝑝 ≤ 0.9.
, answer the following questions:
(1) What is the estimated value of 𝑝?
(2) Is 𝑝 greater than 0.6?

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

RELATED QUESTIONS

A coin has a probability 𝑝 of landing heads. It is flipped 10 times, resulting in 8... (answered by ElectricPavlov)
A fair coin is flipped ten times. What is the probability of the coin landing heads up... (answered by mathmate)
An unfair coin has a probability 0.6 of landing heads. The coin is tossed four times.... (answered by jim_thompson5910)
An unfair coin has a probability 𝑝 = 0.13 of landing on heads when flipped.... (answered by stanbon)
a biased coin has 1 in 10 chance of landing heads. If tossed 400 times, what is the... (answered by stanbon,Theo)
If a coin is flipped two times, what is the probability of the coin landing on HEADS at... (answered by Edwin McCravy)
A fair coin is flipped 10 times. Find the probability of the occurrence of 5 or 6... (answered by mathmate)
You flip a coin three times. What is the probability of it landing on heads on the third... (answered by Fombitz)
A coin is flipped 8 times. Find the probability of flipping exactly 6 heads and 2... (answered by stanbon)