Intro to Probability - YAQ Week 5
In this space I post the most common and recurrent questions of
the week. It can be used as additional material you can use to further
and test your understanding.
Question
When considering a sequence of $n$ independent experiments which have
success probability $p$, why is the probability of observing exactly
$k$ successes given by ${n\choose k}p^k(1-p)^{n-k}$?
Answer
Consider first the event $E$ that the $k$ successes occur in the first
$k$ experiments. Let $S_j$, $F_j$ denote the event of having a success or
a failure in experiment $j(=1,\dots,n)$, respectively. Then
$$
E=S_1\cap\cdots\cap S_k\cap F_{k+1}\cap\cdots\cap F_n.
$$
Independence then yields
$$
P(E)=P(S_1\cap\cdots\cap S_k\cap F_{k+1}\cap\cdots\cap F_n)=
P(S_1)P(S_2)\cdots P(S_k)P(F_{k+1})\cdots P(F_n)=p^k(1-p)^{n-k}.
$$
Finally observe that the $k$ successes can actually happen in any $k$
of the $n$ experiments for a total ${n\choose k}$ different
possibilities which all contribute the above probability to the
probability of having exactly $k$ successes and lead to
$$
P(``\text{exactly }k\text{ successes}")={n\choose k}p^k(1-p)^{n-k}.
$$
Question
Consider a biased coin for which heads comes up with probability
$p\in(0,1)$. Try to find a way to use the coin in a way as to simulate
the outcome of a fair coin.
Answer
Continue to flip the coin two times until the outcome is not two heads
nor two tails and stipulate that player A wins if heads occurs first
in the pair, while B wins if heads occurs on the pair's second
flip. Why does this yield a fair game?
The probabilties to flip heads followed by tails or tails followed by
head are both $p(1-p)$. Thus the probability for either player to win
is
$$
\frac{p(1-p)}{2p(1-p)}=\frac{1}{2}.
$$
In a more formal way, let $E$ be the event that the first of a pair of
tosses yields heads and $F$ the event that the pair of flips yields heads and
tails in any order. Then the probability of A winning is given by
$$
P(E|F)=\frac{P(E\cap F)}{P(F)}=\frac{p(1-p)}{2p(1-p)}=\frac{1}{2}.
$$