MATH F113: Probability & Statistics
Second Semester 2024-2025
Divyum Sharma
Assistant Professor
Department of Mathematics
BITS Pilani
Lecture 8 Summary
1. Moments about origin, moments about mean;
shortcut formula for variance
2. Moment generating function
Probability & Statistics Divyum Sharma 1
Recall
Definition
The moment generating function of a random
variable X is a function of an ordinary real variable
t defined by
mX (t) = E (e tX ).
Probability & Statistics Divyum Sharma 2
Recall: Theorem
We have 1
X Mk
mX (t) = tk,
k!
k=0
provided the series on the RHS converges in some
neighborhood of t = 0. As a consequence,
k d k mX (t)
Mk = E (X ) = .
dt k t=0
(This justifies the name ‘moment generating
function’.)
Probability & Statistics Divyum Sharma 3
Theorem (Uniqueness theorem for mgf). If
two random variables have the same mgf (in a
neighbourhood of t = 0), then they must have the
same distribution. In other words, the mgf of a
random variable determines its distribution.
Probability & Statistics Divyum Sharma 4
Binomial Distribution
Probability & Statistics Divyum Sharma 5
Binomial Distribution
A dichotomous trial is a random experiment with
exactly 2 outcomes. In general, we may call them S
(success) and F (failure).
Probability & Statistics Divyum Sharma 5
Binomial Distribution
A dichotomous trial is a random experiment with
exactly 2 outcomes. In general, we may call them S
(success) and F (failure).
Example.
• Toss a coin and observe if it lands heads or tails
• For any random experiment, if A is an event,
consider whether A occurred or not
Probability & Statistics Divyum Sharma 5
Binomial Distribution
A dichotomous trial is a random experiment with
exactly 2 outcomes. In general, we may call them S
(success) and F (failure).
Example.
• Toss a coin and observe if it lands heads or tails
• For any random experiment, if A is an event,
consider whether A occurred or not
Remark. Rolling a die and observing the number on
the top face is not a dichotomous trial.
Probability & Statistics Divyum Sharma 5
Binomial experiment: An experiment for which
the following conditions are satisfied is called a
binomial experiment.
1. The experiment consists of a sequence of n
smaller experiments called trials. Here, n is fixed
in advance.
2. Each trial is a dichotomous trial. The two
possible outcomes (S (success) and F (failure))
are the same for each trial.
3. The trials are independent.
4. The probability P(S) of success is constant from
trial to trial. We denoted it by p.
Probability & Statistics Divyum Sharma 6
Definition
The binomial random variable X associated with a
binomial experiment consisting of n trials is defined
as
X = the number of S’s among the n trials.
We will write X ⇠ Bin(n, p) to indicate that X is a
binomial rv based on n trials with success probability
p. The pmf of a binomial rv is denoted by b(x; n, p).
Probability & Statistics Divyum Sharma 7
Theorem
We have
(
n
x p x (1 p)n x , if x = 0, 1 . . . , n,
b(x; n, p) =
0 otherwise.
Pn
Note. x=0 b(x; n, p) = (p + (1 p))n = 1
Probability & Statistics Divyum Sharma 8
Probability histogram for a Bin(20, 0.5) rv
Probability & Statistics Divyum Sharma 9
Probability histogram for a Bin(20, 0.3) rv
Probability & Statistics Divyum Sharma 10
Question
Suppose a die is tossed 5 times independently.
What is the probability of getting exactly 2 fours?
Probability & Statistics Divyum Sharma 11
Question
Suppose a die is tossed 5 times independently.
What is the probability of getting exactly 2 fours?
Solution. Let X denote the number of fours among
the 5 tosses. Then X follows a binomial distribution
with n = 5 and p = 1/6. Hence
✓ ◆ ✓ ◆2 ✓ ◆3
5 1 1
b(2; 5, 1/6) = 1 = 0.161.
2 6 6
Probability & Statistics Divyum Sharma 11
Probability & Statistics Divyum Sharma 12
Probability & Statistics Divyum Sharma 13
(c) The event is that either in 4 trials you get all 4
non-seconds or in 5 trials, you get 4 non-seconds.
This is equivalent to A [ B, where A: in 4 trials there
are 0 seconds, B: in 5 trials there is 1 second. Note
that A and B are mutually exclusive.
Probability & Statistics Divyum Sharma 14
Probability & Statistics Divyum Sharma 15
Probability & Statistics Divyum Sharma 16
Calculating probabilities using cdf
Let X be a binomial random variable with parameters
n, p. For integers i, j with 0 i j n, then
P(i X j) = B(j; n, p) B(i 1; n, p).
Taking i = j, we get
b(j; n, p) = B(j; n, p) B(j 1; n, p).
Probability & Statistics Divyum Sharma 17
Proposition
If X ⇠ Bin(n, p), then
p
E (X ) = np, V (X ) = npq, X = npq, where q = 1 p.
Probability & Statistics Divyum Sharma 18
Proof.
n
X n
X n!
E (X ) = xb(x; n, p) = x px qn x
x=0 x=0
x!(n x)!
Xn
n!
= x px qn x
x=1
x!(n x)!
n
X (n 1)!
= np px 1q n 1 (x 1)
x=1
(x 1)!(n 1 (x 1))!
n 1
X (n 1)! 1 y 1
= np py qn = np(p + q)n =
y =0
y !(n 1 y )!
Probability & Statistics Divyum Sharma 19
n
X
2 n!
E (X ) = x2 px qn x
x=0
x!(n x)!
n
X n!
= (x 2 x) px qn x
+ E (X )
x=0
x!(n x)!
Xn
n!
= px qn x
+ np
x=2
(x 2)!(n x)!
n 2
X
2 (n 2)! 2 y
= n(n 1)p py qn + np
y =0
y !(n 2 y )!
2
= n(n 1)p + np.
Hence V (X ) = E (X 2 ) (E (X ))2 = npq.
Probability & Statistics Divyum Sharma 20
Mgf of binomial distribution
Theorem
Let X be a binomial random variable with
parameters n, p. Then the mgf mX (t) of X is given
by
mX (t) = (q + pe t )n .
Probability & Statistics Divyum Sharma 21
Mgf of binomial distribution
Theorem
Let X be a binomial random variable with
parameters n, p. Then the mgf mX (t) of X is given
by
mX (t) = (q + pe t )n .
Proof. Exercise.
Exercise
Using the mgf of a binomial distribution, derive the
formulas for its mean and variance.
Probability & Statistics Divyum Sharma 21