# Finding the probability of fair coin [closed]

A hat contains 100 coins, where at least 99 are fair, but there may be one that is double-headed (always landing Heads); if there is no such coin, then all 100 are fair.

Let D be the event that there is such a coin, and suppose that P (D) = 1/2. A coin is chosen uniformly at random. The chosen coin is flipped 7 times, and it lands Heads all 7 times.

(a) Given this information, what is the probability that one of the coins is double-headed?

(b) Given this information, what is the probability that the chosen coin is double-headed?

## closed as off-topic by Christoph, drhab, Lee David Chung Lin, José Carlos Santos, Jyrki LahtonenJan 17 at 15:23

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question is missing context or other details: Please provide additional context, which ideally explains why the question is relevant to you and our community. Some forms of context include: background and motivation, relevant definitions, source, possible strategies, your current progress, why the question is interesting or important, etc." – Christoph, drhab, Lee David Chung Lin, José Carlos Santos, Jyrki Lahtonen
If this question can be reworded to fit the rules in the help center, please edit the question.

• Do you have any suggestions yourself? – Henry Jan 17 at 8:32

Use Bayes' theorem. A and B are two independent events. A is the event that it is double-headed and B is the event that it lands on heads 7 times.

P(A|B) = (P(B|A)P(A))/(P(B|A)P(A) + P(B|A^C)P(A^C))

P(A|B) is  the likelihood of event A occurring given that B is true.

P(B|A) is the likelihood of event B occurring given that A is true.

The probability of A and the probability of B are independent of each other.

a)

P(A) = 1/2 = 0.5. This is the probability that the chosen coin is double-headed.

P(A^C) = 1/2 = 0.5. This is the the probability it is not double-headed.

P(B|A) = 1/100 + 1/2^7 * 99/100 = 227/12800 = 0.01773438. This is the probability of B given that A is true.

P(B|A^C) = 1/2^7 = 0.0078125

So you get the following:

P(A|B)= ((1/100 + 1/2^7 * 99/100) * 1/2)/((1/100 + 1/2^7 * 99/100) * 1/2 + (1/2^7) * 1/2) = 0.6941896

b)

P(A) = 1/100 = 0.01

P(A^C) = 99/100 = 0.99

P(B|A) = 1

P(B|A^C) = 1/2^7 = 0.0078125

You get this

(1 * 1/100)/((1 * 1/100) + (1/2^7 * 99/100)) = 0.56387665