Lec 4
Lec 4
Mathematical Statistics
Week 4
Types of distribution for DRV
Akerke Zhailaubek
[email protected]
Lecture overview:
46
Binomial Distribution
§ The binomial distribution with parameters n
and p is the discrete probability distribution of
the number of successes p in a sequence of n
independent experiments
§ Each experiment has only two possible
outcomes (true-false, yes–no, success-failure
etc)
47
Example
48
When a binomial distribution is a
suitable model
§ The number of trials n must be fixed. For
instance, coin was thrown 10 times.
§ Each trial must have all outcomes classified
into two categories (commonly referred to
as success and failure, yes and no, accepted
and rejected, head or tail)
§ Trials are independent (this allows us to
multiply probabilities)
§ Probability of success remains the same
for all trials
49
Binomial Theorem
§ The binomial theorem (or binomial
expansion) describes the algebraic
expansion of powers of a binomial.
§ According to the theorem, it is possible
-
to expand the polynomial (𝑎 + 𝑏) into a
sum involving terms
- . -/.
.𝐶𝑎 𝑏 ,
where coefficients .-𝐶 are specific positive
numbers called binomial coefficients
Binomial Coefficients
§ Binomial coefficients can be found using
Pascal’s triangle
§ Each coefficient in the
triangle is equal to the sum
of the two numbers above
(𝑎 + 𝑏)% = 𝑎 + 𝑏
(𝑎 + 𝑏)" = 𝑎" + 2𝑎𝑏 + 𝑏 "
(𝑎 + 𝑏)# = 𝑎# + 3𝑎" 𝑏 + 3𝑎𝑏 " + 𝑏 #
(𝑎 + 𝑏)$ = 𝑎$ + 4𝑎# 𝑏 + 6𝑎" 𝑏 " + 4𝑎𝑏 # + 𝑏 $
Binomial Coefficients
§ Pascal’s triangle is not convenient for
large exponents
§ Each binomial coefficient can be found
using the factorial equation
𝑛 𝑛!
= -"𝐶 =
𝑥 𝑥! 𝑛 − 𝑥 !
for 𝑥 = 0,1,2,3, … 𝑛 , where
𝑛 = number of trials
𝑥 = number of successes in 𝑛 trials
Why Binomial Coefficients
§ Why do we need binomial coefficients in
this lecture?
Example
A fair coin is tossed five times. What is the
probability to obtain exactly 3 heads in five
tosses?
Example. Solution
§ Three heads in five trials can be obtained in
the following ten ways THHHT
HHHTT
§ This is the number of TTHHH
HTTHH
arrangements of 5 objects HHTTH
with 2 (TT) and 3 (HHH) THTHH
HTHTH
identical objects HHTHT
THHTH
§ The number of distinct HTHHT
𝑛 " -/"
𝑃 𝑋=𝑥 = 𝑝 (1 − 𝑝)
𝑥
Number of Probability of Probability
successes success of failure
Probability Distribution Function
§ The formula in the previous slide is called
Probability Distribution Function (PDF) or
Probability Mass Function (PMF) and can
be rewritten as
𝑛!
𝑃 𝑋=𝑥 = 𝑝 " (1 − 𝑝)-/"
𝑥! 𝑛 − 𝑥 !
§ Sometimes 𝒏 is called the index and 𝒑 is
the parameter of the binomial distribution
Example
𝐸 𝑋 = 6 𝑥𝑃(𝑥)
"1$
§ There is also a shorter way. If 𝑋 ~ 𝐵(𝑛, 𝑝), then the
expected value of 𝑋 is
𝐸 𝑋 = 𝑛𝑝
The Variance of Binomial Distribution
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 * − 𝐸(𝑋) *
𝐸 𝑋 = 𝑛𝑝 = 3×0.5 = 1.5
Example
Find the variance.
# of Heads, 𝑥 0 1 2 3
𝑥! 0 1 4 9
𝑃(𝑋 = 𝑥) 1 3 3 1
8 8 8 8
% 1 3 3 1
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋% − 𝐸 𝑋 = 0× + 1× + 4× + 9× − 1.5%
8 8 8 8
3
= = 0.75
4
# of Sixes, 0 1 2 3 4 5 6
𝑥
𝑥! 0 1 4 9 16 25 36
𝑃(𝑋 = 𝑥) ! " # $ % & ' ' & % $ # " !
1 5 1 5 1 5 1 5 1 5 1 5 1 5
1 6 15 20 15 6 1
6 6 6 6 6 6 6 6 6 6 6 6 6 6
1
𝐸 𝑋 = 𝑛𝑝 = 6× = 1
6
Exercise. Solution
Also expected value
# of Sixes, 0 1 2 3 4 5 6
𝑥
𝑥! 0 1 4 9 16 25 36
𝑃(𝑋 = 𝑥) ! " # $ % & ' ' & % $ # " !
1 5 1 5 1 5 1 5 1 5 1 5 1 5
1 6 15 20 15 6 1
6 6 6 6 6 6 6 6 6 6 6 6 6 6
# of Sixes, 0 1 2 3 4 5 6
𝑥
𝑥! 0 1 4 9 16 25 36
𝑃(𝑋 = 𝑥) ! " # $ % & ' ' & % $ # " !
1 5 1 5 1 5 1 5 1 5 1 5 1 5
1 6 15 20 15 6 1
6 6 6 6 6 6 6 6 6 6 6 6 6 6
1 1
𝑉𝑎𝑟 𝑋 = 𝑛𝑝(1 − 𝑝) = 6× × 1 − = 0.833
6 6
Exercise. Solution
Also variance
# of Sixes, 0 1 2 3 4 5 6
𝑥
𝑥! 0 1 4 9 16 25 36
𝑃(𝑋 = 𝑥) ! " # $ % & ' ' & % $ # " !
1 5 1 5 1 5 1 5 1 5 1 5 1 5
1 6 15 20 15 6 1
6 6 6 6 6 6 6 6 6 6 6 6 6 6
# & ' (
% % 1 5 1 5
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 − 𝐸 𝑋 = 0×1 + 1×6 +
6 6 6 6
) $ %
1 % 5 1 $ 5 1 ) 5
4×15 + 9×20 + 16×15 +
6 6 6 6 6 6
1 ( 5 ' 1 & 5 # 85536 5
25×6 + 36×1 −1= − 1 = = 0.833
6 6 6 6 46656 6
Example
An archer arrows at a target and for each arrow,
independently of all the others, the probability of not
hitting the bull's eye is 7/8.
a) Given that the archer fires 5 arrows, find the probability
that fewer than 2 arrows hit the bull's eye.
The archer fires 5 arrows, collects them from a target and
fires all 5 again.
b) Find the probability that on both occasions fewer than
2 hit the bull's eye.
Example. Solution
a) Given that the archer fires 5 arrows, find the probability
that fewer than 2 arrows hit the bull's eye.
𝑋 is the number of hits in five shots
1
𝑋~𝐵 5,
8
𝑃 𝑋 <2 =𝑃 𝑋 ≤1 =𝑃 𝑋 =0 +𝑃 𝑋 =1
7 8 1 7 <
= + 5× = 0.87927
8 8 8
Example. Solution.
The archer fires 5 arrows, collects them from a target and
fires all 5 again.
b) Find the probability that on both occasions fewer than
2 hit the bull's eye.
In both series of shots the number of hits is
less than 2, i.e. 𝑋 < 2
𝑃 = 𝑃 𝑋 < 2 ×𝑃 𝑋 < 2 = 0.87927 ! = 0.773
Exercise
A fair 4-sided die has numbers 1, 2, 3 and 4 on its faces.
The die is rolled 20 times. The random variable
𝑋 represents the number of 4s obtained.
a) Find the mean 𝜇 and the variance of 𝑋
𝐸 𝑋 = 𝜇 = 𝑛𝑝 = 20×0.25 = 5
𝑉𝑎𝑟 𝑋 = 𝑛𝑝 1 − 𝑝 = 20×0.25×0.75 = 3.75
b) Find 𝑃(𝑋 < 𝜇 − 𝑉𝑎𝑟(𝑋))
𝑃 𝑋 < 𝜇 − 𝑉𝑎𝑟 𝑋 = 𝑃 𝑋 ≤ 3 = 0.2252
Real life applications of Poisson Distribution
6
The mean number of flaws per sheet is
205/100 = 2.05
x 0 1 2 3 4 5 6
P(X=x) 0.12 0.29 0.25 0.17 0.11 0.05 0.01
9
We want to find a probability function
𝑷(𝑿 = 𝒙) that will give us a similar table.
𝟎 ≤ 𝑷(𝑿 = 𝒙) ≤ 𝟏
∑𝒂𝒍𝒍 𝒙 𝑷(𝑿 = 𝒙) = 𝟏
&
0𝑷 𝑿 = 𝒙 = 𝟏
𝒙$𝟎
11
Lets begin with a simple mathematical relationship
𝒂𝝀 ×𝒂"𝝀 = 𝒂𝟎 = 𝟏
Where 𝒂 and 𝜆 are positive constants
12
𝝀𝟎 𝝀𝟏 𝝀𝟐 𝝀𝟑 𝝀𝟒
𝑵𝒐𝒘 𝒆𝝀 = + + + + +⋯
𝟎! 𝟏! 𝟐! 𝟑! 𝟒!
𝝀𝟎 𝝀𝟏 𝝀𝟐 𝝀𝟑
𝒆-𝝀 ×𝒆𝝀 = 𝒆-𝝀 + + + +. . =𝟏
𝟎! 𝟏! 𝟐! 𝟑!
&
.
𝜆
= 0 𝑒 -0 =1
𝑥!
.$/
13
This is an infinite series whose sum is one and
contains only positive terms which lie between
0 and 1.
0 &
So 𝑃 𝑋=𝑥 = 𝑒 -0
.!
is a probability function for any positive
constant 𝜆.
$ $
𝝀𝒙%𝟏 𝝀𝒙%𝟏
𝑬(𝑿) = ' 𝒆%𝝀 𝝀 = 𝝀𝒆%𝝀 '
𝒙−𝟏 ! 𝒙−𝟏 !
𝒙"𝟏 𝒙"𝟏
𝝀𝟐 𝝀𝟑
= 𝝀𝒆%𝝀 𝟏+𝝀+ + +⋯
𝟐! 𝟑!
𝑬 𝑿 = 𝝀𝒆!𝝀 𝒆𝝀
𝑬 𝑿 =𝝀
𝑿 0 1 2 3 4 5 6
𝑃(𝑋 = 𝑥) 0.14 0.27 0.27 0.18 0.09 0.04 0.01
17
The model matches closely with the experimental
data.
Wikipedia.org
We have already shown that the mean of a random
variable which has a Poisson distribution with
parameter 𝝀 is 𝝀 .
20
𝑽𝒂𝒓 𝑿 = 𝑬 𝑿𝟐 − (𝑬 𝑿 )𝟐
𝑬 𝑿𝟐 = ∑𝒂𝒍𝒍 𝒙 𝒙𝟐 𝑷(𝒙 = 𝒙)
𝝀 𝒙
𝑬 𝑿𝟐 = ∑&
𝒙$𝟎 𝒙 𝟐
𝒆 -𝝀
𝒙!
&
𝒙
𝝀
𝑬(𝑿𝟐 ) = 0 𝒙 𝒙 − 𝟏 + 𝒙 𝒆-𝝀
𝒙!
𝒙$𝟎
21
&
𝒙 𝒙
𝝀 𝝀
𝑬 𝑿𝟐 = 0 𝒙 𝒙 − 𝟏 𝒆-𝝀 + 𝒙𝒆-𝝀
𝒙! 𝒙!
𝒙$𝟎
& &
𝒙 𝒙
𝝀 𝝀
= 0 𝒙 𝒙 − 𝟏 𝒆-𝝀 + 0 𝒙𝒆-𝝀
𝒙! 𝒙!
𝒙$𝟎 𝒙$𝟎
& &
𝒙 𝒙
𝝀 𝝀
= 0 𝒙 𝒙 − 𝟏 𝒆-𝝀 + 0 𝒙𝒆-𝝀
𝒙! 𝒙!
𝒙$𝟐 𝒙$𝟏
22
$ 𝒙 $ 𝒙
𝝀 𝝀
𝑬(𝑿𝟐) = & 𝒙 𝒙 − 𝟏 𝒆%𝝀 + & 𝒙𝒆%𝝀
𝒙! 𝒙!
𝒙"𝟐 𝒙"𝟏
$ 𝒙%𝟐 $ 𝒙%𝟏
𝝀 𝝀
= & 𝝀𝟐 𝒆%𝝀 + & 𝝀𝒆%𝝀
𝒙−𝟐 ! 𝒙−𝟏 !
𝒙"𝟐 𝒙"𝟏
$ 𝒙%𝟐 $
𝒙%𝟏
𝝀 𝝀
= 𝝀𝟐 𝒆%𝝀 & + 𝝀𝒆%𝝀 &
𝒙−𝟐 ! 𝒙−𝟏 !
𝒙"𝟐 𝒙"𝟏
= 𝝀𝟐 𝒆%𝝀 𝒆𝝀 + 𝝀𝒆%𝝀 𝒆𝝀 = 𝝀𝟐 + 𝝀
23
𝟐 𝟐
𝑽𝒂𝒓 𝑿 = 𝑬 𝑿 − 𝑬 𝑿
𝑽𝒂𝒓 𝑿 = 𝝀𝟐 + 𝝀 − 𝝀𝟐 = 𝝀
24
𝑻𝒉𝒆 𝒓𝒂𝒏𝒅𝒐𝒎 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝑿 𝒉𝒂𝒔 𝒂
𝑷𝒐𝒊𝒔𝒔𝒐𝒏 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏
𝒆(𝝀 𝝀𝒙
𝑷 𝑿=𝒙 = 𝒙 = 𝟎, 𝟏, 𝟐 …
𝒙!
𝒎𝒆𝒂𝒏 = 𝒗𝒂𝒓𝒂𝒊𝒏𝒄𝒆 = 𝝀
𝑿~𝑷𝒐 (𝝀)
25
Situations that can be modelled by a
Poisson distribution
𝒆-𝟓 𝟓𝒙
𝑷 𝑿=𝒙 = 𝒙 = 𝟎, 𝟏, 𝟐 …
𝒙!
𝒆-𝟓 𝟓𝟑
𝑷 𝑿=𝟑 = = 𝟎. 𝟏𝟒𝟎𝟒
𝟑!
29
𝑷 𝑿 ≥ 𝟑 = 𝑷 𝑿 = 𝟑 + 𝑷 𝑿 = 𝟒 +. . . .
𝟓𝟐
𝑷 𝑿 ≥ 𝟑 = 𝟏 − 𝒆-𝟓 𝟏+𝟓+
𝟐!
𝑷 𝑿 ≥ 𝟑 = 𝟎. 𝟖𝟕𝟓𝟑
30
BINOMIAL POISSON
𝒙 = 𝟎, 𝟏 … 𝒏 𝒙 = 𝟎, 𝟏 … . .
n+1 terms Infinite terms
mean = 𝒏𝒑 mean = 𝝀
42
1 defect every 20m so 0.5 defects every 10m
(average). If X is the number of defects in 10m
of material then 𝑿~𝑷𝒐 (𝟎. 𝟓)
𝒙
𝟎. 𝟓
𝑷 𝑿 = 𝒙 = 𝒆-𝟎.𝟓
𝒙!
𝑷 𝑿 = 𝟎 = 𝒆-𝟎.𝟓 = 𝟎. 𝟔𝟎𝟕
43
10 pieces of cloth and the probability that there
are not any defects on a single piece is 0.607. If X
is the number of pieces of cloth without defects
then 𝑿~𝑩 (𝟏𝟎, 𝟎. 𝟔𝟎𝟕)
𝟏𝟎!
𝑷 𝑿=𝒙 = 𝟎. 𝟔𝟎𝟕𝒙 𝟎. 𝟑𝟗𝟑𝟏𝟎-𝒙
𝒙! 𝟏𝟎-𝒙 !
𝑷 𝑿 ≥ 𝟑 = 𝟏 − 𝑷 𝑿 ≤ 𝟐 = 𝟎. 𝟗𝟖𝟗
44
Summary
𝑰𝒇 𝒂 𝒓𝒂𝒏𝒅𝒐𝒎 𝒗𝒂𝒓𝒊𝒂𝒃𝒍𝒆 𝑿 𝒉𝒂𝒔 𝒂
𝑷𝒐𝒊𝒔𝒔𝒐𝒏 𝒅𝒊𝒔𝒕𝒓𝒊𝒃𝒖𝒕𝒊𝒐𝒏 𝒕𝒉𝒆𝒏
𝒆(𝝀 𝝀𝒙
𝑷 𝑿=𝒙 = 𝒙 = 𝟎, 𝟏, 𝟐 …
𝒙!
𝒎𝒆𝒂𝒏 = 𝒗𝒂𝒓𝒂𝒊𝒏𝒄𝒆 = 𝝀
𝑿~𝑷𝒐 (𝝀)
45
References:
1. Palin A., Park A., Whiteley C., (2012), A-level
mathematics for Edexcel Statistics 1, CGP, UK.
2. Attwood, G., Clegg, A., Dyer, G. and Dyer, J
(2008), Edexcel AS and A-Level Modular
Mathematics series S2, Pearson, Harlow, UK.
3. Lecture notes, NUFYP, Nazarbayev University.
61