Guest User

Probability wank

a guest
Nov 17th, 2017
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.32 KB | None | 0 0
  1. First one's a bit fiddly, but with a little application of the binomial theorem we can unravel it.
  2.  
  3. 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...
  4.  
  5. A (X X X X X) B (X X X) C (X X)
  6.  
  7. ...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:
  8.  
  9. 4 in A, 1 in B, 2 in C
  10. 3 in A, 2 in B, 1 in C
  11. 2, in A, 3 in B, 0 in C
  12.  
  13. So then we work out the individual probability of each of these three events and sum
  14.  
  15. 4 ⋅ p^4 ⋅ (1-p) ⋅ 3 ⋅ p ⋅ (1-p)^2 ⋅ p^2
  16. + 6 ⋅ p^3 ⋅ (1-p)^2 ⋅ 3 ⋅ p^2 ⋅ (1-p) ⋅ 2 ⋅ p ⋅ (1-p)
  17. + 6 ⋅ p^2 ⋅ (1-p)^3 ⋅ p^3 ⋅ (1-p)^2
  18.  
  19. = 12 ⋅ p^7 ⋅ (1-p)^3 + 36 ⋅ p^6 ⋅ (1-p)^4 + 6 p^5 ⋅ (1-p)^5
  20.  
  21. = 6 ⋅ (2 ⋅ p^7 ⋅ (1-p)^3 + 6 ⋅ p^6 ⋅ (1-p)^4 + p^5 ⋅ (1-p)^5)
  22. [if you want the binomial expansions, do them yourself!]
  23.  
  24. Second one's basically a simpler variant of the birthday problem - imagine it being based around 6 days rather than 365.
  25.  
  26. So let's construct a probabilty density function for a repeat to be found after exactly n submissions.
  27.  
  28. P(n=2) = 1 - 5/6 = 1/6
  29. P(n=3) = 1 - (5/6 ⋅ 4/6) - P(n=2) = 5/18
  30. P(n=4) = 1 - (5/6 ⋅ 4/6 ⋅ 3/6) - P(n=3) - P (n=2) = 5/18
  31. P(n=5) = 1 - 5/6 ⋅ 4/6 ⋅ 3/6 ⋅ 2/6) - P(n=4) - P(n=3) - P (n=2) = 5/27
  32. P(n=5) = 1 - 5/6 ⋅ 4/6 ⋅ 3/6 ⋅ 2/6 ⋅ 1/6) - P(n=5) -
  33. P(n=4) - P(n=3) - P (n=2) = 5/324
  34.  
  35. and to get our expected value for n, E (i.e. our mean), just multiply each P(n=k) by k and sum.
  36.  
  37. E = (2 ⋅ 1/6 + 3 ⋅ 5/18 + 4 ⋅ 5/18 + 5 ⋅ 5/27 + 6 ⋅ 5/324) = 89/27 or approximately 3.30.
  38.  
  39. 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.
  40. 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.
  41. Given we started with n couples, this leaves us with an expected value of n ⋅ p^2 couples with both members surviving.
  42. In terms of m and n we have:
  43.  
  44. n ⋅ (2n - m)^2/4n^2
  45. = (2n - m)^2/2n^2
  46. = (4n^2 - 4mn + m^2)/2n^2
  47. = 2 - 2(m/n) + 1/2(m^2/n^2)
Advertisement
Add Comment
Please, Sign In to add comment