Chapter #4 Continuous RV Prob Dist Function
Chapter #4 Continuous RV Prob Dist Function
1
Outline
2
Learning Objectives
After careful study of this chapter, you should be able to do the following:
1. Determine probabilities from probability density functions
2. Determine probabilities from cumulative distribution functions, and
cumulative distribution functions from probability density functions, and
the reverse
3. Calculate means and variances for continuous random variables
4. Understand the assumptions for continuous probability distributions
5. Select an appropriate continuous probability distribution to calculate
probabilities for specific applications
6. Calculate probabilities, means and variances for continuous probability
distributions
7. Standardize normal random variables
8. Use the table for the cumulative distribution function of a standard
normal distribution to calculate probabilities
9. Approximate probabilities for Binomial and Poisson distributions
3
4-1 Continuous Random Variables
Continuous random variables- variables that can assume any
value in some range and infinite values within that range
Examples:
• Measurement of current in a thin copper wire. Results might
differ slightly over time due to temperature, impurities, current
variations etc.
• Steel box could have any weight between 0.345kg and 0.352kg
4
4-2 Probability Distributions and
Probability Density Functions
Density functions are commonly used to describe physical
systems.
You can not find the load at a discrete point. But you can find the load
over an interval of length. How?
The load over the interval can be found by integrating the density
function over the interval.
5
4-2 Probability Distributions and
Probability Density Functions
Similar to the previous example, the probability density
function f(x) can be used to describe the probability distribution
of a continuous random variable X.
Definition
7
Probability Density Function
8
Probability Density Function
Probability of
each interval
9
4-2 Probability Density Functions (PDF)
Continuous Random Variable
Example: Suppose X is a continuous random variable taking value
on the interval [1, 4]. Its pdf function f(x) is given by
1
𝑓𝑓 𝑥𝑥 = 1 ≤ 𝑥𝑥 ≤ 4
2 𝑥𝑥
10
4-2 Probability Distributions and
Probability Density Functions
Example:
11
4-2 Probability Distributions and
Probability Density Functions
13
4-3 Cumulative Distribution Functions
Definition
dF ( x )
Given F ( x ) , f ( x ) = as long as the derivative exists.
dx
18
Expected Value 𝝁𝝁 of a
Continuous Random Variable
• If a continuous random variable x has the pdf f(x), 𝑎𝑎 ≤ 𝑥𝑥 ≤ 𝑏𝑏,
then
𝑏𝑏
𝜇𝜇 = � 𝑥𝑥𝑥𝑥 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑎𝑎
Example: calculate µ for the random variable with pdf
1
𝑓𝑓 𝑥𝑥 = 1 ≤ 𝑥𝑥 ≤ 4
2 𝑥𝑥
Answer: 𝜇𝜇 = 7/3
19
Standard Deviation of a
Continuous Random Variable
• If a continuous random variable x has the pdf f(x), 𝑎𝑎 ≤ 𝑥𝑥 ≤ 𝑏𝑏,
then the standard deviation is equal to:
𝑏𝑏
𝜎𝜎 = � 𝑥𝑥 − 𝜇𝜇 2 𝑓𝑓 𝑥𝑥 𝑑𝑑𝑑𝑑
𝑎𝑎
Answer: 𝜎𝜎 = 1/ 12
20
4-4 Mean and Variance of a Continuous
Random Variable
Example:
For the copper wire current measurement example [f(x) = 0.05)],
the mean of X (where X has a range of 0 to 20 mA) is:
21
4-4 Mean and Variance of a Continuous
Random Variable
Expected Value of a Function
of a Continuous Random Variable
22
4-4 Mean and Variance of a
Continuous Random Variable
Example:
For the drilling operation in example on slide # 7, the mean of X is:
23
4-4 Mean and Variance of a
Continuous Random Variable
Example (cont.): The variance of X:
24
4-5 Continuous Uniform Random
Variable
Definition
25
4-5 Continuous Uniform Random
Variable
26
4-5 Continuous Uniform Random
Variable
27
4-5 Continuous Uniform Random
Variable
Example:
For the copper wire current measurement example, f(x) = 0.05,
X has a range of 0 to 20 mA (i.e., a = 0 and b = 20).
28
4-5 Continuous Uniform Random
Variable
Example: The mean and variance formulas can be applied with
a = 0 and b = 20. Therefore,
𝑏𝑏 − 𝑎𝑎
𝐸𝐸 𝑋𝑋 = 𝑉𝑉 𝑋𝑋 = 𝑏𝑏 − 𝑎𝑎 2 /12
2
29
4-5 Continuous Uniform Random
Variable
The cumulative distribution function of a continuous uniform
random variable is obtained by integration. If a < x < b,
30
Normal Distribution
Page 116
1 −(𝑥𝑥−𝜇𝜇)2
𝑓𝑓 𝑥𝑥 = 𝑒𝑒 2𝜎𝜎2 − ∞ < 𝑥𝑥 < ∞
2𝜋𝜋𝜋𝜋
is a normal random variable with parameters μ where −∞< μ <∞, and
σ > 0. Also,
E(X) = μ and V (X) = σ2
σ
x
μ
Mean = Median = Mode
The random variable has an infinite theoretical range: + ∞ to − ∞
32
Normal Distribution
Changing σ increases
or decreases the σ
spread x
μ
33
4-6 Normal Distribution
Definition
34
4-6 Normal Distribution
µ=0 36
4-6 Normal Distribution
Some useful results concerning the normal distribution
For any normal random variable,
𝑃𝑃(𝜇𝜇 – 𝜎𝜎 < 𝑋𝑋 < 𝜇𝜇 + 𝜎𝜎) = 0.6827 ≈ 68%
𝑃𝑃(𝜇𝜇 – 2𝜎𝜎 < 𝑋𝑋 < 𝜇𝜇 + 2𝜎𝜎) = 0.9545 ≈ 95%
𝑃𝑃(𝜇𝜇 – 3𝜎𝜎 < 𝑋𝑋 < 𝜇𝜇 + 3𝜎𝜎) = 0.9973 ≈ 99.7%
37
4-6 Normal Distribution
1σ 2σ 3σ
µ 38
4-6 Normal Distribution
39
4-6 Normal Distribution
Example
Assume that X is a standard normal distribution variable.
Find 𝑃𝑃 𝑍𝑍 ≤ 1.5 = Φ(1.5).
Appendix table II provides 𝑃𝑃(𝑍𝑍 ≤𝑧𝑧).
Standard normal
probability density function
40
4-6 Normal Distribution
Example
Find P(Z ≤ 1.53).
41
Example
A continuous random variable z has a standard
normal distribution. Calculate the probability that
(a) z < 1.2 (b) z > 1.2 (c) z > −1.2
(d) z < −1.2 (e) 0 ≤ z < 1 (f) −1 < z ≤ 1
(g) −0.5 < z < 2
42
4-6 Normal Distribution
Standardizing a Normal Random Variable
43
4-6 Normal Distribution
Example
Suppose that the current measurements in a strip of wire are
assumed to follow a normal distribution with μ = 10 and σ = 2 mA,
what is the probability that the current measurement is greater than
13 mA?
SOLUTION:
Let X denote the current in mA.
The requested probability is 𝑃𝑃(𝑋𝑋 > 13)
Transform it to 𝑍𝑍 = (𝑋𝑋 − 10)/2
So X >13 corresponds to 𝑍𝑍 > (13 − 10)/2 = 1.5.
Hence we look for 𝑃𝑃(𝑍𝑍 > 1.5) of the standard normal Table.
The table gives 𝑃𝑃(𝑍𝑍 ≤ 1.5).
44
4-6 Normal Distribution
45
Example 10
𝑥𝑥 − 𝜇𝜇 1,060,000 − 1,000,000
𝑧𝑧 = = = +2
𝜎𝜎 30,000 46
Example 11
𝑃𝑃 970,000 ≤ 𝑋𝑋 ≤ 1,060,000 = 𝑃𝑃 −1 ≤ 𝑍𝑍 ≤ 2
𝑃𝑃 −1 ≤ 𝑍𝑍 ≤ 2 = 1 − 𝑃𝑃 𝑍𝑍 ≥ 2 − 𝑃𝑃 𝑍𝑍 ≤ −1
𝑃𝑃 −1 ≤ 𝑍𝑍 ≤ 2 = 1 − 1 − 𝑃𝑃 𝑍𝑍 ≤ 2 − 𝑃𝑃 𝑍𝑍 ≤ −1
𝑃𝑃 −1 ≤ 𝑍𝑍 ≤ 2 = 𝑃𝑃 𝑍𝑍 ≤ 2 − 𝑃𝑃 𝑍𝑍 ≤ −1 = 𝐹𝐹 2 − 𝐹𝐹(−1)= 0.8185
48
4-6 Normal Distribution
Example (cont.)
Based on the previous example, what is the
probability that the current is between 9 and 11 mA?
Solution:
9 − 10 x − 10 11 − 10
P (9 < X =
< 11) P < <
2 2 2
= P ( −0.5 < z < 0.5 )
= P ( z < 0.5 ) − P ( z < −0.5 )
= 0.69146 − 0.30854 = 0.38292
Using Excel
0.38292 = NORMDIST(11,10,2,TRUE) - NORMDIST(9,10,2,TRUE) 49
4-6 Normal Distribution
Example (cont.)
Determine the value for which the probability that a
current is below it is 0.98.
So we need x such that: 𝑃𝑃(𝑋𝑋 ≤𝑥𝑥) = 0.98.
Using Excel
14.107 = NORMINV(0.98,10,2)
51
Normal Approximations
• The binomial and Poisson distributions become more
bell-shaped and symmetric as their mean value increase.
• For manual calculations, the normal approximation is
practical – exact probabilities of the binomial and
Poisson, with large means, require technology (Minitab,
Excel).
• The normal distribution is a good approximation for:
– Binomial if np > 5 and n(1-p) > 5.
– Poisson if λ > 5.
Under certain
conditions, the normal
distribution can be
used to approximate
the binomial
distribution and the
Poisson distribution.
Solution:
• Let the random variable X denote the number of errors. Then X is a
binomial RV, and:
55
Example 4-18: Applying the Approximation
In a digital communication channel, assume that the number of bits received in
error can be modeled by a binomial random variable. The probability that a bit
is received in error is 10-5. If 16 million bits are transmitted, what is the
probability that 150 or fewer errors occur?
𝑛𝑛 = 16000000
𝑝𝑝 = 10−5
𝑛𝑛𝑛𝑛 = 160 > 5
P ( X ≤ 150 ) = P ( X ≤ 150.5 )
X − 160 150.5 − 160
= P ≤
(
160 1 − 10−5
) 160 (1 − 10−5 )
−9.5
= PZ ≤ = P ( Z ≤ −0.75104= ) 0.2263
12.6491
Using Excel
0.2263 = NORMDIST(150.5, 160, SQRT(160*(1-0.00001)), TRUE)
-0.7% = (0.2263-0.228)/0.228 = percent error in the approximation
56
Sec 4-7 Normal Approximation to the Binomial & Poisson Distributions
4-7 Normal Approximation to the
Binomial and Poisson Distributions
Example 4-18
• For the previous example, 𝑛𝑛 = 16 × 106 , 𝑝𝑝 = 1 × 10−5 ,
𝑛𝑛𝑛𝑛 = 160.
57
4-7 Normal Approximation to the
Binomial and Poisson Distributions
58
4-7 Normal Approximation to the
Binomial and Poisson Distributions
59
4-7 Normal Approximation to the
Binomial and Poisson Distributions
Example 4-20
60
4-8 Exponential Distribution
Definition
Probability distribution that describes the time between events in a Poisson point process, i.e., a
process in which events occur continuously and independently at a constant average rate
61
4-8 Exponential Distribution
Example:
In a large corporate computer network, user log-ons to the system can
be modeled as exponential process with a 𝝀𝝀 = 𝟐𝟐𝟐𝟐 log-ons per hour.
What is the probability that there are no log-ons in an interval of 6
minutes?
62
4-8 Exponential Distribution
SOLUTION:
Let X denote the time in hours from the start of the interval until the first log-on.
Then X has an exponential distribution with λ =25 log-ons/hour
Required: 𝑃𝑃(𝑋𝑋 > 6)
λ is given in hours. So we need to change all times in hours.
6 minutes = 0.1 hour !!!
∞
P ( X > 0.1)= ∫ 25e −25 x dx= e −25( 0.1)= 0.082
0.1
Using Excel
0.0821 = 1 - EXPONDIST(0.1,25,TRUE)
63
4-8 Exponential Distribution
Example (cont.)
Continuing, what is the probability that the time until the next
log-on is between 2 and 3 minutes (0.033 & 0.05 hours)?
0.05
P ( 0.033 < X < 0.05 ) =∫ 25e −25 x
dx
0.033
−25 x 0.05
=
−e =
0.152
0.033
An alternative solution is
P ( 0.033 < X < 0.05
= ) F ( 0.05) − F ( 0.033
= ) 0.152
Using Excel
0.148 = EXPONDIST(3/60, 25, TRUE) - EXPONDIST(2/60, 25, TRUE)
(difference due to round-off error)
64
4-8 Exponential Distribution
Example (cont.)
• Continuing, what is the interval of time such that the
probability that no log-on occurs during the interval is 0.90?
𝑃𝑃 𝑋𝑋 > 𝑥𝑥 = 0.9
+∞
+∞
𝑃𝑃 𝑋𝑋 > 𝑥𝑥 = � 25𝑒𝑒 −25𝑤𝑤 𝑑𝑑𝑤𝑤 = − 𝑒𝑒 −25𝑥𝑥 𝑥𝑥 = 𝑒𝑒 −25𝑥𝑥
𝑥𝑥
P ( X > x )= e −25 x= 0.90, − 25 x= ln ( 0.90 )
−0.10536
= x = 0.00421 = hour 0.25 minute
−25
• What is the mean and standard deviation of the time until the
next log-in? 1 1
µ= = = 0.04 hour= 2.4 minutes
λ 25
1 1
σ= = = 0.04 hour= 2.4 minutes
λ 25 65
4-8 Exponential Distribution
Our starting point for observing the system does not matter.
66
4-8 Exponential Distribution
Example (cont.)
Let X denote the time between detections of a particle with a Geiger
counter (nuclear radiation). Assume X has an exponential distribution with
E(X) = 1.4 minutes. What is the probability that a particle is detected in
the next 30 seconds?
P ( X < 0.5 ) =
F ( 0.5 ) =
1 − e −0.5 1.4 =
0.30
Using Excel
0.300 = EXPONDIST(0.5, 1/1.4, TRUE)
Now suppose we turn the Geiger counter and wait 3 minutes without detecting
a particle. What is the probability that a particle is detected in the next 30
seconds?
No particle has been detected in the last 3 minutes. Will the probability
increase since it is “due”?
The fact that you waited 3 minutes without a detection does not change
the probability of a detection in the next 30 seconds.
68
4-8 Exponential Distribution
Lack of Memory Property
Area: A+B+C+D=1
So we have two P(X<t2) = A/(A+B+C+D)
distributions with P(X<t1+t2 | x>t1) = C/(C+D)
this property; one
for discrete RVs.
(Geometric), the
second is for the
continuous RVs
(Exponential).
70
Tutorial 2:
1) A random variable has a standard normal distribution. Calculate the
probability that it lies in the following intervals (a) (0.25; 0.75) (b)
(−0.3; 0.1) (c) within 1.5 standard deviations of the mean (d) more than
two standard deviations from the mean (e) (−1.7;−0.2)
2) A random variable x has a normal distribution with mean 4 and standard
deviation 0.8. Calculate the probability that 3 ≤ x ≤ 4.4 (b) 2.5 < x < 3.9
(c) x > 4.6 (d) x < 4.2 (e) x is within 0.6 of the mean (f) | x |< 4.2
(g) | x | ≥ 4.2
3) A machine produces car pistons. The diameter of the pistons follows a
normal distribution with mean 6.04cm and standard deviation of 0.02
cm. The piston is acceptable if its diameter is in the range 6.010 cm to
6.055cm. What percentage of pistons is acceptable?
71