Geometric

This is the number of trials until a success is obtained in a sequence of Bernouill(p) trials.

P(X=k)=pqk-1 , k=1,2,3,...

E(X) = 1/p

Var(X)=(1-p)p-2

St. Petersburg Paradox: In a game, the player flips a fair coin successively until he gets a head.  If this occurs on the k th flip, the player wins 2k dollars. Therefore, if the outcome of the first flip is heads, the player wins $2. If the outcome of the first flip is tails but that of the second flip is heads, he wins $4. If the out come of the first two are tails but the third one heads, he will win $8, and so on. For example, to win
230= 1,073,741,824,
you shoud get 29 tails in a row followed by a head. The chance of this happening is 1 in 1,073,741,824, much less than 1 in a billion.

The question is:

To play this game , how much should a person, who is willing to play a fair game, pay?

To answer this question, let  X  be the amount of money the player wins.
Then 
is a random variable with the set of possible values
{2, 4, 8, ..., 2k, ...}
and
P(X=2k) = 2-k, k = 1, 2, 3, ...
Therefore
E(X) = 1+1+1+1+1+ ......

This is a game in which one always wins no matter how expensive it is to play.



Negative Binomial

This is the number of trials until r successes is obtained in a sequence of Bernouill(p) trials.

\begin{displaymath}P(X=k)=p \times \binom{k-1}{r-1} p^{r-1} q^{(k-r)}=
\binom{k-1}{r-1} p^{r} q^{(k-r)}\end{displaymath}

E(X) = r/p

Var(X)=r(1-p)p-2


In fact the Geometric is the special case where r=1.

Example: (Banach's matchbox problem) A pipe-smoking mathematican has two boxes of matches one in the left pocket, one in the right, what is the probability that when he discovers the right box is empty, there are j matches in the other box?

This can be solved with the Negative Binomial distribution with parameters $(r=N+1,p=\frac{1}{2})$ .
Here k=N-j+N+1, N denotes the number of matches in a match box. Note that r th success occurs at 
2N-j+1 trial.