Books Probability and Statistical Inference

The Moment-Generating Function Technique

Theorem 5.5

Let 𝑋1,𝑋2,…,𝑋𝑛{𝑋}_{1},{𝑋}_{2},\ldots ,{𝑋}_{𝑛} be 𝑛𝑛 independent random variables with respective moment-generating functions 𝑀1(𝑑),𝑀2(𝑑),…,𝑀𝑛(𝑑){𝑀}_{1}(𝑑),{𝑀}_{2}(𝑑),\ldots ,{𝑀}_{𝑛}(𝑑) where each 𝑀𝑖(𝑑){𝑀}_{𝑖}(𝑑) exists for all 𝑑𝑑 in some open interval (βˆ’h𝑖,h𝑖)(-{h}_{𝑖},{h}_{𝑖}) with h𝑖>0{h}_{𝑖}>0. If π‘Œ=βˆ‘π‘–=1π‘›π‘Žπ‘–π‘‹π‘–π‘Œ={\sum }_{𝑖=1}^{𝑛}{π‘Ž}_{𝑖}{𝑋}_{𝑖}, then

π‘€π‘Œ(𝑑)=βˆπ‘–=1𝑛𝑀𝑖(π‘Žπ‘–π‘‘),βˆ’h𝑖<π‘Žπ‘–π‘‘<hπ‘–βˆ€π‘–=1,…,𝑛.{𝑀}_{π‘Œ}(𝑑)=\prod _{𝑖=1}^{𝑛}{𝑀}_{𝑖}({π‘Ž}_{𝑖}𝑑),\quad -{h}_{𝑖}<{π‘Ž}_{𝑖}𝑑<{h}_{𝑖}\forall 𝑖=1,\ldots ,𝑛.
Proof

We have

π‘€π‘Œ(𝑑)=E[π‘’π‘‘π‘Œ]=E[π‘’π‘‘βˆ‘π‘–=1π‘›π‘Žπ‘–π‘‹π‘–]=E[π‘’π‘Ž1𝑑𝑋1β€¦π‘’π‘Žπ‘›π‘‘π‘‹π‘›].{𝑀}_{π‘Œ}(𝑑)=\mathbb{E}[{𝑒}^{π‘‘π‘Œ}]=\mathbb{E}[{𝑒}^{𝑑{\sum }_{𝑖=1}^{𝑛}{π‘Ž}_{𝑖}{𝑋}_{𝑖}}]=\mathbb{E}[{𝑒}^{{π‘Ž}_{1}𝑑{𝑋}_{1}}\ldots {𝑒}^{{π‘Ž}_{𝑛}𝑑{𝑋}_{𝑛}}].

Since 𝑋1,…,𝑋𝑛{𝑋}_{1},\ldots ,{𝑋}_{𝑛} are independent, by Theorem 5.3, we have

π‘€π‘Œ(𝑑)=E[π‘’π‘Ž1𝑑𝑋1]…E[π‘’π‘Žπ‘›π‘‘π‘‹π‘›]=βˆπ‘–=1𝑛𝑀𝑖(π‘Žπ‘–π‘‘).{𝑀}_{π‘Œ}(𝑑)=\mathbb{E}[{𝑒}^{{π‘Ž}_{1}𝑑{𝑋}_{1}}]\ldots \mathbb{E}[{𝑒}^{{π‘Ž}_{𝑛}𝑑{𝑋}_{𝑛}}]=\prod _{𝑖=1}^{𝑛}{𝑀}_{𝑖}({π‘Ž}_{𝑖}𝑑).
Corollary 5.1

Let 𝑋1,𝑋2,…,𝑋𝑛{𝑋}_{1},{𝑋}_{2},\ldots ,{𝑋}_{𝑛} be 𝑛𝑛 i.i.d.i.i.d. random variables with MGF 𝑀(𝑑)𝑀(𝑑) where βˆ’h<𝑑<h-h<𝑑<h for some h>0h>0. Then the MGF of π‘Œ=βˆ‘π‘–=1π‘›π‘‹π‘–π‘Œ={\sum }_{𝑖=1}^{𝑛}{𝑋}_{𝑖} is given by

π‘€π‘Œ(𝑑)=𝑀𝑛(𝑑),βˆ’h<𝑑<h.{𝑀}_{π‘Œ}(𝑑)={𝑀}^{𝑛}(𝑑),\quad -h<𝑑<h.

The MGF of the sample mean 𝑋𝑋 is given by

𝑀𝑋(𝑑)=𝑀𝑛(𝑑𝑛),βˆ’h<𝑑𝑛<h.{𝑀}_{𝑋}(𝑑)={𝑀}^{𝑛}\left(\frac{𝑑}{𝑛}\right),\quad -h<\frac{𝑑}{𝑛}<h.
Example 5.6

Recall that the MGF of Ber⁑(𝑝)\operatorname{Ber}(𝑝) is

𝑀(𝑑)=𝑝𝑒𝑑+(1βˆ’π‘),βˆ’βˆž<𝑑<∞.𝑀(𝑑)=𝑝{𝑒}^{𝑑}+(1-𝑝),\quad -\infty <𝑑<\infty .

And the MGF of Bin⁑(𝑛,𝑝)\operatorname{Bin}(𝑛,𝑝) is

𝑀(𝑑)=[𝑝𝑒𝑑+(1βˆ’π‘)]𝑛,βˆ’βˆž<𝑑<∞.𝑀(𝑑)={[𝑝{𝑒}^{𝑑}+(1-𝑝)]}^{𝑛},\quad -\infty <𝑑<\infty .

Let 𝑋1,…,π‘‹π‘›βˆΌBer⁑(𝑝){𝑋}_{1},\ldots ,{𝑋}_{𝑛}∼\operatorname{Ber}(𝑝) be i.i.d.i.i.d. and π‘Œ=𝑋1+…+π‘‹π‘›π‘Œ={𝑋}_{1}+\ldots +{𝑋}_{𝑛}. The MGF of 𝑋𝑖{𝑋}_{𝑖} is 𝑀(𝑑)=𝑝𝑒𝑑+(1βˆ’π‘)𝑀(𝑑)=𝑝{𝑒}^{𝑑}+(1-𝑝), so the MGF of π‘Œπ‘Œ is

π‘€π‘Œ(𝑑)=[𝑝𝑒𝑑+(1βˆ’π‘)]𝑛,βˆ’βˆž<𝑑<∞.{𝑀}_{π‘Œ}(𝑑)={[𝑝{𝑒}^{𝑑}+(1-𝑝)]}^{𝑛},\quad -\infty <𝑑<\infty .

This is the MGF of a binomial(n, p) random variable. Therefore, π‘ŒβˆΌBin⁑(𝑛,𝑝)π‘ŒβˆΌ\operatorname{Bin}(𝑛,𝑝). That is, the sum of 𝑛𝑛 independent Bernoulli random variables is a binomial random variable, which naturally agrees with our development of the binomial distribution by conducting 𝑛𝑛 independent Bernoulli trials.

Example 5.7

Recall that the MGF of exp⁑(θ)\exp (\theta ) is

𝑀(𝑑)=11βˆ’ΞΈπ‘‘,βˆ’1ΞΈ<𝑑<1ΞΈ.𝑀(𝑑)=\frac{1}{1-\theta 𝑑},\quad -\frac{1}{\theta }<𝑑<\frac{1}{\theta }.

and the MGF of Gamma⁑(α,θ)\operatorname{Gamma}(\alpha ,\theta ) is

𝑀(𝑑)=1(1βˆ’ΞΈπ‘‘)Ξ±,βˆ’1ΞΈ<𝑑<1ΞΈ.𝑀(𝑑)=\frac{1}{{(1-\theta 𝑑)}^{\alpha }},\quad -\frac{1}{\theta }<𝑑<\frac{1}{\theta }.

