Professional Documents
Culture Documents
Statistics
INE-201
Chapter VI
Random Variables &
Probability Distributions
Content
Introduction
Random Variable
A random variable is a variable that assumes
numerical values associated with the random
outcomes of an experiment, where one (and only
one) numerical value is assigned to each sample
point.
Introduction
Random Variable (RV):
A random variable is a function that assigns a real number
to each outcome in the sample space of a random
experiment
(S )
Quantitative RV
Continuous RV
Length
Depth
Volume
Time
Weight
Discrete RV
Number of sales
Number of calls
Shares of stock
People in line
Mistakes per page
Qualitative RV
Non Ordinal
Can't be
arranged
Green
Blue
Red
Black
Ordinal
Can be arranged
Excellent
Very Good
Good
f ( x) = 1
all x
f ( x) = 1
all x
In other words,
F( x n ) =
f(
x x
x)
F( x n ) = f( x) dx
Ch. 4-9
Example 6.2:
Page 139
2x +1
f ( x) = 25
x = 0, 1, 2, 3, 4
otherwise
Required:
(b) P (2 x 4)
(d) P(x>-6)
(a) P(x=4)
(c) P ( x 1)
Solution:
x
sum
f(x)
0.04
0.12
0.2
0.28
0.36
0.16
0.36
0.64
(a) P(x=4)=0.36
or P(x=4) = F(4) F(3) = 1- 0.64 = 0.36
10
Solution:
(b)
0.2+0.28+0.36=0.84
or = F(4) F( 1) = 1 0.16 = 0.84
(c) P( x 1) = 0.16
(d) P(x>- 6) =1
11
Example 4.6:
Page 142
for X = 0, 1, 2, 3;
Otherwise
Solution:
X
Sum
f(x)
4k
5K
8K
13K
30K
for X = 0, 1, 2, 3.;
12
Example 6.36:
Page 170
0 X 1
aX
a
f ( x) =
- aX + 3a
0
1 X 2
2X3
elsewhere
ax dx + a dx + (ax + 3a)dx = 1
13
Solution:
1
x
x
2
+ 3aX = 1
a
+ a[x ]1 + a
2
2
2 0
2
f ( x) = 2
-X
3
+
2
2
0
0 X 1
1 X 2
2X3
elsewhere
1
1
1
P ( x 1.5) = xdx +
20
2
1.5
1 1
1 dx = 4 + 2 (1.5 1) = 0.5
14
Example
The probability mass function of the random variable X is given
as
x
f(x)
1/2
1/3
1/6
6
x3
1
Expected Value
Discrete RV
E( X) = x P( x) =
x
E( X ) = x P( x)
2
Continuous RV
E( X) =
x
f(
x
)
=
range x
E( X 2 ) =
2
x
f( x )
range x
E( X
) = x K P( x)
x
V( X) = ( x - ) 2 f( x) = 2
x
V( X) = E( x ) [ E ( x)] =
2
E( X
V( X) =
)=
K
x
f( x )
range x
2
( x - ) f( x ) = 2
range x
V( X) = E( x 2 ) [ E ( x)]2 =16 2
T
T
H
H
T
H
T
H
Probability Distribution
x Value Probability
0
1/4 = .25
2/4 = .50
1/4 = .25
Probability
4 possible outcomes
.50
.25
Ch. 4-17
Summary Measures
1. Expected Value (Mean of probability distribution)
Weighted average of all possible values
= E(x) = x p(x)
2. Variance
Weighted average of squared deviation about
mean
2 = E[(x )2] = (x )2 p(x)
3.
Standard Deviation
= 2
18
p(x)
Total
x p(x)
x p(x)
x (x )2 (x )2p(x)
(x )2 p(x)
19
x (x ) 2 (x ) 2p(x)
p(x)
x p(x)
.25
1.00
1.00
.25
.50
.50
.25
.50
1.00
1.00
.25
= 1.0
2 = .50
= .71
20
x (x ) 2 (x ) 2p(x)
p(x)
x p(x)
.25
1.00
1.00
.50
.50
.5
.25
.50
1.00
1.00
= 1.0
2 = 1.5 1.0 =0.5
(x) 2 = 1.50
= .71
21
X U (1,2,..., k )
1
P( X = i) =
i = 1,2,..., k
k
k
=1
k
1
k
0
1
f (x)
2
k
1
k
1
k-1
F (x)
22
22
Hypergeometric Distribution
The experiment consists of randomly drawing n elements
without replacement from a set of N elements, T of which
are Ss (for success) and (N T) of which are Fs (for
failure).
=nT
N T T
N
n X X
P ( X N , T , n) =
N
n
T N T N n
=n *
*
N
N
N 1
2
23
Hypergeometric Distribution
The experiment consists of randomly drawing n elements
without replacement from a set of N elements, T of which
are Ss (for success) and (N T) of which are Fs (for
failure).
=nT
N T T
N
n X X
P ( X N , T , n) =
N
n
T N T N n
=n *
*
N
N
N 1
2
24
Hypergeometric Distribution
Np
X
P( X N , Np, n) =
N Np
n X
N
n
= n Np
Np N Np N n
=n
*
*
N
N 1
N
2
Example
A manufacturing company uses an acceptance scheme
on production items before they are shipped. Boxes of
25 are readied for shipment and samples of 3 are tested
for defectives. If any defectives are found, the entire
box is sent back for 100% screening. If no defectives
are found, the box is shipped.
a-What is the probability that a box containing 3
defectives will be shipped?
b-What is the probability that a box containing only one
defective will be sent back for screening?
26
Solution
22
n=3
G
NP=3
G
N=25
{3
X represent the defectives 2
1
0
D
0 }box is shipped.
1 sent back for
2 100% screening
3
Np N Np
n X
P ( X = 0) =
N
3 22
= 0.669
P(X = 0) =
25
27
Solution
n=3
NP=22
N=25
X represent the good
22
G
{3
3
1
0
D
0 }box is shipped.
1 sent back for
2 100% screening
3
Np N Np
n X
P ( X = 3) =
N
22 3
= 0.669
P(X = 3) =
25
28
Solution
n=3
NP=1
N=25
X represent the defectives
Np N Np
X
n X
P ( X 0) =
N
1 24
= 0.12
= 1 P ( X = 0) =
25
29
Binomial Distribution
n x n x
=
p ( x ) =
p q
x
n!
p x (1 p ) n x
x ! ( n x )!
q = 1 p ()
x = Number of Successes in n trials
(x = 0, 1, 2, ..., n )
Mean
= E ( x) = np
Standard Deviation
30
= npq
Binomial Distribution
Experiment: Toss 1 coin 5 times in a row. Note
number of tails. Whats the probability of 3 tails?
n
p
q
x
=
=
=
=
5
0.5 Probability of getting tail
0.5
3 Getting three tails
=
p( x)
n!
p x (1 p ) n x
x !( n x)!
5!
=
p (3)
.53 (1 .5)53
3!(5 3)!
= .3125
31
p
.01
0.50
.99
.951
.031
.000
.999
.188
.000
1.000
.500
.000
1.000
.812
.001
1.000
.969
.049
Cumulative Probabilities
32
Example
A marksman hits a target 80% of the
time. He fires five shots at the target. What is the
probability that exactly 3 shots hit the target?
n= 5
success = hit
P ( x = 3) = C p q
n
3
n 3
p = .8
x = # of hits
5!
=
(.8)3 (.2)53
3!2!
Example
What is the probability that more than 3 shots
hit the target?
P ( x > 3) = C45 p 4 q 54 + C55 p 5 q 55
5!
5!
4
1
=
(.8) (.2) +
(.8)5 (.2) 0
4!1!
5!0!
34
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?
X= number of people that survive
2-From 3 to 8 survive?
3-Exactly 5 survive?
P(X=5)= F(5)-F(4)=0.4032-0.2173=0.1862
or
P(X =5) = f(5) =
15
5
(0.4)5(0.6)10 = 0.1862
35
36
Poisson Distribution
1. Number of events that occur in an interval
events per unit
Time, Length, Area, Space
2. Examples
Number of customers arriving in 20 minutes
Number of strikes per year in the U.S.
Number of defects per lot (group) of DVDs
37
Poisson Distribution
p( x) =
x!
(x = 0, 1, 2, 3, . . .)
Example
Customers arrive at a rate of
72 per hour. What is the
probability of 4 customers
arriving in 3 minutes?
39
Solution
72 Per Hr. = 1.2 Per Min.
p( x) =
e
x
x!
3.6 ) e
(=
4
p (4)
=
4!
-3.6
.1912
40
.02
:
3.4
3.6
3.8
:
0
.980
:
.033
.027
.022
:
x
3
:
:
.558 .744
.515 .706
.473 .668
:
:
:
.997
.996
.994
:
Cumulative Probabilities
41
Example
Suppose that the average number of telephone calls arriving
at the switchboard of a small corporation is 30 calls per hour.
1. What is the probability that 3 calls will arrive in a 1-minute period
30 calls ------ 60 min
? Calls -------- 1min
? = 30 = 0.5
f (3) = e -0.5 0.5 3
60
3!
2.What is the probability that no calls will arrive in a 3-minute period
0.5 calls ---- 1 min
? Calls ----- 3 min
?= 0.5 * 3 = 1.5
f(0)= e -1. 5 1.5 0 = 0.223
0!
3. What is the probability that more than five calls will arrive
in a 5 minutes interval
( Answer 0.042)
42
1
ba
f(x)
a
f (x)
xa
ba
F(x)
F (x)
43
43
Mean:
a xb
a+b
=
2
Variance:
2
b
a
(
)
2 =
12
Example
Youre production manager of a
soft drink bottling company. You
believe that when a machine is set
to dispense 12 oz., it really
dispenses between 11.5 and 12.5
oz. inclusive. Suppose the
amount dispensed has a uniform
distribution. What is the
probability that less than 11.8 oz.
is dispensed?
SODA
45
Solution
f (x )
1
ba
1.0
1
=1
12.5 11.5
x
11.5 11.8
12.5
Exponential Distributiom
x
1
Density function
e
for x > 0
f ( x) =
0 for x 0
0 for x < 0
F ( x) =
x
for x 0
1 e
Cumulative function
1/
F(x)
f(x)
0
f (x)
F (x)
47
47
Exponential Distribution
Probability density function:
f ( x) =
for
x>0
Mean:
=
Standard Deviation:
=
48
Example
An electrical firm manufactures light bulbs that have a
length of life is approximately negative exponential
distribution with mean 1500 hr and density function is
f ( x) = e
- x
Solution
Approximately negative exponential distribution with
mean 1500 hr and
f ( x) = e
Mean:
- x
Variance:
- X
dx
2000
=e
2000
1500
=0.264
X
Or F(x) =
f ( x)dx =
e -x dx = 1 e X
P(X>2000)=1-P(X<2000)=1-F(2000)=1-( 1 e
) =0.264
50
Solution
300
- X
e
dx
= 1-
e 1 / 5
= 0.181
1 e 300 / 1500
= 0.181
c. Find the value of true mean to give the probability of a given bulbs will last
less than 10 hours at most 0.001.
F (10) 0.001
1 e
e
10
= 1 e 10 0.001
0.999
10 ln 0.999
ln0.999/ - 10 = 1(10 4 )
9995
Normal Distribution
1
f (x) =
e
2
1. Bell-shaped &
symmetrical
1 x
2
f (x )
where
x
Mean
Median
Mode
Normal Distribution
1
f (x) =
e
2
Probability is
area under
curve!
1 x
2
P(c x d) =
f (x)dx ?
f (x )
53
54
Non-standard Normal
Distribution
Normal distributions differ by
mean & standard deviation.
f(x)
Thats an infinite
number of tables!
55
Standardize the
Normal Distribution
z=
Normal
Distribution
Standardized Normal
Distribution
=1
=0
One table!
z
56
-a
=0
57
-a
=0
58
Example:
Find the probability of P (0 < z < 1.96)
Standardized Normal
Probability Table (Portion)
Z
.04
.05
=1
.06
.4750
= 0 1.96 z
Probabilities
Shaded area
exaggerated
59
Example
A certain type of storage battery lasts on the average 5
years, with a standard deviation of 10 years.
Assuming the battery lives are normally distributed,
find the Probability that a given battery will last
1. Between 5 and 6.2 years
2. Between 3.8 and 5years
3. Between 2.9 and 7.1years
4. More than 8 years
5. Between 7.1 and 8 years
6. More than 4 years
60
Solution
1-Between 5 and 6.2 years
P (5 < x < 6.2)
Normal
Distribution
x 6.2 5
z=
=
= .12
10
Standardized Normal
= 10
Distribution
=1
.0478
= 5 6.2 x
= 0 .12
61
Standard Normal
Distribution
62
10
Normal
Standardized Normal
Distribution
Distribution
= 10
=1
.0478
3.8 = 5
-.12 = 0
63
10
Normal
Distribution
x 7.1 5
z=
=
= .21
10
Standardized Normal
Distribution
=1
= 10
.1664
.0832 .0832
2.9 5 7.1
-.21 0 .21
64
Standard Normal
Distribution
65
x 85
z=
=
= .30
10
Standardized Normal
= 10
Distribution
=1
.5000
=5
.1179
=0
.3821
.30 z
66
= 10
x 85
z=
=
= .30
10
Standardized Normal
Distribution
=1
.1179
=5
7.1 8
=0
.0347
.0832
.21 .30
67
Standard Normal
Distribution
68
45
=
= 0.1
10
Standardized Normal
Distribution
= 10
=1
.5389
=5
7.1 8
-0.1
=0
69
=1
.3962
.3962
P (1.26 z 1.26)
= .3962 + .3962
= .7924
1.26 z
=0
1.26
Standard Normal
Distribution
71
=1
P (z > 1.26)
.5000
= .5000 .3962
.3962
= .1038
1.26
=0
72
=1
P (2.78 z 2.00)
.4973
= .4973 .4772
.4772
2.78 2.00
=0
= .0201
=1
.4834
P (z > 2.13)
.5000
= .4834 + .5000
2.13
=0
= .9834
Approximation
Hypergeometric
N >> 50
q=1-p
Binomial
Np
__
P= N
Poisson
=np
Normal
=np
2 =npq
75
Example
Among the 120 applicants for a job only 80 are actually qualified. If
5 of these applicants are randomly selected for an interview, find the
probability that only 2 of the 5 will be qualified for the job by using
1. The hyper geometric distribution
X=2, n=5, N=120 ,Np=80
f(2)=
80
2
40
3
120
5
= 0.164
f(2) =
5
2
= 0.165
76
Example
If 0.8% of the fuses delivered to an arsenal are defective, what is the
probability that four fuses will defective in random sample of 400?
The binomial distribution.
4
p= 0.008
q=0.992
n=400
f(4) =
400
4
0.008
396
0.992
= 0.1788
e 3.2 3.2 4
p ( 4) =
= 0.178
4!
77
Example
Only one personal computer per thousand is
found to be defective after assembly in a
manufacturing plant, and the defective PCs are
distributed randomly throughout the production
run.
(a) What is the probability that a shipment of 500
PCs includes no defective computer?
(b) What is the probability that a shipment of 100
PCs includes at least one defective computer?
78
Solution
By the Poisson approximation of binomial probabilities,
P=0.001
q=0.999
=500(0.001)=0.5
e 0.5
= 0.6065
P( X = 0 = 0.5) =
0!
P=0.001
q=0.999
=100(0.001)=0.1
e 0.1 (0.1) 0
P( X 1 = 0.1) = 1
= 0.09516
0!
79
Example
A multiple-choice quiz has 200 questions, each with 4 possible
answers of which only 1 is correct. What is the probability that sheer
guesswork yields from 25 to 30 correct answers for the 80 of the 200
problems about which the student has no knowledge?
P = 0.25 q = 0.75 n = 80
30.5
24.5
31
25 26 27 28 29 30
30.5
.0
24.5
24
x
80
80
Example
Binomial distribution
p (x)
.3
.2
.1
.0
81
Solution
The Normal distribution as an approximation.
= np = 80*0.25 = 20
2 = npq = 80*0.25*.75 = 15
P( 24.5< X < 305) = P( z1 < Z < z2 )
24.5 20
z1 =
= 1.16
3.873
30.5 20
z2 =
= 2.71
3.873
25
24.5
25.5
(25 .5) (25 + .5)
82
Brain Storming
You work in Quality
Assurance for an investment
firm. A clerk enters 75
words per minute with 6
errors per hour. What is the
probability of 0 errors in a
255-word bond transaction?
83
Solution
Finding
Solution
p( x) =
e
x
x!
.34 ) e
(=
0
p (0)
=
0!
-.34
.7118
85
Brain Storming
You work in Quality Control for
GE. Light bulb life has a normal
distribution with = 2000 hours
and = 200 hours. Whats the
probability that a bulb will last
A. between 2000 and 2400
hours?
B. less than 1470 hours?
86
Solution
P (2000 x 2400)
x 2400 2000
z=
=
= 2.0
200
Normal
Distribution
Standardized Normal
Distribution
= 200
=1
.4772
= 2000 2400
=0
2.0
z
87
Solution
P (x 1470)
x 1470 2000
=
= 2.65
z=
200
Normal
Distribution
Standardized Normal
Distribution
= 200
=1
.5000
.0040
1470
= 2000
.4960
2.65 = 0
z
88
Finding z-Values
for Known Probabilities
What is Z , given
P (z) = .1217?
.1217
Standardized Normal
Probability Table (Portion)
=1
.00
.01
0.2
=0
Shaded area
exaggerated
.31
?
Finding x Values
for Known Probabilities
Normal Distribution
= 10
=1
.1217
= 5 8.1
?
.1217
= 0 .31
x = + z = 5 + (.31)(10 ) =
90
91
91