How can the infinite sum of Bernoulli’s proposed resolution of the St Petersburg paradox be calculated using Mathematica?
I tried the below formula in Mathematica but it didn’t give me a numerical solution. I was expecting ‘c’, the player’s maximum price to take part in the lottery, to be 10.95 dollars.
I tried simulating the infinite sum using a spreadsheet and for a player with a wealth of 1,000,000 dollars who has a natural log utility function, I found that he would pay a maximum of 10.95 dollars. This spreadsheet is here.
I’m sorry, I mistakenly wrote 100 in my initial wealth rather than 1,000,000 which is what I tried in Mathematica and which didn’t give a numerical result.
I changed the value to the correct 1,000,000 five minutes after my initial post, but I guess you only saw the first incorrect version. Sorry about that.
Here is the mathematica code that I tried to run with no numerical result:
Best I can tell, Sum has no real chance to handle that input, and so Solve and even NSolve are likely to fail. I’d suggest making a function that can be evaluated numerically by NSum and using FindRoot on the result. Something like below.
This is close to the reference value of 20.84. Playing with various options brings it a hair closer, to 20.874. Maybe I’m not using the best options though. Or maybe the reference value had a typo, hard to say.
Thank you very much for your excellent answers. After more than 10 years of showing an erroneous value (10.95), the Wikipedia page about the Bernoulli Paradox can now be fixed and set to 20.88!
This is close to the reference value of 20.84. Playing with various options brings it a hair closer, to 20.874. Maybe I’m not using the best options though. Or maybe the reference value had a typo, hard to say.
That reference value was crudely computed in a spreadsheet using a sum of the first 500 or so values together with MS Excel’s Solver function. That’s a relief that the Mathematica-calculated value is very similar.
I’m sorry I overlooked the natural log function notation, ln rather than Log.
By the way, I wonder how Bernoulli attempted to calculate these values back in the 1700’s? I guess that he somehow calculated that the series converged and then did a crude approximation by summing the first few dozen values.