Let 𝑋1,…,π‘‹π‘›βˆΌExp⁑(ΞΈ){𝑋}_{1},\ldots ,{𝑋}_{𝑛}∼\operatorname{Exp}(\theta ) be i.i.d.i.i.d. and π‘Œ=𝑋1+…+π‘‹π‘›π‘Œ={𝑋}_{1}+\ldots +{𝑋}_{𝑛}. The MGF of 𝑋𝑖{𝑋}_{𝑖} is 𝑀(𝑑)=1/(1βˆ’ΞΈπ‘‘)𝑀(𝑑)=1/(1-\theta 𝑑), so the MGF of π‘Œπ‘Œ is

π‘€π‘Œ(𝑑)=1(1βˆ’ΞΈπ‘‘)𝑛,βˆ’1ΞΈ<𝑑<1ΞΈ.{𝑀}_{π‘Œ}(𝑑)=\frac{1}{{(1-\theta 𝑑)}^{𝑛}},\quad -\frac{1}{\theta }<𝑑<\frac{1}{\theta }.

This implies that π‘ŒβˆΌGamma⁑(𝑛,ΞΈ)π‘ŒβˆΌ\operatorname{Gamma}(𝑛,\theta ).

The MGF of 𝑋𝑋 is given by

𝑀𝑋(𝑑)=𝑀𝑛(𝑑𝑛)=1[1βˆ’(ΞΈ/𝑛)𝑑]𝑛,βˆ’1ΞΈ<𝑑𝑛<1ΞΈ.{𝑀}_{𝑋}(𝑑)={𝑀}^{𝑛}\left(\frac{𝑑}{𝑛}\right)=\frac{1}{{[1-(\theta /𝑛)𝑑]}^{𝑛}},\quad -\frac{1}{\theta }<\frac{𝑑}{𝑛}<\frac{1}{\theta }.

Therefore, π‘‹βˆΌGamma⁑(𝑛,ΞΈ/𝑛)π‘‹βˆΌ\operatorname{Gamma}(𝑛,\theta /𝑛).

Theorem 5.6
Let 𝑋1,…,𝑋𝑛{𝑋}_{1},\ldots ,{𝑋}_{𝑛} be 𝑛𝑛 independent chi-squared random variables with π‘Ÿ1,…,π‘Ÿπ‘›{π‘Ÿ}_{1},\ldots ,{π‘Ÿ}_{𝑛} degrees of freedom respectively. Let π‘Œ=𝑋1+…+π‘‹π‘›π‘Œ={𝑋}_{1}+\ldots +{𝑋}_{𝑛}. We have π‘ŒβˆΌΟ‡2(π‘Ÿ1+…+π‘Ÿπ‘›)π‘ŒβˆΌ{\chi }^{2}({π‘Ÿ}_{1}+\ldots +{π‘Ÿ}_{𝑛}).
Proof

The MGF of 𝑋𝑖{𝑋}_{𝑖} is given by

𝑀𝑖(𝑑)=1(1βˆ’2𝑑)π‘Ÿπ‘–/2,βˆ’12<𝑑<12.{𝑀}_{𝑖}(𝑑)=\frac{1}{{(1-2𝑑)}^{{π‘Ÿ}_{𝑖}/2}},\quad -\frac{1}{2}<𝑑<\frac{1}{2}.

By Theorem 5.5, we have

π‘€π‘Œ(𝑑)=βˆπ‘–=1𝑛𝑀𝑖(𝑑)=βˆπ‘–=1𝑛1(1βˆ’2𝑑)π‘Ÿπ‘–/2=1(1βˆ’2𝑑)(βˆ‘π‘–=1π‘›π‘Ÿπ‘–)/2.{𝑀}_{π‘Œ}(𝑑)=\prod _{𝑖=1}^{𝑛}{𝑀}_{𝑖}(𝑑)=\prod _{𝑖=1}^{𝑛}\frac{1}{{(1-2𝑑)}^{{π‘Ÿ}_{𝑖}/2}}=\frac{1}{{(1-2𝑑)}^{({\sum }_{𝑖=1}^{𝑛}{π‘Ÿ}_{𝑖})/2}}.

This is the exactly the MGF of Ο‡2(βˆ‘π‘–=1π‘›π‘Ÿπ‘–){\chi }^{2}({\sum }_{𝑖=1}^{𝑛}{π‘Ÿ}_{𝑖}).

Corollary 5.2
Let 𝑍1,…,π‘π‘›βˆΌπ’©(0,1){𝑍}_{1},\ldots ,{𝑍}_{𝑛}βˆΌπ’©(0,1) be i.i.d.i.i.d. and π‘Š=𝑍12+…+𝑍𝑛2π‘Š={𝑍}_{1}^{2}+\ldots +{𝑍}_{𝑛}^{2}. Then, π‘ŠβˆΌΟ‡2(𝑛)π‘ŠβˆΌ{\chi }^{2}(𝑛).
Proof
By Theorem 3.2, we know that 𝑍𝑖2βˆΌΟ‡2(1){𝑍}_{𝑖}^{2}∼{\chi }^{2}(1) for 𝑖=1,…,𝑛𝑖=1,\ldots ,𝑛. It then follows from Theorem 5.6 that π‘ŠβˆΌΟ‡2(𝑛)π‘ŠβˆΌ{\chi }^{2}(𝑛).
Corollary 5.3

If 𝑋1,…,𝑋𝑛{𝑋}_{1},\ldots ,{𝑋}_{𝑛} are independent and π‘‹π‘–βˆΌπ’©(μ𝑖,σ𝑖2){𝑋}_{𝑖}βˆΌπ’©({\mu }_{𝑖},{\sigma }_{𝑖}^{2}) for 𝑖=1,…,𝑛𝑖=1,\ldots ,𝑛, then

βˆ‘π‘–=1𝑛(π‘‹π‘–βˆ’ΞΌπ‘–)2σ𝑖2βˆΌΟ‡2(𝑛).\sum _{𝑖=1}^{𝑛}\frac{{({𝑋}_{𝑖}-{\mu }_{𝑖})}^{2}}{{\sigma }_{𝑖}^{2}}∼{\chi }^{2}(𝑛).
Proof

By Theorem 3.1, we know that

π‘‹π‘–βˆ’ΞΌπ‘–Οƒπ‘–βˆΌπ’©(0,1).\frac{{𝑋}_{𝑖}-{\mu }_{𝑖}}{{\sigma }_{𝑖}}βˆΌπ’©(0,1).

Then, this corollary follows from Corollary 5.2.

Exercises

Exercise 5.11

Let 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} be two independent random variables. Suppose that 𝑋1βˆΌΟ‡2(π‘Ÿ1){𝑋}_{1}∼{\chi }^{2}({π‘Ÿ}_{1}) and π‘Œ=(𝑋1+𝑋2)βˆΌΟ‡2(π‘Ÿ)π‘Œ=({𝑋}_{1}+{𝑋}_{2})∼{\chi }^{2}(π‘Ÿ) with π‘Ÿ1<π‘Ÿ{π‘Ÿ}_{1}<π‘Ÿ.

  1. Find the MGF of 𝑋2{𝑋}_{2}.
  2. What is the distribution of 𝑋2{𝑋}_{2}?
Solution

(a) We have

𝑀𝑋1(𝑑)=1(1βˆ’2𝑑)π‘Ÿ1/2andπ‘€π‘Œ(𝑑)=1(1βˆ’2𝑑)π‘Ÿ/2.{𝑀}_{{𝑋}_{1}}(𝑑)=\frac{1}{{(1-2𝑑)}^{{π‘Ÿ}_{1}/2}}\quad \text{and}\quad {𝑀}_{π‘Œ}(𝑑)=\frac{1}{{(1-2𝑑)}^{π‘Ÿ/2}}.

Meanwhile, since 𝑋1{𝑋}_{1} and 𝑋2{𝑋}_{2} are independent, we have

