# Law of total probability occurring

In a box we have $100$ indistinguishable coins. Each coin has a $1$ on one side and a $0$ on the other side. $20$ percent of the coins are not biased, but the rest are biased, where side $1$ has a $70$ percent probability of ocurring.

a.) If we randomly grabbed a coin from the box and threw the chosen coin just once what is the probability to get a $1$? Also, what is the conditional probability that the coin we threw was biased?

In a classroom of 10 we know that 4 students cheated.

a) If we randomly choose 4 students, what is the probability that we get exactly the 4 students that cheated. Also, what will be the probability of exactly 3 students who have cheated.

• Attempt at solution:

• For the first part of the first question, I know that $20\%$ of the coins are not biased so they have a $50\%$ of $0$ or $1$ occurring on a toss. But then how can I calculate the probability of getting a 1? Will it just be $[.20 \dot\ \frac{1}{2} + .7]$? For the second part of the question, since they are asking the probability of choosing a bias coin then can I use binomial distribution to calculate that probability? Thus,

$$\begin{pmatrix} 100\\1 \end{pmatrix}.7^1\left(1-.7\right)^{100-1}$$.

• For the second question, I know that in total their are $10$ students. So the probability of choosing the 4 that cheated is a binomial distribution. Thus, I have that

$$\begin{pmatrix} 10\\4 \end{pmatrix}.4^4(1 -.4)^{10-4}$$

• Hints: For the first question, read in your book about the law of total probability and about Bayes' formula. For the second question, there is no binomial distribution involved. The question really is asking, if we choose at random one of the sets of $4$ students from among all possible subsets of $4$ students out of $10$, what is the probability that we have chosen the specific subset of $4$ cheaters? – Dilip Sarwate Nov 12 '12 at 22:07

You came close to the right idea for the probability of getting a $1$. With probability $0.2$, we used a fair coin, and with probability $0.8$ we used an unfair coin. So the required probability is $$(0.2)(0.5)+(0.8)(0.7).$$
I assume that what is wanted for the second part is the probability that the coin is biased, given that we got a $1$. Let $B$ be the event the coin is biased, and let $W$ be the event we got a $1$. We want $\Pr(B|W)$. By the usual formula for conditional probabilities, we have $$\Pr(B|W)=\frac{\Pr(B\cap W)}{\Pr(W)}.\tag{1}$$ We have already computed $\Pr(W)$. To find $\Pr(B\cap W)$ is not hard, we already sort of did it. We have $\Pr(B)=0.8$. Given that the coin is biased, the probability of $W$ is $0.7$, so $\Pr(B\cap W)=(0.8)(0.7)$. Now we have all the information we need to use the basic formula $(1)$.
For the cheating problem, there are $\dbinom{10}{4}$ equally likely ways to select $4$ people. There is only $1$ way (or if you prefer, $\dbinom{4}{4}$ ways) to choose cheaters only, so our probability is $\dfrac{\binom{4}{4}}{\binom{10}{4}}$.
For exactly $3$ cheaters, these can be chosen in $\dbinom{4}{3}$ ways, and for each of these ways, there are $\dbinom{6}{1}$ ways to select the non-cheater who will help make up the group of $4$. So the required probability is $\dfrac{\binom{4}{3}\binom{6}{1}}{\binom{10}{4}}$.
• We use it when the results of the trials are independent. This happens if we sample with replacement, but also when we toss a number of fair coins (or coins with identical biases), or fair dice. Also can be used if we are taking a smallish sample, even without replacement, from a big population. So if take a sample of $2000$ randomly chosen voting age people from the population of Canada, and ask whether they support the NDP, in principle situation is not a binomial one, but it is for all practical purposes. – André Nicolas Nov 12 '12 at 22:35