In probability theory and decision theory the St. Petersburg paradox is a paradox that exhibits a random variable whose value is probably very small, and yet has an infinite expected value. This poses a situation where decision theory may superficially appear to recommend a course of action that no rational person would be willing to take. That appearance evaporates when utilities are taken into account. It was first ennunciated by Daniel Bernoulli in 1738.
In a game of chance, you pay a fixed fee to enter, and then a coin will be tossed repeatedly until a "head" first appears. You win 1 cent if a head appears on the first toss, 2 cents if on the second, 4 cents if on the third, 8 cents if on the fourth, etc. It doubles with every toss. In short, you win 2k−1 cents if the coin must be tossed k times.
How much would you be willing to pay to enter the game?
The probability that the first head occurs on the kth toss is:

The probability that you win more than $10.24 (i.e., 210 cents) is less than one in a thousand. The probability that you win more than $1 is less than one in a hundred. Nonetheless, the expected amount that you win is infinite! Here is how it is calculated:

This sum diverges to infinity. Thus, according to traditional expected value theory, no matter how much you pay to enter (imagine paying $1 billion each time, and winning only a few cents on nearly all occasions when you have paid that fee for the privilege) you will come out ahead in the long run, the idea being that on the very rare occasions when a large payoff comes along, it will far more than repay all the hundreds of trillions of dollars you have paid to play.
Decision theory applied naively without taking utility into account would suggest that any fee, no matter how high, would be worth paying for this opportunity. In practice, no reasonable person would pay more than a few cents to enter.
Encounter with the paradox leads to a deeper understanding of a variety of issues in economics and decision theory, in particular:
For example, according to diminishing marginal utility, 9 trillion dollars is not much more useful than 900 billion dollars, despite being ten times as large. Therefore, a one-in-900,000,000,000 chance of earning 900,000,000,000 cents is not worth even the one cent that naive decision theory says that it is.
A way around that solution is to change the game so that it offers a quantity of utility (enough money, lifespan, knowledge, etc., arranged so that each prize is worth twice as much as the last) rather than money. In this case, the game should be worth an infinite amount. Possibly, however, there is a limit to the amount of utility that a person can have.
In addition, this does not take into account the fact that no person has the time and money necessary to play over the long run, or even a good approximation of it.
A translation of Daniel Bernoulli's original presentation is found in: