# Generating functions...need some help here

• Jan 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:

$\displaystyle 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:
$\displaystyle X(\theta) = x_0 + x_1 \theta + x_2 \theta^2 + x_3 \theta^3 + ...$

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

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

How is this related to the very first equation?

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

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

$\displaystyle 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.
• Jan 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".
• Jan 31st 2008, 09:25 AM
CaptainBlack
Quote:

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

$\displaystyle 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:
$\displaystyle X(\theta) = x_0 + x_1 \theta + x_2 \theta^2 + x_3 \theta^3 + ...$

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

RonL
• Jan 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 $\displaystyle x_0, x_1, x_2, x_3...$ (which all add to 1).

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

Turning it around, we can now see a new random variable $\displaystyle \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, $\displaystyle 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 $\displaystyle \theta = 1$.

Am I correct?