Properties of the Distribution

Calculation of Mean, Variance, and Moment Generating Function

Calculating E( X ), the expectation or mean of the Poisson( [Maple Math] ) distribution.

> restart;

> with(plots):

> f:=x->PoissonPDF(lambda,x);

[Maple Math]

> EX:=simplify(sum(x*f(x),x=0..infinity));

[Maple Math]

Calculating Var( X ), the variance of the Poisson( [Maple Math] ) distribution.

We will employ the formula: Var( X ) = E( [Maple Math] ) - [Maple Math]

> E_X_SQ:=simplify(sum(x^2*f(x),x=0..infinity));

[Maple Math]

> VarX:=simplify(E_X_SQ-EX^2);

[Maple Math]

The Moment Generating Function (MGF) can be easily calculated via Maple.

Recall the moment generating function of a random variable X is defined

as M ( t ) = E( [Maple Math] ), provided this expectation exists.

> simplify(sum(exp(t*x)*f(x),x=0..infinity));

[Maple Math]

So the moment generating function for a Poisson( [Maple Math] ) random variable

is given by

M ( t ) = [Maple Math]

We will define M ( t ) as a function of t .

> M:=t->exp(lambda*(exp(t)-1));

[Maple Math]

The moment generating function provides us alternative ways to calculate the

mean and variance by way of the formula.

[Maple Math] (0) = E( [Maple Math] ) , where [Maple Math] ( t ) denotes the r th derivative of M ( t ) with respect to t .

This formula holds as long as M ( t ) exists in an open interval containing zero.

See, for example, Mathematical Statistics and Data Analysis by John A. Rice for

more on the moment generating function.

> M_p:=diff(M(t),t);

[Maple Math]

> simplify(M_p);

[Maple Math]

> simplify(subs(t=0,M_p));

[Maple Math]

And therefore if X is a Poisson( [Maple Math] ) variable, then E( X ) = [Maple Math] , which agrees with

what we found earlier. Now turning to the second moment.

> M_pp:=diff(M_p,t);

[Maple Math]

> simplify(subs(t=0,M_pp));

[Maple Math]

Therefore E( [Maple Math] ) = [Maple Math] , which again is in agreement with the value

calculated previously. The variance is now quickly calculated as

Var( X ) = E( [Maple Math] ) - [Maple Math]

= [Maple Math]

= [Maple Math]

Special Properties

You probably noticed in the previous animation that as [Maple Math] grew larger, the probability histogram for the Poisson( [Maple Math] ) distribution seemed to become increasingly more bell-shaped (i.e., normal). Look again at the animation for [Maple Math] varying from 1 to 15 with an overlayed normal curve.

> for n from 1 to 15 do

> num:=convert(evalf(n), string):

> tracker[n]:=textplot([18,0.3,`Lambda is `.num],color=blue):

> H[n]:=ProbHist(PoissonPDF(n,x),0..25,26):

> N[n]:=plot(NormalPDF(n,n,x),x = 0..25):

> P[n]:=display({H[n],N[n],tracker[n]}):

> od:

> display([seq(P[n], n=1..15)], insequence=true,title="Normal Approx. to the Poisson. Lambda is increasing from 1 to 15");

[Maple Plot]

Indeed, as [Maple Math] becomes larger , the Poisson( [Maple Math] ) distribution becomes increasingly

well approximated by the Normal( [Maple Math] , [Maple Math] ) distribution.

>