This article includes a list of general references, but it remains largely unverified because it lacks sufficient corresponding inline citations. (October 2013) (Learn how and when to remove this template message)
The St. Petersburg paradox or St. Petersburg lottery is a paradox related to probability and decision theory in economics. It is based on a particular (theoretical) lottery game that leads to a random variable with infinite expected value (i.e., infinite expected payoff) but nevertheless seems to be worth only a very small amount to the participants. The St. Petersburg paradox is a situation where a naive decision criterion which takes only the expected value into account predicts a course of action that presumably no actual person would be willing to take. Several resolutions are possible.
The paradox takes its name from its resolution by Daniel Bernoulli, one-time resident of the eponymous Russian city, who published his arguments in the Commentaries of the Imperial Academy of Science of Saint Petersburg (Bernoulli 1738). However, the problem was invented by Daniel's cousin, Nicolas Bernoulli, who first stated it in a letter to Pierre Raymond de Montmort on September 9, 1713 (de Montmort 1713).
A casino offers a game of chance for a single player in which a fair coin is tossed at each stage. The initial stake begins at 2 dollars and is doubled every time heads appears. The first time tails appears, the game ends and the player wins whatever is in the pot. Thus the player wins 2 dollars if tails appears on the first toss, 4 dollars if heads appears on the first toss and tails on the second, 8 dollars if heads appears on the first two tosses and tails on the third, and so on. Mathematically, the player wins dollars, where is a positive integer equal to the number of tosses. What would be a fair price to pay the casino for entering the game?
To answer this, one needs to consider what would be the average payout: with probability , the player wins 2 dollars; with probability the player wins 4 dollars; with probability the player wins 8 dollars, and so on. The expected value is thus
Assuming the game can continue as long as the coin toss results in heads and in particular that the casino has unlimited resources, this sum grows without bound and so the expected win for repeated play is an infinite amount of money. Considering nothing but the expected value of the net change in one's monetary wealth, one should therefore play the game at any price if offered the opportunity. Yet, in published descriptions of the game, many people expressed disbelief in the result. Martin Robert quotes Ian Hacking as saying "few of us would pay even $25 to enter such a game" and says most commentators would agree. The paradox is the discrepancy between what people seem willing to pay to enter the game and the infinite expected value.
Several approaches have been proposed for solving the paradox.
In Daniel Bernoulli's own words:
The determination of the value of an item must not be based on the price, but rather on the utility it yields.... There is no doubt that a gain of one thousand ducats is more significant to the pauper than to a rich man though both gain the same amount.
A common utility model, suggested by Bernoulli himself, is the logarithmic function U(w) = ln(w) (known as log utility). It is a function of the gambler's total wealth w, and the concept of diminishing marginal utility of money is built into it. The expected utility hypothesis posits that a utility function exists the sign of whose expected net change from accepting the gamble is a good criterion for real people's behavior. For each possible event, the change in utility will be weighted by the probability of that event occurring. Let c be the cost charged to enter the game. The expected incremental utility of the lottery now converges to a finite value:
This formula gives an implicit relationship between the gambler's wealth and how much he should be willing to pay to play (specifically, any c that gives a positive change in expected utility). For example, with natural log utility, a millionaire ($1,000,000) should be willing to pay up to $20.88, a person with $1,000 should pay up to $10.95, a person with $2 should borrow $1.35 and pay up to $3.35.
the mathematicians estimate money in proportion to its quantity, and men of good sense in proportion to the usage that they may make of it.
He demonstrated in a letter to Nicolas Bernoulli that a square root function describing the diminishing marginal benefit of gains can resolve the problem. However, unlike Daniel Bernoulli, he did not consider the total wealth of a person, but only the gain by the lottery.
This solution by Cramer and Bernoulli, however, is not completely satisfying, since the lottery can easily be changed in a way such that the paradox reappears. To this aim, we just need to change the game so that it gives even more rapidly increasing payoffs. For any unbounded utility function, one can find a lottery that allows for a variant of the St. Petersburg paradox, as was first pointed out by Menger (Menger 1934).
Recently, expected utility theory has been extended to arrive at more behavioral decision models. In some of these new theories, as in cumulative prospect theory, the St. Petersburg paradox again appears in certain cases, even when the utility function is concave, but not if it is bounded (Rieger & Wang 2006).
Nicolas Bernoulli himself proposed an alternative idea for solving the paradox. He conjectured that people will neglect unlikely events (de Montmort 1713). Since in the St. Petersburg lottery only unlikely events yield the high prizes that lead to an infinite expected value, this could resolve the paradox. The idea of probability weighting resurfaced much later in the work on prospect theory by Daniel Kahneman and Amos Tversky.
Cumulative prospect theory is one popular generalization of expected utility theory that can predict many behavioral regularities (Tversky & Kahneman 1992). However, the overweighting of small probability events introduced in cumulative prospect theory may restore the St. Petersburg paradox. Cumulative prospect theory avoids the St. Petersburg paradox only when the power coefficient of the utility function is lower than the power coefficient of the probability weighting function (Blavatskyy 2005). Intuitively, the utility function must not simply be concave, but it must be concave relative to the probability weighting function to avoid the St. Petersburg paradox. One can argue that the formulas for the prospect theory are obtained in the region of less than $400 (Tversky & Kahneman 1992). This is not applicable for infinitely increasing sums in the St. Petersburg paradox.
Various authors, including Jean le Rond d'Alembert and John Maynard Keynes, have rejected maximization of expectation (even of utility) as a proper rule of conduct. Keynes, in particular, insisted that the relative risk[clarification needed] of an alternative could be sufficiently high to reject it even if its expectation were enormous. Recently, some researchers have suggested to replace the expected value by the median as the fair value. 
The classical St. Petersburg lottery assumes that the casino has infinite resources. This assumption is unrealistic, particularly in connection with the paradox, which involves the reactions of ordinary people to the lottery. Of course, the resources of an actual casino (or any other potential backer of the lottery) are finite. More importantly, the expected value of the lottery only grows logarithmically with the resources of the casino. As a result, the expected value of the lottery, even when played against a casino with the largest resources realistically conceivable, is quite modest. If the total resources (or total maximum jackpot) of the casino are W dollars, then L = floor(log2(W)) is the maximum number of times the casino can play before it no longer fully covers the next bet. The expected value E of the lottery then becomes:
The following table shows the expected value E of the game with various potential bankers and their bankroll W (with the assumption that if you win more than the bankroll you will be paid what the bank has):
|Banker||Bankroll||Expected value of lottery||Consecutive flips to win max.||Attempts for 50% chance to win max.||Play time (1 game/minute)|
|Friendly game||$100||$7.56||6||44||44 minutes|
|Bill Gates (2015)||$79,200,000,000||$37.15||36||47,632,711,549||90,625 years|
|U.S. GDP (2007)||$13.8 trillion||$44.57||43||6,096,987,078,286||11,600,052 years|
|World GDP (2007)||$54.3 trillion||$46.54||45||24,387,948,313,146||46,400,206 years|
|Googolaire||$10100||$333.14||332||1.340×10191||8.48×10180 × life of universe|
A rational person might not find the lottery worth even the modest amounts in the above table, suggesting that the naive decision model of the expected return causes essentially the same problems as for the infinite lottery. Even so, the possible discrepancy between theory and reality is far less dramatic.
The premise of infinite resources produces a variety of paradoxes in economics. In the martingale betting system, a gambler betting on a tossed coin doubles his bet after every loss, so that an eventual win would cover all losses; this system fails with any finite bankroll. The gambler's ruin concept shows a persistent gambler will go broke, even if the game provides a positive expected value, and no betting system can avoid this inevitability.
Although this paradox is three centuries old, new arguments are still being introduced.
A mathematically correct solution involving sampling was offered by William Feller. In order to understand Feller's answer correctly, sufficient knowledge about probability theory and statistics is necessary, but it can be understood intuitively "to perform this game with a large number of people and calculate the expected value from the sample extraction". In this method, when the games of infinite number of times are possible, the expected value will be infinity, and in the case of finite, the expected value will be a much smaller value.
Samuelson resolves the paradox by arguing that, even if an entity had infinite resources, the game would never be offered. If the lottery represents an infinite expected gain to the player, then it also represents an infinite expected loss to the host. No one could be observed paying to play the game because it would never be offered. As Paul Samuelson describes the argument:
"Paul will never be willing to give as much as Peter will demand for such a contract; and hence the indicated activity will take place at the equilibrium level of zero intensity." (Samuelson 1960)
The St. Petersburg paradox and the theory of marginal utility have been highly disputed in the past. For a discussion from the point of view of a philosopher, see (Martin 2004).
Recently some authors suggested using heuristic parameters  (e.g. assessing the possible gains without neglecting the risks of the Saint Petersburg lottery) because of the highly stochastic context of this game (Cappiello 2016). The expected output should therefore be assessed in the limited period where we can likely make our choices and, besides the non-ergodic features (Peters 2011a), considering some inappropriate consequences we could attribute to the expected value (Feller 1968).