PDA

View Full Version : coin tossing and EV


hazeelnut
02-03-2004, 05:39 PM
Hi there

Suppose you have a biased coin that is 90% it will come up heads and 10% chance it will come up tails. What is the expected number of heads you expect to get in a row before you get a tail if you start tossing the coin?

a formula would be helpful as well.

thanks

// hazeel

Homer
02-03-2004, 06:38 PM
P(0 heads) = .1

P(1) = (.9)^1*(.1)

P(2) = (.9)^2*(.1)

P(x) = (.9)^x*(.1)

E(x) = (Sum 0-inf) x*P(x)

= (Sum 0-inf) x(.9)^x(.1)

= 0(.1) + .9(.1) + 2(.9)^2(.1) + 3(.9)^3(.1) + ...

= .9(.1)[1 + 2(.9) + 3(.9)^2 + ...]

= .9(.1)(1 / (1-.9)^2) (The sum of the infinite series 1 + 2x + 3x^2 + ... is 1 / (1-x)^2

= .9(.1)/(.1)^2

= 9

-- Homer

Homer
02-03-2004, 06:50 PM
Incidentally, if the probability of tossing a head is p and the probability of tossing a tail is q, the expected number of heads before throwing a tail is equal to p divided by q.

For example, if P(H) = .72 and P(T) = .28, E(X) = .72/.28, where X is the expected number of heads thrown before throwing a tail.

-- Homer