# Connexions

You are here: Home » Content » Important Examples of Expectation

### Lenses

What is a lens?

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

#### In these lenses

• eScience, eResearch and Computational Problem Solving

This module is included inLens: eScience, eResearch and Computational Problem Solving
By: Jan E. OdegardAs a part of collection: "Random Processes"

Click the "eScience, eResearch and Computational Problem Solving" link to see all content selected in this lens.

### Recently Viewed

This feature requires Javascript to be enabled.

# Important Examples of Expectation

Module by: Nick Kingsbury. E-mail the author

Summary: This module gives some important examples of expectation.

We get Moments of a pdf by setting gX=Xn g X X n in this previous equation,

## nth order moment

EXn=xn fX xdx X n x x n fX x
(1)
• n=1 n 1 : 1st order moment, Ex x = Mean value
• n=2 n 2 : 2nd order moment, Ex2 x 2 = Mean-squared value (Power or energy)
• n>2 n 2 : Higher order moments, Exn x n , give more detail about fX x fX x .

## Central Moments

Central moments are moments about the centre or mean of a distribution,

### nth order central moment

EXX-n=xX-n fX xdx X X n x x X n fX x
(2)
Some important parameters from central moments of a pdf are:
• Variance, n=2 n 2 :
σ2=EXX-2=xX-2 fX xdx=x2 fX xdx2X-x fX xdx+X-2 fX xdx=EX22X-2+X-2=EX2X-2 σ 2 X X 2 x x X 2 fX x x x 2 fX x 2 X x x fX x X 2 x fX x X 2 2 X 2 X 2 X 2 X 2
(3)
• Standard deviation, σ=variance σ variance .
• Skewness, n=3 n 3 :
γ=EXX-3σ3 γ X X 3 σ 3
(4)
γ=0 γ 0 if the pdf of XX is symmetric about X- X , and becomes more positive if the tail of the distribution is heavier when X>X- X X .
• Kurtosis (or excess), n=4 n 4 :
κ=EXX-4σ43 κ X X 4 σ 4 3
(5)
κ=0 κ 0 for a Gaussian pdf and becomes more positive for distributions with heavier tails.

### Note:

Skewness and kurtosis are normalized by dividing the central moments by appropriate powers of σσ to make them dimensionless. Kurtosis is usually offset by -3-3 to make it zero for Gaussian pdfs.

## Example: Central Moments of a Normal Distribution

The normal (or Gaussian) pdf with zero mean is given by:

fX x=12πσ2ex22σ2 fX x 1 2 σ 2 x 2 2 σ 2
(6)
What is the nnth order central moment for the Gaussian?

Since the mean is zero, the nnth order central moment is given by

EXn=xn fX xdx=12πσ2xnex22σ2dx X n x x n fX x 1 2 σ 2 x x n x 2 2 σ 2
(7)
fX x fX x is a function of x2 x 2 and therefore is symmetric about zero. So all the odd-order moments will integrate to zero (including the lst-order moment, giving zero mean). The even-order moments are then given by:
EXn=22πσ20xnex22σ2dx X n 2 2 σ 2 x 0 x n x 2 2 σ 2
(8)
where nn is even. The integral is calculated by substituting u=x22σ2 u x 2 2 σ 2 to give:
0xnex22σ2dx=122σ2n+120un12eudu=122σ2n+12Γn+12 x 0 x n x 2 2 σ 2 1 2 2 σ 2 n 1 2 u 0 u n 1 2 u 1 2 2 σ 2 n 1 2 Γ n 1 2
(9)
Here Γz Γ z is the Gamma function, which is defined as an integral for all real z>0 z 0 and is rather like the factorial function but generalized to allow non-integer arguments. Values of the Gamma function can be found in mathematical tables. It is defined as follows:
Γz=0uz1eudu Γ z u 0 u z 1 u
(10)
and has the important (factorial-like) property that
z,z0:Γz+1=zΓz z z 0 Γ z 1 z Γ z
(11)
z,zZ(z>0):Γz+1=z! z z z 0 Γ z 1 z
(12)
The following results hold for the Gamma function (see below for a way to evaluate Γ12 Γ 1 2 etc.):
Γ12=π Γ 1 2
(13)
Γ1=1 Γ 1 1
(14)
and hence
Γ32=π2 Γ 3 2 2
(15)
Γ2=1 Γ 2 1
(16)
Hence
EXn={0  if  n=odd1π2σ2n2Γn+12  if  n=even X n 0 n odd 1 2 σ 2 n 2 Γ n 1 2 n even
(17)
• Valid pdf, n=0 n 0 :
EX0=1πΓ12=1 X 0 1 Γ 1 2 1
(18)
as required for a valid pdf.

### Note:

The normalization factor 12πσ2 1 2 σ 2 in the expression for the pdf of a unit variance Gaussian (e.g. Equation 6) arises directly from the above result.
• Mean, n=1 n 1 :
EX=0 X 0
(19)
so the mean is zero.
• Variance, n=2 n 2 :
EXX-2=EX2=1π(2σ2)Γ32=1π(2σ2)π2=σ2 X X 2 X 2 1 2 σ 2 Γ 3 2 1 2 σ 2 2 σ 2
(20)
Therefore standard deviation = variance=σ variance σ .
• Skewness, n=3 n 3 :
EX3=0 X 3 0
(21)
so the skewness is zero.
• Kurtosis, n=4 n 4 :
EXX-4=EX4=1π2σ22Γ52=1π2σ223π4=3σ4 X X 4 X 4 1 2 σ 2 2 Γ 5 2 1 2 σ 2 2 3 4 3 σ 4
(22)
Hence
κ=EXX-4σ43=33=0 κ X X 4 σ 4 3 3 3 0
(23)

## Evaluation of the Gamma Function

From the definition of ΓΓ and substituting u=x2 u x 2 :

Γ12=0u12eudu=0x-1ex22xdx=20ex2dx=ex2dx Γ 1 2 u 0 u 1 2 u x 0 x -1 x 2 2 x 2 x 0 x 2 x x 2
(24)
Using the following squaring trick to convert this to a 2-D integral in polar coordinates:
Γ212=ex2dxey2dy=e(x2+y2)dxdy=ππ0er2rdrdθ=2π(12)er2|0=π Γ 1 2 2 x x 2 y y 2 y x x 2 y 2 θ r 0 r 2 r 2 0 1 2 r 2
(25)
and so (ignoring the negative square root):
Γ12=π1.7725 Γ 1 2 1.7725
(26)
Hence, using Γz+1=zΓz Γ z 1 z Γ z :
Γ32527292=12π34π158π10516π Γ 3 2 5 2 7 2 9 2 1 2 3 4 15 8 105 16
(27)
The case for z=1 z 1 is straightforward:
Γ1=0u0eudu=eu|0=1 Γ 1 u 0 u 0 u 0 u 1
(28)
so
Γ2345=12624 Γ 2 3 4 5 1 2 6 24
(29)

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need an account to use 'My Favorites'.

| A lens I own (?)

#### Definition of a lens

##### Lenses

A lens is a custom view of the content in the repository. You can think of it as a fancy kind of list that will let you see content through the eyes of organizations and people you trust.

##### What is in a lens?

Lens makers point to materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

##### Who can create a lens?

Any individual member, a community, or a respected organization.

##### What are tags?

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks