Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Vote for Us! (July)
Voted 23

Have a fun irrelevant maths fact (23 is boring and I've exhausted my supply relating to it).

If you keep flipping an unbiased coin until you get heads, what is the mean number of times you will have to flip it?

[spoiler]2. On average it will take 2 flips. Test it if you want.

Why?

Mean value will be equal to the sum of x*p where x is the flip number and p is the probability of it getting to that many flips. The sum of x*p is equal to S(n) as n -> infinty where S(n) = the sum of r*2^(-r) from r = 1 to r = n. (x = r, p = r*2^(-r))

Hence,

S(n) = 0.5 + 2*0.25 + 3*0.125 + 4*0.0625 + ... + (n-1)/[2^(n-1)] + n/(2^n)
0.5*S(n) = 0.25 + 2*0.125 + 3*0.0625 + 4*0.03125 + ... + (n-1)/(2^n) + n/[2^(n+1)]
S(n) - 0.5*S = 0.5*S = 0.5 + 0.25 + 0.125 + 0.0625 + ... + 1/(2^n) - n/[2^(n+1)]
S(n) = 1 + 0.5 + 0.25 + 0.125 + 0.0625 + ... - n/[2^(n+1)]
S(n) = 2 - n/[2^(n+1)]
As n -> inf, S(n) -> 2[/spoiler]


Messages In This Thread
Vote for Us! (July) - by Mark - 07-01-2017, 08:21 AM

Forum Jump:


Users browsing this thread: 3 Guest(s)