pdf bernollui
pdf bernollui
1
The moment generating function
𝑴𝑿 𝒕 = 𝑬 𝒆𝒕𝑿 = 𝒆𝒕𝒙 𝒇 𝒙
∀𝒙
Example: Find the moment generating function of the random variable 𝑿
with the probability function:
𝑥 0 1 2
f(𝑥) = 𝑃(𝑋 = 𝑥) 10/28 15/28 3/28
Solution:
𝟏𝟎 𝟏𝟓 𝟑
𝑴𝑿 𝒕 = 𝑬 𝒆𝒕𝑿 =𝒆𝟎𝒕∗ 𝒕
+𝒆 ∗ 𝟐𝒕
+𝒆 ∗
𝟐𝟖 𝟐𝟖 𝟐𝟖
𝟏𝟎 𝟏𝟓 𝒕 𝟑 𝟐𝒕
= + 𝒆 + 𝒆
𝟐𝟖 𝟐𝟖 𝟐𝟖
2
The moment generating function
Example: Let the moment generating function of the random variable 𝑿 is given by:
𝟑 𝒕 𝟏 𝟐𝒕 𝟏 𝟓𝒕 𝟐 𝟕𝒕
𝑴 𝒕 = 𝒆 + 𝒆 + 𝒆 + 𝒆
𝟏𝟎 𝟓 𝟏𝟎 𝟓
(a) Find the probability distribution function (pdf) of the random variable 𝑿.
(b) Find the mean and variance of 𝑿.
Solution:
(a) 𝑥 1 2 5 7
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) 3/10 1/5 1/10 2/5
𝟑 𝟏 𝟏 𝟐 𝟐𝟔
(b) 𝝁𝑿 = 𝒙𝒇(𝒙) = 𝟏 ∗ +𝟐∗ +𝟓∗ +𝟕∗ =
𝒂𝒍𝒍𝒙
𝟏𝟎 𝟓 𝟏𝟎 𝟓 𝟏𝟎
𝟑 𝟏 𝟏 𝟐 𝟐𝟑𝟐
𝑬 𝑿𝟐 = 𝒙𝟐 𝒇 𝒙 =𝟏 𝟐 ∗ + 𝟐𝟐 ∗ + 𝟓𝟐 ∗ + 𝟕𝟐 ∗ =
𝟏𝟎 𝟓 𝟏𝟎 𝟓 𝟏𝟎
𝒂𝒍𝒍𝒙
𝑽𝒂𝒓 𝑿 = 𝑬 𝑿𝟐 − 𝝁𝟐 = 𝟏𝟔. 𝟒𝟒
3
The moment generating function
𝝁𝑿 = 𝑬 𝑿 = 𝑴′ 𝑿 𝟎 , 𝑬 𝑿𝟐 = 𝑴″ 𝑿 𝟎
𝑽𝒂𝒓 𝑿 = 𝑴″ 𝑿 𝟎 − 𝑴′ 𝑿 𝟎 𝟐
Proof: Similarly,
𝒅𝟐 𝒅𝟐 𝒕𝒙
∵ 𝑴𝑿 𝒕 = 𝑬 𝒆𝒕𝑿 = 𝒆𝒕𝒙 𝒇 𝒙 ∴ 𝟐 𝑴𝑿 𝒕 = 𝒅𝒕𝟐 ( 𝒆 𝒇 𝒙 )
𝒅𝒕 ∀𝒙
∀𝒙
𝒅 𝒅 = 𝒆𝒕𝒙 𝒙𝟐 𝒇 𝒙
∴ 𝑴𝑿 𝒕 = ( 𝒆𝒕𝒙 𝒇 𝒙 ) = 𝒆𝒕𝒙 𝒙𝒇 𝒙
𝒅𝒕 𝒅𝒕 ∀𝒙
∀𝒙 ∀𝒙
At 𝒕 = 𝟎
At 𝒕 = 𝟎 ∴ 𝑴′ 𝑿 𝟎 = 𝒙𝒇 𝒙 = 𝝁𝑿 ∴ 𝑴″ 𝑿 𝟎 = 𝒙 𝟐 𝒇 𝒙 = 𝑬 𝑿 𝟐
∀𝒙 𝒂𝒍𝒍𝒙
4
The moment generating function
Example: Let the moment generating function of the random variable 𝑿 is given by:
𝟓
𝑴𝑿 (𝒕) = (𝟎. 𝟑 + 𝟎. 𝟕𝒆𝒕 )
and 𝒀 = 𝟐 − 𝟒𝑿, find 𝝈𝟐𝒀 .
Solution:
5
Some discrete probability distributions
Hypergeometric
Binomial
Poisson Geometric
6
Bernoulli Distribution
𝒇 𝟎 =𝑷 𝑿=𝟎 =𝟏−𝒑
𝒇 𝟏 =𝑷 𝑿=𝟏 =𝒑
where 𝒑 denotes the probability of success. Hence
𝒇 𝒙 = 𝒑𝒙 𝟏 − 𝒑 𝟏−𝒙 , 𝒙 = 𝟎, 𝟏
7
Bernoulli Distribution
𝑬(𝑿𝟐 ) = 𝒙𝟐 𝒇 𝒙 = 𝒙𝟐 𝒇 𝒙
∀𝒙 𝒙=𝟎
𝟏
= 𝒙𝟐 𝒑𝒙 𝟏 − 𝒑 𝟏−𝒙 = 𝟎 𝟐 ∗ 𝒑 𝟎 𝟏 − 𝒑 + 𝟏𝟐 ∗ 𝒑 𝟏 𝟏 − 𝒑 𝟎 =𝒑
𝒙=𝟎
𝝈𝟐𝑿 = 𝒑 − 𝒑𝟐 = 𝒑 𝟏 − 𝒑
8
Bernoulli Distribution
M X ( t ) = E ( etX ) = et x f ( x )
x
1
= et x p x (1 − p ) = (1 − p ) + et p
1− x
x =0
9
Binomial Distribution
10
Binomial Distribution
11
Binomial Distribution
12
Binomial Distribution
𝒏
However, there are tuples with x successes and 𝒏 − 𝒙 failures in 𝒏 trials.
𝒙
Hence
𝒏 𝒙 𝒏−𝒙
𝒇 𝒙 = 𝒑 𝟏−𝒑
𝒙
𝒏 𝒙 𝒏−𝒙
𝒇 𝒙 = 𝒑 𝟏−𝒑 𝒙 = 𝟎, 𝟏, 𝟐, … , 𝒏
𝒙
where 0 < 𝒑 < 1 is the probability of success.
13
Binomial Distribution
14
Binomial Distribution
𝒙 𝒇 𝒙 =𝑷 𝑿=𝒙
0 3
3 1 3 27
0 0 4 4
=
64
1 2
3 1 3 27
1 1 4 4
=
64
2 1
3 1 3 9
2 =
2 4 4 64
3 0
3 1 3 1
3 3 4 4
=
64
Total 1
15
Binomial Distribution
Solution:
X 0 1 2 3
𝑓(𝑥) = 𝑃(𝑋 = 𝑥) 27/64 27/64 9/64 1/64
𝟗 𝟏 𝟏𝟎
(1) 𝑷(𝑿 ≥ 𝟐) = 𝑷(𝑿 = 𝟐) + 𝑷(𝑿 = 𝟑) = 𝒇(𝟐) + 𝒇(𝟑) = + =
𝟔𝟒 𝟔𝟒 𝟔𝟒
(2) 𝑷(𝑿 ≤ 𝟐) = 𝑷(𝑿 = 𝟐) + 𝑷(𝑿 = 𝟏) + 𝑷(𝑿 = 𝟎)
𝟗 𝟐𝟕 𝟐𝟕 𝟔𝟑
= 𝒇(𝟐) + 𝒇(𝟏) + 𝒇(𝟎) = + + =
𝟔𝟒 𝟔𝟒 𝟔𝟒 𝟔𝟒
𝟏 𝟔𝟑
or 𝑷(𝑿 ≤ 𝟐) = 𝟏 − 𝑷(𝑿 > 𝟐) = 𝟏 − 𝑷(𝑿 = 𝟑) = 𝟏 − =
𝟔𝟒 𝟔𝟒
16
Binomial Distribution
17
Binomial Distribution
M X ( t ) = E ( etX ) = et x f ( x )
x
n
= e p (1 − p ) = ( p e ) (1 − p ) = ( p e + (1 − p ) )
n
n
tx n x n − x t x n− x t n
x =0 x x =0 x
Therefore
X = E ( X ) = M X ( 0 ) = ( p e + 1 − p ) = n pe ( p e + 1 − p )
d n t t n −1
t
dt t =0
= 𝒏𝒑
Similarly
d2
E ( X 2 ) = M X ( 0 ) = 2 ( p e +1− p) = ( )
n d n −1
+ −
t t t
n pe p e 1 p
dt dt
= n pe ( p e + 1 − p ) + n ( n − 1) ( pe ) ( pe +1− p)
t t n −1 t 2 t n−2
t =0
= n p + n ( n − 1) p 2
Hence
= n p + n ( n − 1) p 2 − ( np )
2
𝑉 𝑥 = 𝐸 𝑋 2 − 𝜇𝑋 2
= 𝒏𝒑 𝟏 − 𝒑
19
Binomial Distribution
∴ 𝑿~𝑩𝑰𝑵 𝟔, 𝟎. 𝟎𝟓
21
Binomial Distribution
𝝁𝑿 = 𝒏𝒑 = 𝟔 𝟎. 𝟎𝟓 = 𝟎. 𝟑
𝑽𝒂𝒓 𝑿 = 𝒏𝒑 𝟏 − 𝒑 = 𝟔 𝟎. 𝟎𝟓 𝟎. 𝟗𝟓 = 𝟎. 𝟐𝟖𝟓
𝝈𝑿 = 𝑽𝒂𝒓 𝑿 = 𝟎. 𝟐𝟖𝟓
22
Binomial Distribution
Example: The probability that a patient recovers from a rare blood disease is
0.4. If 15 people are known to have contracted this disease, what is the
probability that:
1- at least 10 survive?
2- from 3 to 8 die?
3- at most 3 survive?
Solution:
1- Let X be a random variable represent the number of patients that will survive.
Note that: the experiment is performed 𝒏 = 𝟏𝟓 times with probability of success 𝒑 = 𝟎. 𝟒
∴ 𝑿~𝑩𝑰𝑵 𝟏𝟓, 𝟎. 𝟒
1- The probability that at least 10 survive = 𝑷 𝒙 ≥ 𝟏𝟎 = 𝟏 − 𝑷 𝑿 < 𝟏𝟎
=𝟏−𝑷 𝑿≤𝟗
9
15
=1− 0.4𝑥 1 − 0.4 15−𝑥 = 𝟎. 𝟎𝟑𝟑𝟖
𝑥
𝑥=0
23
Binomial Distribution
2- Let 𝑿 be a random variable represent the number of patients that will die.
Note that: the experiment is performed 𝒏 = 𝟏𝟓 times with probability of success 𝒑 = 𝟎. 𝟔
∴ 𝑿~𝑩𝑰𝑵 𝟏𝟓, 𝟎. 𝟔
The probability that f𝐫𝐨𝐦 𝟑 𝐭𝐨 𝟖 𝐝𝐢𝐞 = 𝑷 𝟑 ≤ 𝑿 ≤ 𝟖
8
15
= 0.6𝑥 1 − 0.6 15−𝑥 = 𝟎. 𝟖𝟕𝟕𝟗
𝑥
𝑥=3
3- Let 𝑿 be a random variable represent the number of patients that will survive.
∴ 𝑿~𝑩𝑰𝑵 𝟏𝟓, 𝟎. 𝟒
24
Binomial Distribution
Example: It is known that disks produced by a certain company will be defective with
probability 0.01 independently of each other. The company sells the disks in packages
of 10 and offers a money-back guarantee that at most 1 of the 10 disks is defective ( The
guarantee is that the customer can return the entire package of diskettes if he or she
finds more than one defective diskette in it)
(a) What proportion of packages is returned? (probability of returning the package)
(b) If someone buys three packages, what is the probability that exactly one of them
will be returned?
Solution: ∴ 𝑿~𝑩𝑰𝑵 𝟏𝟎, 𝟎. 𝟎𝟏
(a) Let 𝑿 be a random variable represent the number of defective disks.
Note that: the experiment is performed 𝒏 = 𝟏𝟎 times with probability of success 𝒑 = 𝟎. 𝟎𝟏
The proportion of packages is returned = 𝑷 𝑿 > 𝟏 = 𝟏 − 𝑷 𝑿 ≤ 𝟏
= 𝟏 − (𝑷 𝑿 = 𝟏 + 𝑷 𝑿 = 𝟎 )
1
15
=1− 0.01𝑥 1 − 0.01 15−𝑥 = 𝟎. 𝟎𝟎𝟓
𝑥
𝑥=0
25
Binomial Distribution
(b) Let 𝒀 be a random variable represent the number of packages that the person will
have to return.
26
Finish