Wednesday, 22 April 2015

Interesting probability problems

Birthday problem
"Find the probability that, in a group of n people, there is at least one pair of people who have the same birthday."
In a leap year, there are 366 days. By the pigeonhole principle, the probability that there is at least two people sharing the same birthday will be 1 when there are 367 people. [If we have more than one people having the same birthday among those 367 people, then of course the probability is one. If the 366 people each has a different birthday, the last person (367th person) will have a birthday coinciding one of those 366, hence the result.]
In fact, the probability reaches 0.99 in a group of 70 people, whereas in a group of 23, the probability becomes 0.5. The calculations are as follows:
Let's say there are 365 days in a year.
In a room of n people,
$\text{P(no two people share the same birthday)}$
$\large =365/365\cdot 364/365\cdot 363/365\cdot \ldots \cdot[365-(n-1)]/365\\
\Large =\frac{365\:\cdot\:364\:\cdot\:363\:\cdot\: \ldots \:\cdot\: [365-(n-1)]}{365^n}\\
\Large =\frac{P^{365}_n}{365^n}$

Monty Hall problem
"Suppose you're on a game show, and you're given the choice of three doors: Behind one door is a car; behind the others, goats. You pick a door, say No. 1, and the host, who knows what's behind the doors, opens another door, say No. 3, which has a goat. He then says to you, "Do you want to pick door No. 2?" Is it to your advantage to switch your choice?"
The answer is you should always swap because doing so doubles the probability of winning the car.
If you do not swap, you have 1/3 chance of winning the car and 2/3 chance of winning a goat.
What if you swap? If at first you pick a goat door (2/3 chance) and you swap, you have 1/2 chance of wining the car. And if at first you pick a car door and swap, you get a goat. So overall, the probability of winning the car if you swap is $2/3\cdot 1/2 + 2/3\cdot 1/2 = 2/3$, which is twice the probability of winning the car if you do not swap.

A similar counterintuitive probability problem

Sock Drawer
"A drawer contains red socks and black socks. When two socks are drawn at random, the probability that both are red is $\frac{1}{2}$. (a) How small can the number of socks in the drawer be? (b) How small if the number of black socks is even?"
Let there be r red and b black socks.
P(first sock is red) = $\Large \frac{r}{r+b}$
P(two socks are both red) = $\frac{1}{2}$, which means $\Large \frac{r}{r+b}\cdot \frac{r-1}{r+b-1}=\frac{1}{2}$.
We can plug in different values of r and b to get the answers, but that is not a wise way of approaching this problem.
It turns out we can reach the answers by using inequalities.
Notice that $\Large \frac{r}{r+b}>\frac{r-1}{r+b-1}$ for $b>0$.
So we can create the inequalities
$\Large (\frac{r-1}{r+b-1})^2 < \frac{1}{2} < (\frac{r}{r+b})^2$
$\Large \frac{r-1}{r+b-1} < \frac{1}{\sqrt{2}} < \frac{r}{r+b}$ --(*)
From the first inequality of (*), $(\sqrt{2}+1)b>r-1$.
From the second, $r>\frac{1}{\sqrt{2}}(r+b)$ or $r>\frac{1}{\sqrt{2}-1}b=(\sqrt{2}+1)b$
Finally, $(\sqrt{2}+1)b<r<(\sqrt{2}+1)b+1$
For $b=1$, $r>2.414$ and $r<3.414$, so the candidate is $r=3$. For $r=3$ and $b=1$, $\text{P(2 red socks)}=3/4\cdot 2/3=1/2$, thus the smallest number of socks is 4.
Now for even values of b,
$\begin{array}{c|c|c|c} b & \text{r is between} & \text{eligible r} & \text{P(2 red socks)} \\ \hline 2 & 4.8,\:\:5.8 & 5 & \frac{5\cdot 4}{7\cdot 6} \neq \frac{1}{2}\\ 4 & 9.7,\:\:10.7 & 10 & \frac{10\cdot 9}{14\cdot 13} \neq \frac{1}{2} \\ 6 & 14.5,\:\:15.5 & 15 & \frac{15\cdot 14}{21\cdot 20}=\frac{1}{2} \end{array}$
So 15+6=21 socks is the smallest number when b is even.
Related: Number Theory -- Diophantine Analysis

Geometric distribution
A brilliant proof of its expected value:
When the first outcome is a failure (with probability $1-p=q$), the mean number of trials required is $1+E(X)$, and when the first outcome is a success (with probability $p$), the mean number is $1$. $\therefore E(X)=p(1)+q[1+E(X)] \Rightarrow E(X)=1+qE(X) \Rightarrow E(X)=\frac{1}{1-q}=\frac{1}{p}$

More:
http://www.quora.com/What-are-the-most-interesting-or-popular-probability-puzzles-in-which-the-intuition-is-contrary-to-the-solution

Reference:
Fifty challenging problems in probability by F. Mosteller

No comments:

Post a Comment