Professional Documents
Culture Documents
Ch04 - Continuous Random Variables and Probability Distributions
Ch04 - Continuous Random Variables and Probability Distributions
Zh
Chapter 4
g
an
Continuous Random
qi
ng
Variables and Probability
Ho
Distributions
T
UP
NJ
u
Zh
Section 4.1
g
an
Probability Density
qi
ng
Functions
Ho
T
UP
NJ
Continuous rv’s
u
Zh
A random variable X is continuous if
Possible values comprise either a single interval on the
g
an
number line (for some A < B, any number x between A
and B is a possible value) or a union of disjoint
qi
intervals
ng
P(X = c) = 0 for any number c that is a possible value of
Ho
X.
T
UP
NJ
Definition of pdf
u
Zh
Let X be a continuous rv.
Then a probability distribution or probability density
g
an
function (pdf) of X is a function f (x) such that for any
two numbers a and b with a ≤ b,
qi
𝑏
𝑃 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥
ng 𝑎
Ho
T
UP
NJ
Definition of pdf (cont.)
u
Zh
That is, the probability that X takes on a value in the
interval [a, b] is the area above this interval and under
g
the graph of the density function.
an
The graph of f (x) is often referred to as the density
qi
curve.
ng
Ho
T
UP
NJ
Properties/requirements of pdf
u
Zh
For f(x) to be a legitimate pdf, it must satisfy the following
two conditions:
g
an
f(x) ≥ 0 for all x
qi
ng
Ho
T
UP
NJ
P(X=c)=0 for a Continuous rv
u
Zh
When X is a discrete random variable, each possible
value is assigned positive probability.
g
an
This is not true of a continuous random variable (that
is, the second condition of the definition is satisfied)
qi
because the area under a density curve that lies above
ng
any single value is zero:
Ho
T
𝑃(𝑎 ≤ 𝑋 < 𝑏)
NJ
Example: Incompletely Specified pdf
u
Zh
Suppose that the pdf of a certain random variable X has
the following form:
g
cx, 0 x 4,
an
f ( x)
qi
0, otherwise,
ng
where c is a given constant. Determine the value of c.
Ho
Solution:
T
UP
NJ
Therefore, c= 1/8;
Example.
Calculating Probabilities from a pdf
u
Zh
Suppose that the pdf of X is
g
x / 8, 0 x 4,
an
f ( x)
qi
0, otherwise,
ng
Determine the values of 𝑃(1 ≤ 𝑋 ≤ 2) and 𝑃(𝑋 > 2).
Ho
2 3
Solutions: P(1 X 2) 1
xdx
1 8
T
16
UP
4 3
P( X 2) 1
xdx
NJ
2 8 4
Example
u
Zh
Suppose that the pdf of a certain random variable X
has the following form:
g
an
qi
ng
Ho
T
UP
NJ
NJ
UP
T
Example (cont.)
Ho
ng
qi
an
g
Zh
u
Example (cont.)
u
Zh
g
an
qi
ng
Because whenever 0 ≤ 𝑎 ≤ 𝑏 ≤ 360 in this example,
P(a ≤ X ≤ b) depends only on the width b − a of the
Ho
interval, X is said to have a uniform distribution.
T
UP
NJ
Uniform Distribution
u
Zh
A continuous rv X is said to have a uniform
distribution on the interval [A, B] if the pdf of X is
g
an
qi
ng
Ho
T
UP
NJ
NJ
UP
T
Ho
Homework 4.1(1)
ng
qi
an
g
Zh
u
NJ
UP
T
Ho
Homework 4.1(2)
ng
qi
an
g
Zh
u
u
Zh
Section 4.2
g
an
Cumulative Distribution
qi
ng
Functions and Expected
Ho
Values
T
UP
NJ
Definition of cdf
The cumulative distribution function F(x) for a
u
Zh
continuous rv X is defined for every number x by
g
an
For each x, F(x) is the area under the density curve to
qi
the left of x.
ng
Ho
T
UP
NJ
Using F(x) to Compute Probabilities
u
Zh
Let X be a continuous rv with pdf f (x) and cdf F(x). Then
for any number a,
g
𝑃 𝑋 > 𝑎 = 𝑃 𝑋 ≥ 𝑎 = 1 − 𝐹(𝑎)
an
and for any two numbers a and b with a < b,
qi
𝑃 𝑎≤𝑋≤𝑏 =𝑃 𝑎<𝑋<𝑏
ng
=𝑃 𝑎<𝑋≤𝑏 =𝑃 𝑎≤𝑋<𝑏
= 𝐹 𝑏 − 𝐹(𝑎)
Ho
T
UP
NJ
Example
u
Zh
Suppose the cdf of the magnitude X of a dynamic load
on a bridge (in newtons) is given by
g
an
qi
ng
Then the probability that the load is between 1 and
Ho
1.5 is
T
UP
NJ
Example (cont.)
u
Zh
The probability that the load exceeds 1 is
g
an
qi
ng
In-class exercise: The probability that the load is
between 1 and 2 is
Ho
0.688.
T
UP
NJ
Obtaining f (x) from F(x)
u
Zh
If X is a continuous rv with pdf f(x) and cdf F(x), then
at every x at which the derivative F’(x) exists,
g
an
F’(x) = f(x).
qi
ng
Ho
T
UP
NJ
Example: Calculating a pdf from a cdf
u
Zh
Let the cdf of a random variable be
g
0, x 2
an
1 3 x3
F ( x) 4 x , 2 x 2
qi
2 32 3
x2
ng
Ho 1,
Find the pdf.
T
Solution:
UP
3
(4 x 2 ), 2 x 2
NJ
f ( x) F ' ( x) 32
0, otherwise
Expected Values
u
Zh
The expected or mean value of a continuous rv X with
pdf f (x) is
g
an
qi
If X is a continuous rv with pdf f(x) and h(X) is any
function of X, then
ng
Ho
T
UP
NJ
Example
u
Zh
The pdf of weekly gravel sales X was
g
an
qi
ng
So Ho
T
UP
NJ
In-class Exercise
u
Zh
Compute the expected value of a uniform distribution
with pdf
g
1
an
a x b,
f ( x) b a
qi
0 otherwise.
Solution: ng
Ho
ab
b
x
E ( X ) xf ( x)dx dx
T
ba 2
UP
a
NJ
Example
u
Zh
Let V be a continuous random variable with pdf
1
g
0 v a,
an
f (v ) a
qi
0 otherwise.
ng
Compute the expected value of 𝑊 = 𝑘𝑉 2 .
Ho
Solution:
T
a
UP
1 1 2
E (W ) kv f (v)dv kv dv ka .
2 2
a 3
NJ
0
In-class Exercise
u
Zh
Let X be a continuous random variable with pdf
g
e x x 0,
an
f ( x)
0 x 0.
qi
ng
Compute the expected value of 𝑌 = 𝑒 −2𝑋 .
Ho
Solution:
T
UP
1
E (Y ) e 2 x
f ( x)dx e 2 x x
e dx .
NJ
0
3
Variance of a Continuous rv
u
Zh
The variance of a continuous random variable X with
pdf f(x) and mean value 𝜇 is
g
an
qi
ng
The standard deviation (SD) of X is
Ho
T
UP
NJ
A Shortcut Formula for V(X)
u
Zh
V(X)=E(X2)-[E(X)]2
g
an
Proof:V(X)=E[X-E(X)]2
qi
=E{X2-2XE(X)+[E(X)]2}
ng
Ho
=E(X2)-2[E(X)]2+[E(X)]2
=E(X2)-[E(X)]2
T
UP
NJ
u
Zh
The pdf of weekly gravel sales X was
g
an
qi
ng
We have computed Ho
T
UP
NJ
NJ
UP
T
Example (cont.)
Ho
ng
qi
an
g
Zh
u
In-class Exercise
u
Compute the variance of a uniform distribution with pdf
Zh
1
a x b,
f ( x) b a
g
0 otherwise.
an
ab
b
x
qi
Solution: We computed E ( X ) xf ( x)dx dx .
a
ba 2
ng
So V ( X ) E ( X 2 ) E ( X ) 2
Ho
x
b
1 ab
dx
b a
2 2
2
.
T
ba 2 12
UP
b a
NJ
ab
2
Conclusion: E( X ) , V (X )
2 12
Homework 4.2(1)
u
Zh
The cdf of an rv X is
g
an
qi
Use this to compute the following:
ng
a. The probability density function f(x)
b. P(X ≤ 1)
Ho
c. P(0.5 ≤ X ≤ 1)
T
e. E(X)
NJ
f. V(X) and 𝜎𝑋
u
Zh
Section 4.3
g
an
The Normal Distribution
qi
ng
Ho
T
UP
NJ
Motivation
u
Zh
The normal distribution is the most important one in
all of probability and statistics.
g
an
qi
Before defining it, let’s see why it is so important with
a simple but informative example…
ng
Ho
Suppose you have n dice. You roll them and count the
total number of dots you see. Call this random
T
u
Zh
These probability mass functions look more and more
like a bell-shaped curve…
g
an
qi
Remarkably the sum of many independent random
variables almost always looks similar to a bell curve !!!
ng
No matter what these random variables look like
Ho
themselves…
T
u
A continuous rv X is said to have a normal distribution
Zh
with parameters 𝜇 and 𝜎 (or 𝜇 and 𝜎 2 ), where −∞ <
𝜇 < ∞ and 0 < 𝜎, if the pdf of X is
g
( x )2
1
an
f ( x; , ) e , x
2 2
2
qi
The statement that X is normally distributed with
ng
parameters 𝜇 and 𝜎 2 is often abbreviated 𝑋~𝑁(𝜇, 𝜎 2 ).
Clearly 𝑓(𝑥; 𝜇, 𝜎) ≥ 0 but a somewhat complicated
Ho
calculus argument must be used to verify that
∞
−∞ 𝑓 𝑥; 𝜇, 𝜎 𝑑𝑥 = 1.
T
UP
u
The density curve is symmetric about 𝜇 and bell-
Zh
shaped, so the center of the bell (point of symmetry)
is the mean of the distribution.
g
an
P μ h X μ
qi
P μ X μ h
ng
Ho
T
UP
NJ
Shapes with different μ’s
u
Zh
f(x)
g
=5
an
=5
qi
ng
Ho
1
T
O x
UP
NJ
Shapes with different σ’s
u
Zh
f(x)
0.5
0.798
g
an
1
qi
0.399 1.5
0.266 ng
Ho
T
UP
O x
NJ
Why Standard Normal Distribution?
u
Zh
To compute 𝑃(𝑎 ≤ 𝑋 ≤ 𝑏) when X is a normal rv with
parameters 𝜇 and 𝜎, we must determine
g
an
qi
Unfortunately, none of the standard integration
ng
techniques can be used to evaluate this expression.
Ho
Instead, for 𝜇 = 0 and 𝜎 = 1, the expression has been
calculated using numerical techniques and tabulated
T
u
Zh
and 𝜎 = 1 is called the standard normal distribution.
A random variable having a standard normal
g
distribution is called a standard normal random
an
variable and will be denoted by Z.
qi
The pdf of Z is
ng
Ho
The graph of 𝑓(𝑧; 0,1) is called the standard normal
T
(or z) curve.
UP
𝑧
The cdf of Z is 𝑃 𝑍 ≤ 𝑧 = −∞ 𝑓(𝑦; 0,1) 𝑑𝑦, which
NJ
u
Zh
(x ) (x )
g
an
qi
ng
Ho
T
1
1 0 ;
UP
2
NJ
2 x R , x 1 x ;
Standard Normal Table
The standard normal distribution does not frequently
u
Zh
serve as a model for a naturally arising population.
Instead, it is a reference distribution from which
g
information about other normal distributions can be
an
obtained.
qi
Appendix Table A.3 (page 672) gives Φ 𝑧 = 𝑃(𝑍 ≤ 𝑧),
the area under the standard normal density curve to
ng
the left of z, for z = -3.49, -3.48, . . . , 3.48, 3.49.
Ho
T
UP
NJ
Example
u
Zh
Let’s determine the following standard normal
probabilities.
g
an
𝑃(𝑍 ≤ 1.25)
Solution: 𝑃 𝑍 ≤ 1.25 = Φ 1.25 = 0.8944
qi
𝑃(𝑍 > 1.25)
ng
Solution: 𝑃 𝑍 > 1.25 = 1 − Φ 1.25 = 0.1056
Ho
T
UP
NJ
Example (cont.)
u
𝑃(−0.38 ≤ 𝑍 ≤ 1.25)
Zh
Solution: 𝑃 −0.38 ≤ 𝑍 ≤ 1.25 = Φ 1.25 −
Φ −0.38 = 0.8944 − 0.3520 = 0.5424
g
an
qi
ng
Ho
Exercise: 𝑃(𝑍 ≤ −1.25)
T
UP
u
Zh
g
an
qi
ng
Ho
T
UP
NJ
Proof
NJ
UP
T
Ho
ng
qi
an
g
Zh
u
Example
u
Zh
g
an
qi
ng
Ho
T
UP
NJ
u
Zh
If the population distribution of a variable is
(approximately) normal, then
g
an
1. Roughly 68% of the values are within 1 SD of the
mean.
qi
2. Roughly 95% of the values are within 2 SDs of the
mean.
ng
Ho
3. Roughly 99.7% of the values are within 3 SDs of the
mean.
T
UP
u
Zh
g
an
qi
ng
Ho
3 2 2 3
68.26%
T
UP
95.44%
NJ
99.74%
Example: Verify the Empirical Rule
u
Zh
P(| X | ) (1) (1) 0.6826
g
P(| X | 2 ) (2) (2) 0.9544
an
P(| X | 3 ) (3) (3) 0.9974
qi
ng
Ho
T
UP
NJ
Expected Value and Variance of Standard
Normal Distribution
u
Zh
x2
1
If 𝑋~𝑁 0,1 , then ( x) e 2
x
2
g
an
x2
1
E ( X ) x ( x)dx xe 2
dx 0
2
qi
ng
x2
1
E ( X ) x ( x)dx
2 2
x e
2 2
dx 1
2
Ho
V ( X ) E ( X 2 ) ( E ( X )) 2 1 0 1
T
UP
Conclusion:
E ( X ) 0, V ( X ) 1
NJ
Expected Value and Variance of Normal
Distribution
u
Zh
𝑋−𝜇
If 𝑋~𝑁 𝜇, 𝜎 2 , then 𝑍 = ~𝑁(0,1). We have just
𝜎
proved that
g
E ( Z ) 0, V ( Z ) 1
an
qi
Since X Z ,
ng
E ( X ) E (Z ) E ( Z )
Ho
V ( X ) V (Z ) 2V ( Z ) 0 2
T
UP
Conclusion: E ( X ) ,V ( X ) 2
NJ
Homework 4.3(1)
u
Zh
Let 𝑋~𝑁(2, 𝜎 2 ),
a) Compute 𝑃(𝑋 > 2).
g
an
b) If 𝑃 0 < 𝑋 < 2 = 0.4, compute 𝑃 𝑋 > 4 .
c) If 𝜎 = 4, using the table of Standard Normal CDF at
qi
the end of the textbook and compute the following
ng
probabilities:
𝑃 𝑋≤6
Ho
𝑃 𝑋 > −3
𝑃(−5 ≤ 𝑋 < 1)
T
𝑃(|𝑋| < 2)
UP
https://en.wikipedia.org/wiki/Standard_normal_table