You are in a pitch black room and need to get a pair of socks out of your drawer which can contain up to 100 socks. In the drawer is a mixture of black and white socks, and there's at least one pair of either color. If you choose two socks, the chance that you draw out a black pair is 2/3.
What is the chance that you draw out a white pair?
______________________________________________
Bonus: what would the answer be if the drawer contained between 100 and 1000 socks?
If there are b black socks and w white socks
b(b1)/((b+w)(b+w1)) = 2/3
Which leads to the quadratic
b^2  (1+4w)b 2w^2+2w = 0
When the quadratic formula is used to find b in terms of w, the positive integral solutions come out for the following values of w (up to how far I took it):
w b
1 5
10 45
99 441
980 4361
The first solution doesn't have at least one pair of white socks.
The second fits part 1, and gives a probability of drawing a white pair as 10*9/(55*54) = .030303... = 1/33.
The third fits part 2, and gives a probability of drawing a white pair as 99*98/(540*539)=.033333... = 1/30.
The fourth gives a probability of 980*979/(5341*5340)=0.033639143730887... =11/327 = 1/29.727272...
As the number of socks approaches infinity, this resembles the probability of drawing homozygous alleles in a gene pool in HardyWeinberg equilibrium. The probability would be the same as if drawing were with replacement. The proportion of black socks (or genes) would be sqrt(2/3) or about 0.816496580927726, leaving 0.183503419072274 white, for a probability of 0.033673504811215 of drawing a pair of white socks or genes (1/29.69693845669907).
Calculations of the solutions to the quadratic were done by entering a formula into a Reverse Polish Notation calculator program that tabularized the results. The RPN is:
dup, dup, 4 *, 1+, x^2, 8 *, swap, 8 *,  + sqrt, swap, 4 * +, 1+2/
corrected transcription of the first equation
Edited on September 3, 2004, 9:31 am

Posted by Charlie
on 20040901 20:03:59 