# Generating functions...need some help here

• January 31st 2008, 07:10 AM
chopet
Generating functions...need some help here
A textbook defines the generating function f of a random variable X as:

$f(\theta) = E[\theta^X] = \sum_{k} \theta^kP(X=k)$

Can anybody please explain that to me?

So far I know:
Generating function of random variable X can also be defined as:
$X(\theta) = x_0 + x_1 \theta + x_2 \theta^2 + x_3 \theta^3 + ...$

So if we do differentiation:
$X'(\theta) = x_1 + 2x_2 \theta + 3x_3 \theta^2 + ... = \sum_{k} kx_k \theta^{k-1}$

Taking $\theta = 1$,
$X'(1) = \sum_{k} kx_k = E[X]$

How is this related to the very first equation?

Any help is much appreciated.
• January 31st 2008, 07:29 AM
colby2152
Quote:

Originally Posted by chopet
A textbook defines the generating function f of a random variable X as:

$f(\theta) = E[\theta^X] = \sum_{k} \theta^kP(X=k)$

What is your question? In this scenario, the generating function is just the expectation of the probability mass function.
• January 31st 2008, 08:40 AM
chopet
ok. I am confused. I thought the equation was meant to be a generality of all cases, not just the case for "expectation of probability mass".
• January 31st 2008, 09:25 AM
CaptainBlack
Quote:

Originally Posted by chopet
A textbook defines the generating function f of a random variable X as:

$f(\theta) = E[\theta^X] = \sum_{k} \theta^kP(X=k)$

Can anybody please explain that to me?

So far I know:
Generating function of random variable X can also be defined as:
$X(\theta) = x_0 + x_1 \theta + x_2 \theta^2 + x_3 \theta^3 + ...$

Ask yourself: "What are the $x_i$'s here?"

RonL
• January 31st 2008, 04:32 PM
chopet
Lemme try to reconstruct my understanding after your inputs.

X is random variable 0,1,2,3,... with corresponding probability densities $x_0, x_1, x_2, x_3...$ (which all add to 1).

We define the generating function of X as:
$X(\theta) = x_0 + x_1 \theta + x_2 \theta^2 + ...$

Turning it around, we can now see a new random variable $\theta^X$ (this is the key part which i couldn't see before), and the generating function is also the Expectation of this new variable, $E(\theta^X)$

Of course, this is not to be confused with E(X), which is derived from the differentiation of the 1st equation, and equating $\theta = 1$.

Am I correct?