Chocolates, bugs, and socks: Difference between revisions
No edit summary |
No edit summary |
||
Line 9: | Line 9: | ||
---- | ---- | ||
'''How many socks do I have?''' I've just pulled 10 socks out of a pile of clean laundry one at a time. I've made 2 pairs and have | '''How many socks do I have?''' I've just pulled 10 socks out of a pile of clean laundry one at a time. I've made 2 pairs and have 6 singletons. Based on this information, how many pairs of socks are there total (assuming each sock has a unique partner)? Maximum likelihood answer: [http://www.wolframalpha.com/input/?i=graph+%28n+choose+p%29+*+%28%28n-p%29+choose+k-2*p%29+%2F+%282*n+choose+10%29+for+k%3D10%2C+p%3D2%2C+n%3D8+to+15 11 pairs] | ||
If there are $n$ pairs of socks, I pull out $k$, and make $p$ pairs, the likelihood is | If there are $n$ pairs of socks, I pull out $k$, and make $p$ pairs, the likelihood is |
Revision as of 16:29, 5 March 2015
Every chocolate Lindsay eats, she gets a picture of a bug, randomly selected from a set of 20 bug pictures. She has collected 19 of the bug pictures.
How many chocolates has she probably eaten? $$\frac{20}{20}+\frac{20}{19}+\cdots+\frac{20}{2} \approx 20\times(\ln(20) + \frac 12 - 1) \approx 50$$ She should expect to eat another 20 chocolates before getting that last bug.
What's the 90% confidence interval around that? For a rough answer, we need to know the variance in the number of trials needed before a success for a probability $p$ event. If that's $v(p)$, then the variance for our number is $v(\frac{20}{20})+v(\frac{20}{19})+\cdots+v(\frac{20}{2})$. You can compute $v(p)$ because we know the distribution for number of trials before success is an exponential. Do that. Also, what about getting the exact 90% CI?
How many socks do I have? I've just pulled 10 socks out of a pile of clean laundry one at a time. I've made 2 pairs and have 6 singletons. Based on this information, how many pairs of socks are there total (assuming each sock has a unique partner)? Maximum likelihood answer: 11 pairs
If there are $n$ pairs of socks, I pull out $k$, and make $p$ pairs, the likelihood is $$\binom np \binom{n-p}{k-2p} \binom{2n}{k}^{-1}$$ (first pick the $p$ pairs, then $k-2p$ singletons). Of course, I usually have a pretty good prior on how many pairs of socks are in my laundry.
Coin problem from Richard.