CVEN2002 Week5
CVEN2002 Week5
CVEN2002/2702
Week 5
This lecture
CVEN2002/2702 (Statistics)
Dr Justin Wishart
2/1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
3/1
5.1 Introduction
Introduction
In practice, we often run the same kind of (random) experiments, from
which we are often interested in the same kind of results
it turns out that certain types of random variables come up over
and over again in applications
In this chapter, we will study a variety of those special random
variables
You can also go to
http://socr.stat.ucla.edu/htmls/SOCR_Distributions.html
and have a look at the numerous special distributions there
CVEN2002/2702 (Statistics)
Dr Justin Wishart
4/1
Example
Consider the following random experiments and random variables:
flip a coin 10 times. Let X = number of heads obtained
a worn machine tool produces defective parts 1% of the time . Let
X = number of defective parts in the next 25 parts produced
each sample of air has a 10% chance of containing a particular
molecule. Let X = the number of air samples that contain the
molecule in the next 18 samples analysed
of all bits transmitted through a digital channel, 15% are received
in error. Let X = the number of bits in error in the next five bits
transmitted
a multiple-choice test contains 10 questions, each with 4 choices,
and you guess at each question. Let X = the number of questions
answered correctly
similar experiments, similar random variables
a general framework that include these experiments as particular
cases would be very useful
CVEN2002/2702 (Statistics)
Dr Justin Wishart
5/1
Dr Justin Wishart
6/1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
7/1
0.8
1.0
0.8
pX(x)
0.4
pX(x)
0.2
0.2
0.2
0.2
0.2
0.4
p = 0.9
0.6
0.8
pX(x)
0.4
0.4
pX(x)
0.6
0.8
0.6
0.8
0.6
0.4
pX(x)
p = 0.8
1.0
p = 0.5
1.0
p = 0.2
1.0
p = 0.1
0.0
0.6
0.4
FX(x)
0.6
0.4
0.4
0.2
0.2
0.2
3
x
0.0
0.0
0.0
0.0
0.0
2
0.2
0.2
FX(x)
0.6
FX(x)
0.6
FX(x)
0.8
0.8
0.4
0.4
FX(x)
0.6
0.8
0.8
1.0
1.0
1.0
0.0
0.0
1.0
0.8
1.0
0.0
0.0
3
x
Binomial pmf and cdf, for n = 5 and = {0.1, 0.2, 0.5, 0.8, 0.9}
CVEN2002/2702 (Statistics)
Dr Justin Wishart
8/1
1 if x = 0
if x = 1
p(x) =
0
otherwise
n
%
Xi
i=1
Dr Justin Wishart
9/1
p(x) =
xSX
n ! "
%
n
x=0
x (1 )nx = ( + (1 ))n = 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
10 / 1
)n
i=1 Xi ,
with Xi Bern()
i=1
i=1
and
2 = Var(X ) = n(1 )
Dr Justin Wishart
11 / 1
Dr Justin Wishart
12 / 1
Dr Justin Wishart
13 / 1
very tedious!
CVEN2002/2702 (Statistics)
14 / 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
15 / 1
x
x!
for x SX = {0, 1, 2, . . .}
CVEN2002/2702 (Statistics)
Dr Justin Wishart
16 / 1
P(X = x) =
(binomial pmf)
1
x!(n x)! n
n
!
"n
n!
x
= x
1
n (n x)!(1 /n)x x!
n
CVEN2002/2702 (Statistics)
Dr Justin Wishart
17 / 1
and
x
x!
1
n
"n
for x {0, 1, . . .}
Dr Justin Wishart
18 / 1
lambda = 10
1.0
lambda = 2
1.0
lambda = 1
1.0
lambda = 0.5
1.0
lambda = 0.1
0.8
0.4
pX(x)
0.6
0.8
0.4
pX(x)
0.6
0.8
0.6
0.4
0.4
pX(x)
0.8
0.6
pX(x)
0.8
0.4
pX(x)
0.6
0.2
0.2
0.2
0.2
0.2
15
20
15
20
1.0
1.0
10
10
15
20
0.0
0.0
10
15
20
10
0.8
0.8
0.8
0.6
0.8
0.8
20
0.6
15
1.0
10
1.0
1.0
0.0
0.0
0.0
0.6
FX(x)
0.6
0.4
0.4
FX(x)
0.6
FX(x)
0.4
FX(x)
0.4
0.4
FX(x)
0.2
0.2
0.2
0.2
0.2
10
15
20
10
x
15
20
10
15
20
0.0
0.0
0.0
0.0
0.0
10
15
20
10
15
20
Dr Justin Wishart
19 / 1
p(x) =
x!
x=0
xSX
=e
%
x
x=0
x!
= e e = 1
Similarly,
E(X ) =
xp(x) =
xe
x=0
xSX
E(X 2 ) =
%
x
x1
e
=
=
x!
(x 1)!
x=1
x 2 p(x) = . . . = 2 +
xSX
Var(X ) =
E(X 2 )
(E(X ))2 = 2 + 2 =
E(X ) =
CVEN2002/2702 (Statistics)
and
Dr Justin Wishart
Var(X ) =
Session 2, 2012 - Week 5
20 / 1
Dr Justin Wishart
21 / 1
202
2010
+ . . . + e20
2
10!
= ...
tedious !
CVEN2002/2702 (Statistics)
22 / 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
23 / 1
Example
It is known that 1% of the books at a certain bindery have defective bindings.
Compare the probabilities that x (x = 0, 1, 2, . . .) of 100 books will have
defective bindings using the (exact) formula for the binomial distribution and
its Poisson approximation
# $
0.01x 0.99100x , while its Poisson
The exact Binomial pmf is p(x) = 100
x
approximation is
x
p (x) = e
!
with = n p = 100 0.01 = 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
24 / 1
Dr Justin Wishart
25 / 1
if x <
0
x
if
x
F (x) =
1
if x >
CVEN2002/2702 (Statistics)
Dr Justin Wishart
26 / 1
0.8
1.0
0.0
0.2
0.4
fX(x)
FX(x)
0.6
cdf F (x)
CVEN2002/2702 (Statistics)
Dr Justin Wishart
27 / 1
E(X ) =
Similarly,
2
E(X ) =
/ 2 0
1
1
x
+
2 2
dx =
=
=
2 2( )
2
/ 3 0
1
1
x
2 + + 2
3 3
x
dx =
=
=
3 3( )
3
2
()2
12
+
2
and
Var(X ) =
Dr Justin Wishart
( )2
12
Session 2, 2012 - Week 5
28 / 1
ba
(area of a rectangle)
Example
Buses arrive at a specified stop at 15-minute intervals starting at 7 A . M . That
is, they arrive at 7, 7:15, 7:30, 7:45, etc. If a passenger arrives at the stop at a
time uniformly distributed between 7 and 7:30, find the probability that he
waits less than 5 minutes for a bus
Let X denote the time (in minutes) past 7 A . M . that the passenger arrives at
the stop. We have X U[0,30]
The passenger will have to wait less than 5 min if he arrives between 7:10
and 7:15 or between 7:25 and 7:30. This happens with probability
P((10 < X < 15) (25 < X < 30)) = P(10 < X < 15) + P(25 < X < 30)
5
1
5
+
=
=
30 30
3
CVEN2002/2702 (Statistics)
Dr Justin Wishart
29 / 1
x ,
As Nx P(x), it follows P(X > x) = P(Nx = 0) = ex (x)
0! = e
which yields the cdf of X :
F (x) = P(X x) = 1 ex
for x 0
Dr Justin Wishart
30 / 1
0
1 ex
if x < 0
if x 0
Dr Justin Wishart
31 / 1
1/2
fX(x)
FX(x)
ln 2
0
cdf F (x)
CVEN2002/2702 (Statistics)
Dr Justin Wishart
32 / 1
0
Moreover,
E(X ) =
x e
dx = x
/ x 0+
e
1
=0+
=
0
Similarly, E(X 2 ) =
- +
0
2+
ex 0
x 2 ex dx = . . . =
ex dx
(by parts)
2
,
2
so that Var(X ) =
1
2
and
Dr Justin Wishart
Var(X ) =
1
2
Session 2, 2012 - Week 5
33 / 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
34 / 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
35 / 1
Dr Justin Wishart
36 / 1
10
n= 5
100
50
Cnk
Cnk
150
200
n= 20
2.0e+299
Cnk
50000
1.0e+299
Cnk
100000
10
15
20
0.0e+00
150000
10
400
CVEN2002/2702 (Statistics)
n=1000
6
k
450
500
550
600
Dr Justin Wishart
37 / 1
2
1
(x) = ex /2
2
(x)
Dr Justin Wishart
38 / 1
Dr Justin Wishart
39 / 1
CVEN2002/2702 (Statistics)
Dr Justin Wishart
40 / 1
1
2
(x)2
2 2
( SX = R)
F (x) =
e 22 dy
2
Important remark: Be careful! Some (many?) sources use the
alternative notation
X N (, 2 )
Dr Justin Wishart
41 / 1
fX(x)
FX(x)
22
1/2
0
2
+ 2
+ 2
cdf F (x)
CVEN2002/2702 (Statistics)
Dr Justin Wishart
42 / 1
Objectives
Objectives
Now you should be able to:
Understand the assumptions for some common discrete
probability distributions
Select an appropriate discrete probability distribution to calculate
probabilities in specific applications
Calculate probabilities, determine means and variances for some
common discrete probability distributions
Understand the assumptions for some common continuous
probability distributions
Select an appropriate continuous probability distribution to
calculate probabilities in specific applications
Calculate probabilities, determine means and variances for some
common continuous probability distributions
Recommended exercises Q53 p.54, Q55 p.55, Q57 p.55, Q33
p.221, Q37 p.222, Q23 p.78, Q19 p.31, Q23 p.31, Q62 p.56
CVEN2002/2702 (Statistics)
Dr Justin Wishart
43 / 1