\subsection{St. Petersburg paradox}
The St. Petersburg paradox is a paradox associated 
with gambling and decision theory. It is named after the city 
of St. Petersburg in Russia and was initially introduced
 by the mathematician Daniel Bernoulli in 1738.

The paradox involves a gambling game with the following rules:
\begin{itemize}
  \item Participants must pay a fixed entry fee to join the game.
  \item The game continues until a coin lands heads up. 
Each toss determines the prize, with the first heads
 appearing on the $t$-th toss resulting in a prize of $2^t$.
\end{itemize}


%\input{pic/FigureParadox}

The expected return of all possibilities is
\begin{equation}
\begin{split}
\mathbb{E}(x)&=\lim_{n\rightarrow \infty}\sum_{t=1}^n p(x)\times V(x)\\
&=\lim_{n\rightarrow \infty}\sum_{t=1}^n\frac{1}{2^t} 2^t\\
&=\infty 
\end{split}
\end{equation}


Despite the potential for the prize to escalate 
significantly, the expected value calculation 
in probability theory reveals that the average 
participant in this gambling game would end up paying
 an infinite fee. This is due to the prize's expected 
 value being infinite. Even though the probability of
  winning is small with each toss, when multiplied,
   it leads to an infinitely increasing expected value.

This paradox challenges individuals' intuitions and 
decision-making regarding gambling. Despite the allure 
of a potentially substantial prize, the actual expected
 value of participating in this gambling game is infinite.
  Consequently, in the long run, participants could face
   an infinite monetary loss.

%圣彼得堡悖论期望
[
E(X)=\sum_{n}x(n)p(n) = \frac{1}{2}\times 2 + \frac{1}{4}\times 4 + \frac{1}{8}\times 8 + \cdots = \infty
]

% 圣彼得堡悖论状态转移矩阵
   \[
    P = \begin{pmatrix}
    0 & \frac{1}{2} & 0 & 0 & 0 & ... & ... & \frac{1}{2}  \\
    0 & 0 & \frac{1}{2} & 0 & 0 & ... & ... & \frac{1}{2} \\
    \vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \ddots & \vdots \\
    1 & 0 & 0 & 0 & 0  & ... & ... & 0
    \end{pmatrix}
    \]

% 圣彼得堡悖论Q矩阵

\[
Q = \begin{pmatrix}
0 & \frac{1}{2} & 0 & 0 & 0 & ... & ...   \\
0 & 0 & \frac{1}{2} & 0 & 0 & ... & ...  \\
\vdots & \vdots & \vdots & \vdots & \vdots & \ddots & \ddots  \\
\end{pmatrix}
\]

% N矩阵
$N=1+Q^1+Q^2……$


% 圣彼得堡悖论的N矩阵
[
N = \begin{pmatrix}
1 & \frac{1}{2} & \frac{1}{4} & \frac{1}{8} & \frac{1}{16} & \dots \
0 & 1 & \frac{1}{2} & \frac{1}{4} & \frac{1}{8} & \dots \
\vdots & \vdots & \vdots & \vdots & \vdots & \ddots
\end{pmatrix}
]

% 带截断的圣彼得堡悖论 
\begin{table}[ht]
  \centering
  \begin{tabular}{|c|c|c|}
  \hline
  截断长度（期望） & 100000次试验结果平均 & 偏差 \\
  \hline
  5 & 4.99 & -0.01 \\
  10 & 9.89 & -0.11 \\
  15 & 14.66 & -0.34 \\
  20 & 16.83 & -3.17 \\
  25 & 15.74 & -9.26 \\
  30 & 186.15 & +156.15 \\
  \hline
  \end{tabular}
\end{table}























