# Generating Functions

• Apr 25th 2010, 01:21 PM
jjbrian
Generating Functions
A random variable X assumes only the values 0,1,2,3....., and the probabilities that X assumes these values are (2/3), (2/3)(1/3) , (2/3)(1/3)^2 , (2/3)(1/3)^3 , ................ respectively. Find the E(x) and Var(x).

E(X) = 1/2
Var(x) = 3/4

I dont know where to start. Can someone show me how this problem should be done?

F(z) = P(X=0) +P(X=1)z+(p(x=2)z^2 + .......
F(z) = (2/3) + (2/3)(1/3)(z) +(2/3)(1/3)^2 z^2 + .........
F'(z) = (2/3)(1/3) + 2(2/3)(1/3)^2 z + ...........
F''(z) = .................

I know that
E(X) = P'(1)
and
Var(X) = f''(1) + f'(1) - [f'(1)]^2
[/I]
• Apr 25th 2010, 01:46 PM
Moo
Hello,

Get inspired by this : Geometric distribution - Wikipedia, the free encyclopedia

Or consider the equality $\displaystyle \frac{1}{1-x}=\sum_{k=0}^\infty x^k$ and differentiate it as you wish to compute the series you're dealing with.
• Apr 25th 2010, 02:15 PM
jjbrian
Quote:

Originally Posted by Moo
Hello,

Get inspired by this : Geometric distribution - Wikipedia, the free encyclopedia

Or consider the equality $\displaystyle \frac{1}{1-x}=\sum_{k=0}^\infty x^k$ and differentiate it as you wish to compute the series you're dealing with.

Thanks alot. I was able to work out the problem. (Rofl)
• Apr 25th 2010, 02:28 PM
Soroban
Hello, jjbrian!

Quote:

A random variable $\displaystyle x$ assumes only the values $\displaystyle 0,1,2,3\,\hdots$
and the probabilities that $\displaystyle x$ assumes these values are
. . $\displaystyle (\tfrac{2}{3}),\; (\tfrac{2}{3})(\tfrac{1}{3}),\;(\tfrac{2}{3}(\tfra c{1}{3})^2,\; (\tfrac{2}{3})(\tfrac{1}{3})^3\; \hdots$ resp.

Find the $\displaystyle E(x)$ and $\displaystyle Var(x)$.

Book Answer: .$\displaystyle E(X) = \frac{1}{2},\;\;Var(x) = \frac{3}{4}$

We have: . $\displaystyle \begin{array}{c|c} n & P(n) \\ \hline \\[-3mm] 0 & \frac{2}{3} \\ \\[-3mm] 1 & (\frac{2}{3})(\frac{1}{3}) \\ \\[-3mm] 2 & (\frac{2}{3})(\frac{1}{3})^2 \\ \\[-3mm] 3 & (\frac{2}{3})(\frac{1}{3})^3 \\ \vdots & \vdots\end{array}$

$\displaystyle \begin{array}{cccccc}\text{We have:} & E(x) &=& 0(\frac{2}{3}) + 1(\frac{2}{3})(\frac{1}{3}) + 2(\frac{2}{3})(\frac{1}{3})^2 + 3(\frac{2}{3})(\frac{1}{3})^3 + \hdots & [1] \\ \\[-4mm] \text{Multiply by }\frac{1}{3}\!:& \frac{1}{3}E(x) &=& \qquad\;\;\; 0(\frac{2}{3})(\frac{1}{3}) + 1(\frac{2}{3})(\frac{1}{3})^2 + 2(\frac{2}{3})(\frac{1}{3})^2 + \hdots & [2]\end{array}$

$\displaystyle \text{Subtract [1] - [2]: }\;\tfrac{2}{3}E(x) \;=\;0(\tfrac{2}{3}) + (\tfrac{2}{3})(\tfrac{1}{3}) + (\tfrac{2}{3})(\tfrac{1}{3})^2 + (\tfrac{2}{3})(\tfrac{1}{3})^3 + \hdots$

. . $\displaystyle \text{And we have: }\;\tfrac{2}{3}E(x) \;=\;(\tfrac{2}{3})(\tfrac{1}{3})\underbrace{\bigg[1 + (\tfrac{1}{3}) + (\tfrac{1}{3})^2 +(\tfrac{1}{3})^3 + \hdots \bigg]}_{\text{Geometric series}}$

The geometric series has the sum: .$\displaystyle \frac{1}{1-\frac{1}{3}} \:=\:\frac{3}{2}$

Hence, we have: .$\displaystyle \frac{2}{3}E(x) \;=\;\left(\frac{2}{9}\right)\left(\frac{3}{2}\rig ht) \quad\Rightarrow\quad \frac{2}{3}E(x)\;=\;\frac{1}{3}$

. . Therefore: . $\displaystyle E(x) \;=\;\frac{1}{2}$