I think you’ve a mistake here when calculating P(H=x). It can’t be equal to
(1/2)^x. If you toss a coin N times then by definition the total number of
times you get “x” heads in a row n(x)= P(x)*N. If we assume that you’re
right then the total number of heads will be n(1)+2n(2)+3n(3)+…=N((1/2)+2*(1/2)^2+3*(1/2)^3+…).
The sum in the brackets equals to 2, so you get that the total number of
heads equals to 2N, whereas it has to be N/2. From here you can see that
the right answer is P(x)=(1/2)^(x+2)
By the way, here's what I got in my computer simulation. I did 100 000 tosses. The number of heads 1 time in a row - 12 439, 2 times in a row is 6246, 3 times - 3174, 4 times - 1605, well you get the idea.
That's what the probability is, which is basically the relative frequency "in the long run", that is when N goes to infinity. That is why the probability of getting let say heads is 1/2, beacause when you throw a coin an infinite number of time the relative frequency goes to 1/2, but you never get this number when you throw a coin a finite number of times. Anyway you can see for yourself what the probability of getting x heads in a ROW actually is if you do a computer simulation of tossing a coin. Just count how many heads you get, lets say, two times in a row and devide it by the total number of tosses. You'll see that this ratio will be about 4 times lower that your formula predicts, it'll be about 0,0625, rather than 0,25.
The P(H=x) given here is the probability of getting x heads in a ROW. So if the chance of getting one head is 1/2 the chance of getting two heads is 1/4 and so on. This would be more obvious if you draw a tree diagram. The equation n=P*N doesn't actually hold unless you repeat the experiment a large amount of times (i.e as N approaches infinity). This is the reason why if you were to get two tails in two coin tosses you cannot conclude that P=0.
St Petersburg Paradox
More videos at //facpub.stjohns.edu/~moyr/videoonyoutube.htm.
Quick question, how did we know to choose log($)?
St. Petersburg Paradox in Excel
Demonstration of the St. Petersburg Paradox using VBA in Excel 2010. Note that even though the expected payout is infinity, that the player can quickly end up ...
The expected payout is infinity only when you play this game infinitely
long. In case of 1500 tosses of a coin (that is about 750 games) and a
first payment of 1$ a fair price for 1 game would be just 2,8$, which means
that on average after 1500 trials a player and a casino will have 50%
chance to win. In your case with the price of 10$ a number of trials for
the game to be fair has to be 671 442 900 142 or 335 721 450 071 games. The
general formula for this case (first payment - 1$) is y=0.25*log2(x/p)-0.5,
where p=(1+1/ln2)/16≈0.15, x – total amount of tosses, y – a fair price for
one game, log2(x/p) is the logarithm of x/p to base 2.
I have a python script at sdrv.ms/180eSjz. My plot shows that you need ~1
mln games to have average revenew of 10 and about 10 times more games to
increase your average income +1. That is, you need exponentially more time
for the lower frequencies to appear. The lower frequencies contribute as
any other higher frequency but you cannot expect them to occur in just few
games.