CS 4960
Fall Semester 1999

 
Problem 9-3

 
Assigned: 21 October 1999
Due: 2 November 1999
 
 
Simulate the St. Peterburg game of chance: a player tosses a fair coin until a head appears.  The payoff to the player is $2^x, where x is the number of tosses made until the coin comes up heads.

The question to answer is: What is a fair price to pay in order to play the game?  (One should be willing to pay $2 since that is the minimum payoff.)

Develop a simulation to answer this question.