Skip to main content
added 157 characters in body
Source Link
TonyK
  • 425
  • 3
  • 5

You can solve this combinatorially, without using calculus. All you need to look at is the probability that the first $n$ samples are in a certain order, and for any particular order this is simply $1/n!$

The game ends after exactly $n$ steps if and only if the first $n-1$ samples are in increasing order, and the last sample is not. The last sample can occupy any of the $n$ positions except the highest, so there are $n-1$ such sequences; hence the probability that the game ends after exactly $n$ steps is $\frac{n-1}{n!}$.

And $A$ wins if the game ends after an even number of steps, so $A$'s probability of winning is $$\begin{align} \sum_{n=1}^\infty\frac{2n-1}{(2n!)} & = \sum_{n=1}^\infty\left(\frac{1}{(2n-1)!}-\frac{1}{(2n!)}\right) \\ & = \sum_{n=1}^\infty\frac{(-1)^{n+1}}{n!} \\ & = 1-\sum_{n=0}^\infty\frac{(-1)^n}{n!} \\ & = 1 - \frac{1}{e} \end{align}$$

This assumes nothing about the particular distribution of the samples, except that it is continuous. So the answer is the same whatever the distribution.

You can solve this combinatorially, without using calculus. All you need to look at is the probability that the first $n$ samples are in a certain order, and for any particular order this is simply $1/n!$

The game ends after exactly $n$ steps if and only if the first $n-1$ samples are in increasing order, and the last sample is not. The last sample can occupy any of the $n$ positions except the highest, so there are $n-1$ such sequences; hence the probability that the game ends after exactly $n$ steps is $\frac{n-1}{n!}$.

And $A$ wins if the game ends after an even number of steps, so $A$'s probability of winning is $$\begin{align} \sum_{n=1}^\infty\frac{2n-1}{(2n!)} & = \sum_{n=1}^\infty\left(\frac{1}{(2n-1)!}-\frac{1}{(2n!)}\right) \\ & = \sum_{n=1}^\infty\frac{(-1)^{n+1}}{n!} \\ & = 1-\sum_{n=0}^\infty\frac{(-1)^n}{n!} \\ & = 1 - \frac{1}{e} \end{align}$$

You can solve this combinatorially, without using calculus. All you need to look at is the probability that the first $n$ samples are in a certain order, and for any particular order this is simply $1/n!$

The game ends after exactly $n$ steps if and only if the first $n-1$ samples are in increasing order, and the last sample is not. The last sample can occupy any of the $n$ positions except the highest, so there are $n-1$ such sequences; hence the probability that the game ends after exactly $n$ steps is $\frac{n-1}{n!}$.

And $A$ wins if the game ends after an even number of steps, so $A$'s probability of winning is $$\begin{align} \sum_{n=1}^\infty\frac{2n-1}{(2n!)} & = \sum_{n=1}^\infty\left(\frac{1}{(2n-1)!}-\frac{1}{(2n!)}\right) \\ & = \sum_{n=1}^\infty\frac{(-1)^{n+1}}{n!} \\ & = 1-\sum_{n=0}^\infty\frac{(-1)^n}{n!} \\ & = 1 - \frac{1}{e} \end{align}$$

This assumes nothing about the particular distribution of the samples, except that it is continuous. So the answer is the same whatever the distribution.

Source Link
TonyK
  • 425
  • 3
  • 5

You can solve this combinatorially, without using calculus. All you need to look at is the probability that the first $n$ samples are in a certain order, and for any particular order this is simply $1/n!$

The game ends after exactly $n$ steps if and only if the first $n-1$ samples are in increasing order, and the last sample is not. The last sample can occupy any of the $n$ positions except the highest, so there are $n-1$ such sequences; hence the probability that the game ends after exactly $n$ steps is $\frac{n-1}{n!}$.

And $A$ wins if the game ends after an even number of steps, so $A$'s probability of winning is $$\begin{align} \sum_{n=1}^\infty\frac{2n-1}{(2n!)} & = \sum_{n=1}^\infty\left(\frac{1}{(2n-1)!}-\frac{1}{(2n!)}\right) \\ & = \sum_{n=1}^\infty\frac{(-1)^{n+1}}{n!} \\ & = 1-\sum_{n=0}^\infty\frac{(-1)^n}{n!} \\ & = 1 - \frac{1}{e} \end{align}$$