π‘€π‘Œ(𝑑)=𝑀𝑋1(𝑑)𝑀𝑋2(𝑑).{𝑀}_{π‘Œ}(𝑑)={𝑀}_{{𝑋}_{1}}(𝑑){𝑀}_{{𝑋}_{2}}(𝑑).

Therefore,

𝑀𝑋2(𝑑)=π‘€π‘Œ(𝑑)𝑀𝑋1(𝑑)=1(1βˆ’2𝑑)(π‘Ÿβˆ’π‘Ÿ1)/2.{𝑀}_{{𝑋}_{2}}(𝑑)=\frac{{𝑀}_{π‘Œ}(𝑑)}{{𝑀}_{{𝑋}_{1}}(𝑑)}=\frac{1}{{(1-2𝑑)}^{(π‘Ÿ-{π‘Ÿ}_{1})/2}}.

(b) We note that 𝑀𝑋2(𝑑){𝑀}_{{𝑋}_{2}}(𝑑) is the MGF of a chi-squared distribution with π‘Ÿβˆ’π‘Ÿ1π‘Ÿ-{π‘Ÿ}_{1} degrees of freedom. Therefore, 𝑋2βˆΌΟ‡2(π‘Ÿβˆ’π‘Ÿ1){𝑋}_{2}∼{\chi }^{2}(π‘Ÿ-{π‘Ÿ}_{1}).

Exercise 5.12
Let π‘βˆΌπ’©(0,1)π‘βˆΌπ’©(0,1) and π‘Š=𝑍2π‘Š={𝑍}^{2}. Use the MGF technique to show that π‘ŠβˆΌΟ‡2(1)π‘ŠβˆΌ{\chi }^{2}(1).
Proof

We compute the MGF of π‘Šπ‘Š:

π‘€π‘Š(𝑑)=E[π‘’π‘‘π‘Š]=E[𝑒𝑑𝑍2]=βˆ«βˆ’βˆžβˆžπ‘’π‘‘π‘§212Ο€π‘’βˆ’π‘§22 d𝑧=12Ο€βˆ«βˆ’βˆžβˆžexp⁑[(π‘‘βˆ’12)𝑧2] d𝑧=12Ο€βˆ«βˆ’βˆžβˆžexp⁑(βˆ’π‘§22β‹…11βˆ’2𝑑)⏟Consider𝒩(0,11βˆ’2𝑑) d𝑧=12Ο€2Ο€β‹…11βˆ’2𝑑=11βˆ’2𝑑.\begin{aligned}{𝑀}_{π‘Š}(𝑑)=\mathbb{E}[{𝑒}^{π‘‘π‘Š}]=\mathbb{E}[{𝑒}^{𝑑{𝑍}^{2}}] & ={\int }_{-\infty }^{\infty }{𝑒}^{𝑑{𝑧}^{2}}\frac{1}{\sqrt{2\pi }}{𝑒}^{-\frac{{𝑧}^{2}}{2}}\, \mathrm{d}𝑧 \\ & =\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }\exp \left[\left(𝑑-\frac{1}{2}\right){𝑧}^{2}\right]\, \mathrm{d}𝑧 \\ & =\frac{1}{\sqrt{2\pi }}{\int }_{-\infty }^{\infty }\underbrace{\exp \left(-\frac{{𝑧}^{2}}{2\cdot \frac{1}{1-2𝑑}}\right)}_{\text{Consider}𝒩\left(0,\frac{1}{1-2𝑑}\right)}\, \mathrm{d}𝑧 \\ & =\frac{1}{\sqrt{2\pi }}\sqrt{2\pi \cdot \frac{1}{1-2𝑑}} \\ & =\frac{1}{\sqrt{1-2𝑑}}.\end{aligned}

This is the MGF of a chi-squared distribution with 11 degree of freedom. Therefore, π‘ŠβˆΌΟ‡2(1)π‘ŠβˆΌ{\chi }^{2}(1).