Professional Documents
Culture Documents
Chapter 3
Moments of a Distribution
Expectation
• Recall that the Lebesgue measure λ(A) for some set A gives the
length/area/volume of the set A. If A = (3; 7), then λ(A) =|3 -7|= 4.
• The value of the Lebesgue integral is the limit as the yi's are pushed
closer together. That is, we break the y-axis into a grid using {yn} and
break the x-axis into the corresponding grid {An} where
Ai = {x : f (x) є [yi; yi+1)}.
1
RS - Chapter 3 - Moments
However, there are functions for which the Lebesgue integrals are
defined but not the Riemann integrals.
2
RS - Chapter 3 - Moments
Expected Value
Consider our probability space (Ω, Σ, P) . Take an event (a set A of ω є
Ω) and X, a RV, that assigns real numbers to each ω є A.
Expected Value
• Now with the concept of the Lebesgue integral, we take the possible
values {xi} and construct a grid on the y-axis, which gives a
corresponding grid on the x-axis in A, where
Ai = {ω є A: X(ω) ∈ [xi; xi+1)}.
Let the elements in the x-axis grid be Ai. The weighted average is
n n n
x P[ A ] x P
i 1
i i
i 1
i X [ X xi ] x
i 1
i f X ( xi )
3
RS - Chapter 3 - Moments
Definition
Let X denote a discrete RV with probability function p(x) (probability
density function f(x) if X is continuous) then the expected value of X,
E(X) is defined to be:
E X xp x xi p xi
x i
Interpretation of E(X)
1. The expected value of X, E(X), is the center of gravity of the
probability distribution of X.
2. The expected value of X, E(X), is the long-run average value of X.
(To be discussed later: Law of Large Numbers)
0.4
0.3
0.2
0.1
0
0 1 2 3 4 5 6 7
E(X)
4
RS - Chapter 3 - Moments
n
p x p x 1 p
n x
x 0,1, 2, 3, K , n
x
n n
n
E X xp x x p x 1 p
n x
x0 x 0 x
n
n
x p x 1 p
n x
x 1 x
n
n!
x p x 1 p
n x
x 1 x ! n x !
Example: Solution
n n
n
E X xp x x p x 1 p
n x
x 0 x 0 x
n
n
x p x 1 p
n x
x 1 x
n
n!
x p x 1 p
n x
x 1 x ! n x !
n
n!
p x 1 p
n x
x 1 x 1 ! n x !
n! n!
p1 1 p p 2 1 p
n 1 n2
0! n 1 ! 1! n 2 !
n! n!
K p n 1 1 p pn
n 2 !1! n 1!0!
5
RS - Chapter 3 - Moments
Example: Solution
n 1 ! n 1 ! p 1 1 p n 2
p 0 1 p
n 1
np
0 ! n 1 ! 1! n 2 !
n 1 ! p n 2 1 p n 1 ! p n 1
K
⋯
n 2 !1! n 1 !0 !
n 1 0 n 1 1
p 1 p p 1 p
n 1 n2
np
0 1
n 1 n 1
⋯
K p
n2
1 p n 1
p
n 2 n 1
n p 1
n 1
n p p 1 p
n 1
np
e x x0
f x
0 x0
x e
x
We will determine dx
udv uv vdu
6
RS - Chapter 3 - Moments
Hence du dx and v e x
1
x e dx xe x e x dx xe x e x
x
Thus
x 1
E X x e
x
dx xe e x
0
0 0
1 1
0 0 0
Summary: If X has an exponential distribution with parameter then:
1
EX
7
RS - Chapter 3 - Moments
1 z2
Hence EX z e 2 dz
2
1 2
2
z z2
e 2 dz ze dz
2 2
1 z22 2
z
Now e dz 1 and ze 2 dz 0
2
T hus E X
8
RS - Chapter 3 - Moments
1 1
1
0
1
x e x dx
1
9
RS - Chapter 3 - Moments
1
E X
2. Chi-square () distribution: = /2, = ½.
E X 2
1
2
0.3
0.25
0.2
0.15
0.1
0.05
0
0 2 4 6 8 10
EX
10
RS - Chapter 3 - Moments
0.2
0.15
0.1
0.05
0
0 5 10 15 20 25
1
EX
0.14
0.12
0.1
0.08
0.06
0.04
0.02
0
0 5 10 15 20 25
E X
11
RS - Chapter 3 - Moments
Expectation of a function of a RV
• Let X denote a discrete RV with probability function p(x) (or pdf f(x)
if X is continuous) then the expected value of g(X), E[g(X)], is defined
to be:
E g X g x p x g x p x
x i
i i
Expectation of a function of a RV
Example: Suppose X has a uniform distribution from 0 to b. Then:
1 0 x b
f x b
0 x 0, x b
Find the expected value of A = X2 .
If X is the length of a side of a square (chosen at random form 0 to
b) then A is the area of the square
b
b
1 x3 b 3 03 b 2
E X x f x dx x b a dx b
2 2 2 1
a 3 0
3 b 3
12
RS - Chapter 3 - Moments
Definition: Median
The median of a random variable X is the unique number m that satisfies
the following inequalities:
P(X ≤ m) ≥ ½ and P(X≥ m) ≥ ½.
f X ( x ) dx f
m
X ( x ) dx 1 / 2
An optimality property
A median is also a central point which minimizes the average of the
absolute deviations. That is, a value of c that minimizes
E(|X – c|)
is the median of the probability distribution of the random variable X.
13
RS - Chapter 3 - Moments
e x x0
f x
0 x0
The median m solves the following integral of X:
f
m
X ( x )dx 1 / 2
e dx e dx e |m e 1 / 2
x x x m
m m
x s
if x x s 0
f ( x ) x 1
0 if x 0
The median m solves the following integral of X:
m
f X ( x ) dx 1 / 2
x s x ( 1 ) 1
x x
( 1 )
dx x s dx x s C
m
1
m
( 1) 1
x s x C |m x s m 1 / 2 m x s 21 /
14
RS - Chapter 3 - Moments
15
RS - Chapter 3 - Moments
20 E X
2
var X 20 E X
2 2
30 30
• A popular measure of skewness: 1
3 20
3 2
16
RS - Chapter 3 - Moments
30 0, 0
0 .0 7
0 .0 6
0 .0 5
0 .0 4
0 .0 3
0 .0 2
0 .0 1
0
0 5 10 15 20 25 30 35
30 0, 1 0
0 .0 6
0 .0 5
0 .0 4
0 .0 3
0 .0 2
0 .0 1
0
0 5 1 0 1 5 2 0 2 5 3 0 3 5
• From horse race betting and from U.S. state lotteries there is evidence
supporting the contention that gamblers are not necessarily risk-lovers
but skewness-lovers: Long shots are overbet (positve skewness loved!).
17
RS - Chapter 3 - Moments
40 40
• The measure of (excess) kurtosis: 2 3 3
4 20
2
• Distributions:
1) Mesokurtic distribution
0 .0 9
0 .0 8
0, 40 moderate in size
0 .0 7
0 .0 6
0 .0 5
0 .0 4
0 .0 3
0 .0 2
0 .0 1
0
0 5 1 0 1 5 2 0 2 5 3 0 3 5
0
0 2 0 4 0 6 0 8 0
3) Leptokurtic distribution
0, 40 large in size
0
0 2 0 4 0 6 0 8 0
18
RS - Chapter 3 - Moments
1 0 x 1
f x
0 x 0, x 1
x f x dx x 12
k k
0
k 1dx
0
x f x dx x
k k
0
k
1
2 1dx
0
m a k in g th e s u b s titu tio n w x 1
2
12
1
1 k 1 k 1
2
w k 1 2 1
k w dw
0 k
2
12 k 1 12 k 1
1
1 1
k 1
2k k 1 if k even
k 1
2 k 1
0 if k odd
19
RS - Chapter 3 - Moments
1 1 1 1
H e n c e 20 , 30 0 , 40 4
2 3 1 2
2
2 5 8 0
1
Thus, v a r X 20
12
1
The standard deviation var X 20
12
30
The measure of skewness 1 0
3
40 1 80
The measure of kurtosis 1 4 3 3 1.2
1 12
2
These measures are more robust (to outliers) estimators of scale than the
sample variance or standard deviation.
20
RS - Chapter 3 - Moments
c f x dx c
The proof for discrete random variables is similar.
Proof
if g X aX b then E aX b ax b f x dx
a xf x dx b f x dx
aE X b
21
RS - Chapter 3 - Moments
Proof:
var X E X x f x dx
2 2
x 2 x f x dx
2 2
x f x dx 2 xf x dx f x dx
2 2
EX 2
2 E X
2 2 12
Proof:
aX b E aX b aE X b a b
var aX b E aX b aX b
2
E aX b a b
2
E a 2 X
2
a 2 E X a 2 var X
2
22
RS - Chapter 3 - Moments
23
RS - Chapter 3 - Moments
MGF: Examples
n
p x p x 1 p
n x
x 0,1, 2,K , n
x
The MGF of X , mX(t) is:
mX t E etX etx p x
x
n
n
etx p x 1 p
n x
x 0 x
n
t x
n n
n
e p 1 p a x b n x
n x
x 0 x x 0 x
n
a b et p 1 p
n
MGF: Examples
x
p x e x 0,1, 2,K
x!
The MGF of X , mX(t) is:
x x 0 x!
e
x
t
ux
e using eu
t
e ee
x 0 x! x 0 x !
e
et 1
24
RS - Chapter 3 - Moments
MGF: Examples
3. The Exponential distribution (parameter )
e x x0
f x
0 x0
The MGF of X , mX(t) is:
mX t E e
tX
e f x dx e
tx tx
e x dx
0
e t x
e t x dx
0 t 0
t
t
undefined t
MGF: Examples
4. The Standard Normal distribution ( = 0, = 1)
1 x22
f x e
2
The MGF of X , mX(t) is:
mX t E e
tX
e f x dx
tx
1 x22
e
tx
e dx
2
1 x2 22 tx
2
e dx
25
RS - Chapter 3 - Moments
MGF: Examples
2 a
e 2 a dx 1 for all a 0, b We have
completed
the square
1 x222tx t2 1 x222txt2
mX t e dx e
2
e dx
2 2
t2 1 x t 2 t2
e 2
e 2 dx e 2
2
This is 1
MGF: Examples
4. The Gamma distribution (parameters , )
x 1 e x x0
f x
0 x0
1 x
e tx
x e dx
0
1 t x
x e dx
0
26
RS - Chapter 3 - Moments
MGF: Examples
We use the fact
b a a 1 bx
0 a x e dx 1 for all a 0, b 0
1 t x
mX t x e dx
0
t 1 t x
t 0
x e dx
t
Equal to 1
The Chi-square distribution with degrees of freedom =/2, =½):
mX t 1 2t
2
MGF: Properties
1. mX(0) = 1
m X t E e tX , hence m X 0 E e 0 X E 1 1
Note: The MGFs of the following distributions satisfy the property
mX(0) = 1
n
i) B in o m ial D ist'n m X t e t p 1 p
iii) E x p o n en tial D ist'n m X t
t
t2
iv) S td N o rm al D ist'n m X t e 2
v) G am m a D ist'n m X t
t
27
RS - Chapter 3 - Moments
MGF: Properties
2.
mX t E etX
MGF: Properties
dk
3. mXk
0 k m X t k
dt t0
Now
and m X 0 1
and m X 0 2
continuing we find m X
k
0 k
28
RS - Chapter 3 - Moments
pe
n 1
m X t n e t p 1 p t
0 n e p 1 p pe np
n 1
m X 0 0
1
m X t np n 1 e t p 1 p e p e e et
n2 n 1
t t t
p 1 p
n2
npe t e t p 1 p n 1 e t p e t p 1 p
e p 1 p
n2
npe t t
ne t p 1 p
m 'X' ( 0 ) np [ np 1 p ] np [ np q ] n 2 p 2 npq 2
et 1
et 1 t
mX t e e e
t
mX t e
et 1 2 e e 1 2 t e e 1 t
et 1 t t t
e 1 2 t
e t 2 e e t 1
t t
e 1 t
m X t 2 e
e t 1 2 t
e t 3 e
e t 1 t
2e
e t 1 3 t
e t 1 2 t
e t 1 t
3e 3 2 e e
29
RS - Chapter 3 - Moments
1 mX 0 e
e0 1 0
2 mX 0 2 e
e e 1 0 2
e0 1 0 0
1 t 1 t
2 2
m X t 2 t 1 2 t
3 3
X t 2 3 t 1 2 3 t
4 4
m
m X4 t 2 3 4 t 1 4 ! t
5 5
m Xk t k ! t
k 1
30
RS - Chapter 3 - Moments
2
2 mX 0 2
3
2
k!
k mXk 0 k !
k 1
k
We can calculate the following popular descriptive statistics:
- σ2 = μ02 = μ2 – μ2 = (2/λ2) – (1/λ)2 = (1/λ)2
- γ1= μ03 /σ3 = (2/λ3) / [(1/λ)2]3/2 = 2
- γ2= μ04/σ4 – 3 = (9/λ4) / [(1/λ)4] – 3 = 6
1 1
mX t 1 u u2 u3 L
t 1 t 1 u
t t2 t3
1 L
2 3
31
RS - Chapter 3 - Moments
If k is odd: k = 0.
or 2k
2 k !
2k k !
2! 4!
T hus 1 0, 2 1, 3 0, 4 2 3
2 2 2 !
32
RS - Chapter 3 - Moments
T h en l X 0 ln m X 0 ln 1 0
1 mX t mX 0
l X t mX t l X 0 1
mX t mX t mX 0
mX t mX t mX t
2
l X t
mX t
2
mX 0 mX 0 mX 0
2
l X 0 2 1 2
2
mX 0
2
Thus lX (t) = ln mX(t) is very useful for calculating the mean and
variance of a random variable
1. l X 0
2. l X 0 2
33
RS - Chapter 3 - Moments
e p q
n n
m X t et p 1 p t
l X t ln mX t n ln e p q
t
1 1
l X t n et p l X 0 n p np
e pq
t
pq
l X t n
e t p et p q e t p et p
e p q
2
t
p p q p p
2 l X 0 n npq
p q
2
mX t e
et 1
l X t ln mX t et 1
l X t et l X 0
l X t et 2 l X 0
34
RS - Chapter 3 - Moments
t
1
l X t 1 t 1
2
t
2
1 1
Thus l X 0 and 2 l X 0
2
l X t ln mX t t2
2
l X t t , l X t 1
35
RS - Chapter 3 - Moments
t
2
Hence l X 0 and 2 l X 0 2
mX t 1 2t
2
l X t ln mX t ln 1 2t
2
1
l X t 2
2 1 2t 1 2t
2
l X t 11 2t 2
2
1 2t
2
36
RS - Chapter 3 - Moments
Characteristic functions
Definition: Characteristic Function
Let X denote a random variable. Then, the characteristic function of X,
φX(t) is defined by:
X ( t ) E ( e itx )
Since eitx = cos(xt) + i sin(xt) and ║eitx║≤ 1, then φX(t) is defined for all
t. Thus, the characteristic function always exists, but the MGF need not
exist.
k X (t )
Calculation of moments: |t 0 i k k
t
37