Statistics I – Chapters 5 and 6 Supplements, Fall 2012 1 / 46
Statistics I – Supplements for Chapters 5 and 6 Moment Generating Functions
Ling-Chieh Kung
Department of Information Management National Taiwan University
Statistics I Supplements for Chapters 5 and 6 Moment Generating - - PowerPoint PPT Presentation
Statistics I Chapters 5 and 6 Supplements, Fall 2012 1 / 46 Statistics I Supplements for Chapters 5 and 6 Moment Generating Functions Ling-Chieh Kung Department of Information Management National Taiwan University October 31, 2012
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 1 / 46
Department of Information Management National Taiwan University
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 2 / 46
◮ Today we will study an important mathematical tool for
◮ It is useful in deriving means and variances. ◮ It is useful in finding the distribution of a random variable. ◮ It is required to understand materials in Chapters 7 to 9.
◮ To memorize them, you do not need it. ◮ To know why they are true, you need it.
◮ But it may be hard...
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 3 / 46 Moment generating functions (MGF)
◮ Moment generating functions (MGF). ◮ MGF for distributions. ◮ MGF for independent sums.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 4 / 46 Moment generating functions (MGF)
◮ For a random variable, we typically use its mean and
◮ In general, we may use moments:
k ≡ E
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 5 / 46 Moment generating functions (MGF)
◮ Consider the uniform distribution Uni(0, 1):
◮ f(x) = 1. ◮ µ′
1 = E[X] = 1 2.
◮ µ′
2 = E[X2] =
0 x2dx = 1 3.
◮ µ′
3 = E[X3] =
0 x3dx = 1 4.
◮ In general, µ′
k = 1 k+1.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 6 / 46 Moment generating functions (MGF)
◮ The first moment:
◮ µ′
1 ≡ E[X1] = E[X] = µ. ◮ The second moment:
◮ µ′
2 ≡ E[X2].
◮ Moreover, σ2 = E[X2] − E[X]2 = µ′
2 − µ2. ◮ For most practical random variables, there are infinitely
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 7 / 46 Moment generating functions (MGF)
◮ When we use moments to describe distributions:
◮ When two RV have the same mean and variance (and thus the
◮ When their first, second, and third moments are all the same,
◮ When their first four moments are all the same...
◮ In all moments are the same:
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 8 / 46 Moment generating functions (MGF)
◮ The proposition is attractive but hard to use. ◮ It will be a nightmare to calculate all the (infinitely many)
◮ Fortunately, statisticians have found an easier way through
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 9 / 46 Moment generating functions (MGF)
◮ m(t) ≡ E[etX] is called the moment generating function
◮ Recall that you may do a Taylor expansion on etx as
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 10 / 46 Moment generating functions (MGF)
◮ With this, the MGF (assuming X is discrete) satisfies
1 + t2
2 + t3
3 + · · · .
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 11 / 46 Moment generating functions (MGF)
◮ Now consider the first-order derivative of m(t):
1 + t
2 + t2
3 + · · · . ◮ If we plug in t = 0 into the above equation, we get
1,
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 12 / 46 Moment generating functions (MGF)
◮ Now consider the second-order derivative of m(t):
2 + t
3 + · · · ◮ If we plug in t = 0 into the above equation, we get
2,
◮ The kth-order derivative generates the kth moment:
k.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 13 / 46 Moment generating functions (MGF)
◮ As our first example, we derive the MGF of a Poisson RV:
∞
∞
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 14 / 46 Moment generating functions (MGF)
∞
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 15 / 46 Moment generating functions (MGF)
◮ Let’s apply the MGF of the Poisson distribution:
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 16 / 46 Moment generating functions (MGF)
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 17 / 46 Moment generating functions (MGF)
◮ So with the MGF, it can (sometimes) be much easier to
◮ As another example, let’s consider the Bernoulli distribution.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 18 / 46 Moment generating functions (MGF)
◮ You may treat the MGF as a pure mathematical tool. ◮ It is an expectation and thus not a random variable. ◮ It generates moments through differentiation. ◮ It can be used to find means and variances.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 19 / 46 MGF for distributions
◮ Moment generating functions (MGF). ◮ MGF for distributions. ◮ MGF for independent sums.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 20 / 46 MGF for distributions
◮ There are two very important properties of MGFs:
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 21 / 46 MGF for distributions
◮ How may we apply the above proposition to derive the
◮ As an example, suppose for a random variable X we find its
◮ Also we know the MGF of Poi(λ) is eλ(et−1). ◮ Then we may conclude that X ∼ Poi(4).
◮ In other words, we need to first find the MGF or those
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 22 / 46 MGF for distributions
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 23 / 46 MGF for distributions
◮ Let’s try the exponential distribution.
λ
0 =
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 24 / 46 MGF for distributions
◮ The mean and variance may then be derived:
λ (λ−t)2 and m′(0) = E[X] = 1 λ.
λ (λ−t)3 and m′′(0) = E[X2] = 2 λ2.
1 λ2.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 25 / 46 MGF for distributions
◮ Let’s try the uniform distribution.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 26 / 46 MGF for distributions
◮ Let’s try the normal distribution.
2 t2 = exp
◮ Suppose this is true, would you verify that the mean and
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 27 / 46 MGF for distributions
−∞
−∞
−∞
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 28 / 46 MGF for distributions
2 t2 = exp
2 t2
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 29 / 46 MGF for distributions
2 t2 ∞
−∞
2 t2,
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 30 / 46 MGF for distributions
◮ Now we can show that the mean and variance of a normal
2 t2 and m′(0) = µ.
2 t[σ2 + (µ + σ2t)2] and
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 31 / 46 MGF for distributions
etb−eta t(b−a)
λ λ−t
2 t2
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 32 / 46 MGF for independent sums
◮ Moment generating functions (MGF). ◮ MGF for distributions. ◮ MGF for independent sums.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 33 / 46 MGF for independent sums
◮ MGFs are particularly useful for deriving the distribution of
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 34 / 46 MGF for independent sums
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 35 / 46 MGF for independent sums
◮ Let’s apply the proposition on the binomial distribution.
i=1 Xi ∼ Bi(n, p). Let the MGF of Xi
i=1 mi(t) = [pet + (1 − p)]n.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 36 / 46 MGF for independent sums
◮ Now let’s try to prove that the sum of independent
i=1 Xi ∼ Gamma(n, 1 λ).
β 1−βt, we have
β
hdx.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 37 / 46 MGF for independent sums
β):
h
λ λ−t = 1 1− t
λ . As X is an independent sum of Xis, the MGF
λ
λ.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 38 / 46 MGF for independent sums
◮ Now we are ready to derive some very important properties
◮ The linear function of a normal RV is normal. ◮ The linear combination of independent normal RVs is normal. ◮ The standardization of a normal RV. ◮ The distribution of a sample mean from a normal population.
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 39 / 46 MGF for independent sums
◮ Consider a linear function of a normal RV:
2 t2. By
2 (at)2 = e(aµ+b)t+ (aσ)2 2
t2,
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 40 / 46 MGF for independent sums
◮ Consider a linear combination of independent normal RVs:
n
i=1 a2 i σ2 i
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 41 / 46 MGF for independent sums
n
1σ2 1
nσ2 n
1σ2 1 + · · · + a2 nσ2 n
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 42 / 46 MGF for independent sums
◮ Consider the standardization of a normal RV:
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 43 / 46 MGF for independent sums
◮ The sample mean is one of the most important statistics.
i=1 Xi
◮ A sample mean is also a random variable. ◮ We have computed its mean and variance. Suppose the
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 44 / 46 MGF for independent sums
◮ When the sample mean is draw from a normal population:
◮ The sample mean of a normal population is also normal. ◮ More about sample means and sampling distributions will be
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 45 / 46 MGF for independent sums
N−1
N )
Statistics I – Chapters 5 and 6 Supplements, Fall 2012 46 / 46 MGF for independent sums
a+b 2 (b−a)2 12 etb−eta t(b−a)
1 λ 1 λ2 λ λ−t
2 t2
1 1−βt)α
2