Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- First one's a bit fiddly, but with a little application of the binomial theorem we can unravel it.
- If we separate the tosses into three sections, splitting between the first five, the middle three, and the final two, labeling the sections A, B and C like so...
- A (X X X X X) B (X X X) C (X X)
- ...we know we're looking for 5 heads in the first eight tosses, i.e. 5 in sections A+B, and 3 heads in the final 5, i.e. 3 in sections B+C, which gives us three separate mutually exclusive ways of distributing our heads across the three sections:
- 4 in A, 1 in B, 2 in C
- 3 in A, 2 in B, 1 in C
- 2, in A, 3 in B, 0 in C
- So then we work out the individual probability of each of these three events and sum
- 4 ⋅ p^4 ⋅ (1-p) ⋅ 3 ⋅ p ⋅ (1-p)^2 ⋅ p^2
- + 6 ⋅ p^3 ⋅ (1-p)^2 ⋅ 3 ⋅ p^2 ⋅ (1-p) ⋅ 2 ⋅ p ⋅ (1-p)
- + 6 ⋅ p^2 ⋅ (1-p)^3 ⋅ p^3 ⋅ (1-p)^2
- = 12 ⋅ p^7 ⋅ (1-p)^3 + 36 ⋅ p^6 ⋅ (1-p)^4 + 6 p^5 ⋅ (1-p)^5
- = 6 ⋅ (2 ⋅ p^7 ⋅ (1-p)^3 + 6 ⋅ p^6 ⋅ (1-p)^4 + p^5 ⋅ (1-p)^5)
- [if you want the binomial expansions, do them yourself!]
- Second one's basically a simpler variant of the birthday problem - imagine it being based around 6 days rather than 365.
- So let's construct a probabilty density function for a repeat to be found after exactly n submissions.
- P(n=2) = 1 - 5/6 = 1/6
- P(n=3) = 1 - (5/6 ⋅ 4/6) - P(n=2) = 5/18
- P(n=4) = 1 - (5/6 ⋅ 4/6 ⋅ 3/6) - P(n=3) - P (n=2) = 5/18
- P(n=5) = 1 - 5/6 ⋅ 4/6 ⋅ 3/6 ⋅ 2/6) - P(n=4) - P(n=3) - P (n=2) = 5/27
- P(n=5) = 1 - 5/6 ⋅ 4/6 ⋅ 3/6 ⋅ 2/6 ⋅ 1/6) - P(n=5) -
- P(n=4) - P(n=3) - P (n=2) = 5/324
- and to get our expected value for n, E (i.e. our mean), just multiply each P(n=k) by k and sum.
- E = (2 ⋅ 1/6 + 3 ⋅ 5/18 + 4 ⋅ 5/18 + 5 ⋅ 5/27 + 6 ⋅ 5/324) = 89/27 or approximately 3.30.
- In the third problem we have the proportion of people being alive as (2n - m)/2n, which if I understand the question correctly, I think I can take to be equal to p.
- If the chances of one person being alive are p, then the chances of both members of a couple being alive should be p^2.
- Given we started with n couples, this leaves us with an expected value of n ⋅ p^2 couples with both members surviving.
- In terms of m and n we have:
- n ⋅ (2n - m)^2/4n^2
- = (2n - m)^2/2n^2
- = (4n^2 - 4mn + m^2)/2n^2
- = 2 - 2(m/n) + 1/2(m^2/n^2)
Advertisement
Add Comment
Please, Sign In to add comment