Variables Proble PDF
Variables Proble PDF
Variables Proble PDF
4 Variables and
Probability Distributions
Stat 4570/5570
Material from Devore’s book (Ed 8) – Chapter 4 - and Cengage
Continuous r.v.
A random variable X is continuous if possible values
comprise either a single interval on the number line or a
union of disjoint intervals.
2
Continuous r.v.
In principle variables such as height, weight, and
temperature are continuous, in practice the limitations of
our measuring instruments restrict us to a discrete (though
sometimes very finely subdivided) world.
3
Probability Distributions for Continuous Variables
5
Probability Distributions for Continuous Variables
6
Probability Distributions for Continuous Variables
7
Probability Distributions for Continuous Variables
Definition
Let X be a continuous r.v. Then a probability distribution
or probability density function (pdf) of X is a function f (x)
such that for any two numbers a and b with a ≤ b, we have
Z b
P (a X b) = f (x)dx
a
8
Probability Distributions for Continuous Variables
9
Probability Distributions for Continuous Variables
10
Example
Consider the reference line connecting the valve stem on a
tire to the center point.
11
Example, cont cont’d
Figure 4.3
12
Example , cont cont’d
Clearly f(x) ≥ 0. How can we show that the area of this pdf
is equal to 1?
13
Probability Distributions for Continuous Variables
Definition
A continuous rv X is said to have a uniform distribution
on the interval [A, B] if the pdf of X is
14
Example
“Time headway” in traffic flow is the elapsed time between
the time that one car finishes passing a fixed point and the
instant that the next car begins to pass that point.
Figure 4.4
16
Example cont’d
17
Integrating functions in R
18
The Cumulative Distribution Function
The cumulative distribution function F(x) for a
continuous rv X is defined for every number x by
F(x) = P(X ≤ x) =
For each x, F(x) is the area under the density curve to the
left of x. This is illustrated in Figure 4.5, where F(x)
increases smoothly as x increases.
Figure 4.6
20
Example , cont cont’d
21
Example , cont cont’d
Figure 4.7
22
Using F(x) to Compute Probabilities
23
Percentiles of a Continuous Distribution
When we say that an individual’s test score was at the 85th
percentile of the population, we mean that 85% of all
population scores were below that score and 15% were
above.
24
Percentiles of a Continuous Distribution
Proposition
Let p be a number between 0 and 1. The (100p)th
percentile of the distribution of a continuous rv X, denoted
by η(p), is defined by
Z ⌘(p)
p = F (⌘(p)) = f (y)dy
1
η(p) is the specific value such that 100p% of the area
under the graph of f(x) lies to the left of η(p) and 100(1 – p)
% lies to the right.
25
Percentiles of a Continuous Distribution
Thus η(.75), the 75th percentile, is such that the area under
the graph of f(x) to the left of η(.75) is .75.
26
Example 9
The distribution of the amount of gravel (in tons) sold by a
particular construction supply company in a given week is a
continuous rv X with pdf
What is the cdf of sales for any x? How do you use this to
find the probability that X is less than .25? What about the
probability that X is greater than .75? What about
P(.25 < X < .75)?
27
Example 9 cont’d
Figure 4.11
28
Example 9 cont’d
29
Percentiles of a Continuous Distribution
Definition
The median of a continuous distribution, denoted by , is
the 50th percentile, so satisfies .5 = F( ) That is, half the
area under the density curve is to the left of and half is to
the right of . The 25th percentile is called the lower
quartile and the 75th percentile is called the upper
quartile.
30
Expected Values
Definition
The expected (or mean) value of a continuous r.v. X with
the pdf f (x) is:
Z 1
µX = E(X) = x · f (x)dx
1
31
Example, cont
Back to the gravel example, the pdf of the amount of
weekly gravel sales X is:
What is EX?
32
Expected Values of functions of r.v.
33
Variance
The variance of a continuous random variable X with pdf
f(x) and mean value µ is
Z 1
2
X = V (X) = (x µ)2 · f (x) dx
1
= E[(X E(X))2 ]
= E(X 2 ) E(X)2
35
The Normal Distribution
The normal distribution is probably the most important
distribution in all of probability and statistics.
36
The Normal Distribution
Definition
1 (x µ)2 /2 2
f (x; µ, ) = p e where 1<x<1
2⇡
37
The Normal Distribution
The statement that X is normally distributed with
parameters µ and σ2 is often abbreviated X ~ N(µ, σ2).
38
The Normal Distribution
Figure below presents graphs of f(x; µ, σ) for several
different (µ, σ) pairs.
39
The Standard Normal Distribution
The normal distribution with parameter values µ = 0 and
σ = 1 is called the standard normal distribution.
41
The Standard Normal Distribution
Figure below illustrates the probabilities tabulated in Table
A.3:
42
Example cont’d
43
Example , cont. cont’d
b) P(Z ≥ 1.25) = ?
c) Why does P(Z ≤ –1.25) = P(Z >= 1.25)? What is
(–1.25)?
d) How do we calculate P(–.38 ≤ Z ≤ 1.25)?
44
Example
The 99th percentile of the standard normal distribution is
that value of z such that the area under the z curve to the
left of the value is .99
Tables give for fixed z the area under the standard normal
curve to the left of z, whereas now –
we have the area and want the value of z.
45
Example cont’d
46
Percentiles of the Standard Normal Distribution
47
zα Notation
In statistical inference, we need the z values that give
certain tail areas under the standard normal curve.
48
zα Notation for z Critical Values
For example, z.10 captures upper-tail area .10, and z.01
captures upper-tail area .01.
Since α of the area under the z curve lies to the right of zα,
1 – α of the area lies to its left.
49
Example – critical values
z.05 is the 100(1 – .05)th = 95th percentile of the standard
normal distribution, so z.05 = 1.645.
50
Nonstandard Normal Distributions
When X ~ N(µ, σ 2), probabilities involving X are computed
by “standardizing.” The standardized variable is (X – µ)/
σ.
Proposition
If X has a normal distribution with mean µ and standard
deviation σ, then
53
THE NORMAL
DISTRIBUTION IN R.
54
Exponential Distribution
55
The Exponential Distributions
The family of exponential distributions provides probability
models that are very widely used in engineering and
science disciplines. Examples?
Definition
X is said to have an exponential distribution with the rate
parameter λ (λ > 0) if the pdf of X is
56
The Exponential Distributions
Integration by parts give the following results:
CDF:
57
The Exponential Distributions
Another important application of the exponential distribution
is to model the distribution of lifetimes, or times to an
event.
58
The Exponential Distributions
Suppose a light bulb’s lifetime is exponentially distributed
with parameter λ.
Say you turn the light on, and then we leave and come
back after t0 hours to find it still on. What is the probability
that the light bulb will last for at least additional t hours?
59
The Chi-Squared Distribution
Definition
Let v be a positive integer. Then a random variable X is
said to have a chi-squared distribution with parameter v if
the pdf of X is the gamma density with α = v/2 and β = 2.
The pdf of a chi-squared rv is thus
(4.10)
Definition
A random variable X is said to have a Weibull distribution
with parameters α and β (α > 0, β > 0) if the pdf of X is
(4.11)
What is this distribution if alpha = 1?
61
The Weibull Distribution
Both α and β can be varied to obtain a number of different-
looking density curves, as illustrated below.
62
The Weibull Distribution
β is called a scale parameter, since different values stretch
or compress the graph in the x direction, and α is
referred to as a shape parameter.
63
The Beta Distribution
So far, all families of continuous distributions (except for the
uniform distribution) had positive density over an infinite
interval.
64
The Beta Distribution
Definition
A random variable X is said to have a beta distribution
with parameters α, β (both positive), A, and B if the pdf of
X is
65
The Beta Distribution
Figure below illustrates several standard beta pdf’s.
67
Example 1
Suppose the pdf of the magnitude X of a dynamic load on a
bridge (in newtons) is
68
Example 1 cont’d
69
Example 1 cont’d
70
Example 2
The time that it takes a driver to react to the brake lights on
a decelerating vehicle is critical in helping to avoid rear-end
collisions.