If I'm wrong, tell me why I'm wrong and you're right.. (no subject) : comments.
Sun | Mon | Tue | Wed | Thu | Fri | Sat |
---|---|---|---|---|---|---|
1
|
2 |
3
|
4
|
5
|
6
|
|
7
|
8
|
9
|
10
|
11
|
12
|
13
|
14
|
15
|
16
|
17
|
18
|
19
|
20
|
21
|
22
|
23
|
24
|
25
|
26
|
27
|
28
|
29
|
30
|
31
|
(no subject)
I wonder how many facebook friends you need so that you are more like than not to have a friend with a birthday on every single day of the year?
This was solved neatly by Ben:
Under (presumably) the same assumptions as above (uniform distribution of birthdays, ignoring leap years):
Define P(N,D) to be the probability that N people have exactly D different birthdays. Then we want to find the smallest N* such that P(N*,365)>0.5.
I'm thinking induction is the way to go. Suppose we have P(N-1,d) for all d, i.e. we know the chance of N-1 people having exactly d birthdays (for d = 1, 2, ... N-1).
Then to get P(N,D) there are two ways:
1) The N-1 people had D-1 different birthdays and the Nth person has a different birthday. The chance of this is (365-(D-1))/365 = (366-D)/365.
2) The N-1 people had D different birthdays and the Nth person has the same birthday as one of them. The chance of this is D/365.
So the recursion is
P(N,D) = [ P(N-1,D) * D + P(N-1,D-1)*(366-D) ]/365
with initial conditions P(1,1) = 1 and P(1,D) = 0 for D>1.
You can probably solve this with generating functions, but to be honest I don't care that much! A simple bit of code gives N* = 2287. This is pretty close to Vincent's answer. I wonder what happens if Vincent computes the median, and not the mean? Of course, since I said the code was simple, it's also quite possible that I made a mistake!
***
I think this is probably the solution for this... define P (N,X) as the probability after buying N Octonauts you have X Octonauts that you want? (I did this as P(N,O) with O for Octonaut initially, but it's _awful_ notation, because O looks like 0) Then we could have the recursion as P (N,X) = P(N-1,X) * P(didn't get an octonaut you want, given you already have X) + P (N-1,X-1)* P (did get an octonaut you want, given you already have X-1)
P(didn't get an octonaut you want, given you already have X) is easy, it's (X+3)/8 (so as soon as you have all 5, you never get an octonaut you want). Likewise P (did get an octonaut you want, given you already have X-1) is (6-X)/8
But I don't know how to actually do the recursion and calculate the answer...
(no subject)
(no subject)
(no subject)
P(10,5) is a miserable 16% (although you'll have a 44% chance of having that oh-so-frustrating 4)
To actually get P(N,5) > 0.90, you need to order 30 Octonauts.
On the other hand, a pile of 30 Octonauts would be great :-)
(no subject)
(no subject)
I couldn't quite bring myself to order in 30 sets of figures, so have ordered 10 and will report back on Thursday when I pick them up about what I ended up with. My disappointment at the dismal success rate predicted is improved slightly by the thought that once I've bought the figures at offer price, I can then order more in if needed and exchange even after the offer has finished. I'm sure all this would be easier if any of the Tescos in a 20 mile radius actually stocked the darned things.
(no subject)
We have a big tescos with lots of toys that is our local, so if you do end up trying to hunt down Just One, let me know... I haven't specifically looked for Octonauts though.
(no subject)
When you've bought 0 Octonauts, the expected number that you've got that you want is 3.
When you've bought 1, it's 3 + 5/8
When you've bought 2, it's 3 + 5/8 + (4 3/8)/8
When you've bought 3 ... and then your criterion for stopping is something like an expectation value of 7.2. Maybe.