ProbabilityDistributionsContinuousRandomVariables

advertisement
Probability
Distributions
Continuous Random Variables
Continuous Random Variables

A random variable was a numerical value
associated with the outcome of an experiment.
 Finite
discrete random variables were ones in which
the values were countable whole numbered values

A continuous random variable is a random
variable that can assume any value in some
interval of numbers, and are thus NOT
countable.
 Examples:
 The time that a train arrives at a specified stop
 The lifetime of a transistor
 A randomly selected number between 0 and 1
 Let R be a future value of a weekly ratio of closing prices for
IBM stock
 Let W be the exact weight of a randomly selected student
Continuous Random Variables

A random variable is said to be continuous if there is a function fX(x)
with the following properties:


Domain: all real numbers
Range: fX(x)≥0
 The area under the entire curve is 1


Such a function fX(x) is called the probability density function
(abbreviated p.d.f.)
The fact that the total area under the curve fX(x) is 1 for all X values
of the random variable tells us that all probabilities are expressed in
terms of the area under the curve of this function.

Example: If X are values on the interval from [a,b], then the P(a≤X≤b) =
area under the graph of fX(x) over the interval [a,b]
fX
A
a
b
Continuous Random Variables

Because all probabilities for a continuous
random variable are described in terms of the
area under the p.d.f. function, the P(X=x) = 0.
 Why:
the area of the p.d.f. for a single value is zero
because the width of the interval is zero!
 That is, for any continuous random variable, X,
P(X = a) = 0 for every number a. This DOES NOT
imply that X cannot take on the value a, it simply
means that the probability of that event is 0.
Continuous Random Variables

Rather than considering the probability of X taking on a
given single value, we look for the probability that X
assumes a value in an interval.

Suppose that a and b are real numbers with a < b.
Recall that X  a is the event that X assumes a value in
the interval(, a]. Likewise, a < X  b and b < X are the
events that X assumes values in (a, b] and (b, ),
respectively. These three events are mutually exclusive
and at least one of them must happen. Thus,


P(X  a) + P(a < X  b) + P(b < X) = 1.
Since we are interested in the probability that X takes a
value in an interval, we will solve for P(a < X  b).
Continuous Random Variables
P  X  a   P a  X  b   P b  X   1
P a  X  b   1  P  X  a   P b  X 
P a  X  b   1  P  X  a   1  P  X  b 
P a  X  b   1  P  X  a   1  P  X  b 
P a  X  b   P  X  b   P  X  a 
P a  X  b   FX (b)  FX ( a )

Because X is a continuous random variable, P(X = a) =
0 and P(X = b) = 0. Thus, it makes no difference
whether or not we include the end points in an interval.
A  FX (b)  FX (a)  P(a  X  b)
 P ( a  X  b)
 P ( a  X  b)
 P(a  X  b).
The cumulative distribution function
The same probability information is often
given in a different form, called the
cumulative distribution function, (c.d.f),
FX(x)
 FX(x)=P(Xx)
 0  FX(x) 1, for all x
 Domain is all real numbers

Example

The p.d.f. of T, the weekly CPU time (in
hours) used by an accounting firm, is
given below.
if t  0
0
3 2
fT (t )   t (4  t ) if 0  t  4
64
1
if t  4

Example (cont)

The graph of the p.d.f. is given below:
0.5
0.4
0.3
f T (t )
0.2
0.1
0
-4
-2
-0.1
0
2
t
4
6
Example (cont)
 P(1  T  2) is
equal to the area between the
graph of and the t-axis over the interval.
0.5
0.4
0.3
f T (t )
0.2
0.1
0
-4
-2
-0.1
0
2
t
4
6
Another Example

The c.d.f. of T (for the previous example)
is given below.
if t  0
0
 1
FT (t )   t 3 (16  3t ) if 0  t  4
256
1
if t  4


Find
P(1  T  2)
The graph of the c.d.f.
1.2
1.0
0.8
0.6
F T (t )
0.4
0.2
0.0
-4
-2
-0.2 0
2
t
4
6
Solution
P (1  T  2)  P (T  2)  P (T  1)
 P (T  2)  P (T  1)
 FT (2)  FT (1)
1
1 3
3

(2 )(16  3  2) 
(1 )(16  3 1)
256
256
 0.2617
Expected Value—Continuous
Random Variable

For discrete finite random variables, the
expected value was determined by taking
each value of the random variable and
multiplying it by the corresponding
probability as stated by:
E( X ) 
 x  fX ( x)
all x
Expected Value (cont)




For a continuous random
variable, the process is more
tricky.
For example, suppose we
wanted to know the expected
value of X which is defined on
the interval [0,2].
Unfortunately, the P(X=a) for
any number is 0
So when we try to compute the
expected value we’re adding
up a whole bunch of zeros
X=x
fX(x)
x fX(x)
0
fX(0)
0 fX(0)
1
fX(1)
1 fX(1)
2
fX(2)
2 fX(2)
Expected Value (cont)




We need some other way of looking for the
expected value for a continuous random
variable.
Unfortunately, this requires calculus which you
will learn more about in 115b
Basically we need to find the area under the
entire curve for the function x fX(x)
We can’t do this without knowing some calculus
so we’ll give a more geometric interpretation of
the E(X) for a continuous random variable.
Expected Value—Geometric
Interpretation

We can use the probability density function to give a geometric
interpretation for the mean of a continuous random variable, X.
Suppose that we draw the p.d.f. on a thin sheet of metal and cut out
the region between the graph of f(X) and the x-axis. If we place a
knife edge under a line through  on the x-axis and perpendicular to
that axis, then the metal sheet will balance on that edge.
fX
X
A more concrete example
Consider the p.d.f. shown below for a
continuous random variable X
p.d.f. of X
0.4
0.3
f X (x )

0.2
0.1
0
0
1
2
3
4
x
5
6
7
8
Expected Value—Geometric
Interpretation

Note: The mean does not occur at the highest
point of the graph!
 x-coordinate
of highest point is the mode.
 In the previous example, this was at x = 1

Note: The mean does not divide the area in
half!
 x-coordinate
that does this is the median.
 In previous example, the median is approximately
0.3466.
Special Distribution
A continuous uniform random variable
is a random variable defined on an interval
such that every subinterval of having the
same length has the same probability.
 If X is a continuous uniform random
variable on the interval , then

if x  a
 0
 1
f X ( x)  
if a  x  b
b  a
if x  b.
 0
if x  a
 0
x  a
FX ( x)  
if a  x  b
b  a
if x  b.
 1
Example—Uniform Distribution

A bus arrives at a bus stop every 10
minutes. Let W be the waiting time (in
minutes) until the next bus. The p.d.f. and
c.d.f. of W are given below.
0 if w  0
1
fW ( w)   if 0  w  10
10
0 if w  10
0 if w  0
w
FW ( w)  
if 0  w  10
10
if w  1
1
Uniform Distribution: p.d.f. & c.d.f.
0.120
0.100
0.080
f W (w )
0.060
0.040
0.020
0.000
-5
-0.020 0
5
10
15
10
15
w
1.2
1.0
0.8
F W (w )
0.6
0.4
0.2
0.0
-5
-0.2 0
5
w
Questions:
P(4  W  6)

Find

Find E(X)
 Notice
.
that The expected value of W is given
by:
E (W )  W 
0  10
5
2
Special Distribution
An exponential random variable may be
used to model the length of time between
consecutive occurrences of some event in
a fixed unit of space or time.
 If X is an exponential random variable with
parameter, then

0


f X ( x)   1  x / 
e


if x  0
if x  0.
0
FX ( x)  
x /
1

e

if x  0
if x  0.
Example

On average, three customers per hour use
the ATM in a local grocery store. Let T be
the time (in minutes) between consecutive
customers. The p.d.f. and c.d.f. of T are
given below.
0
if t  0


fT (t )   1 t / 20
e
if t  0

 20
if t  0
0
FT (t )  
t / 20
1

e
if t  0

Exponential Distribution: p.d.f. &
c.d.f.
0.06
0.05
0.04
0.03
f T (t )
0.02
0.01
0.00
-20 -0.01 0
20
40
60
80
100
120
t
1.2
1.0
0.8
F T (t )
0.6
0.4
0.2
0.0
-20 -0.2 0
20
40
60
t
80
100
120
Questions:
P(T  15)

Find

The expected value cannot be determined
from the p.d.f. function without using
calculus so we’ll simply tell you that:
E( X )   X  

The expected value of T is given by:
E (T )  T    20
Summary of Distributions
RANDOM VARIABLE, X
Type
Values
Finite
A finite set of numbers
x1, x2, x3, ¼, xn
Probability Mass Function, fX
p.m.f.
P(X = x) = fX(x)
Probability
fX(x)
Continuous
All numbers in an interval
Probability Density Function, fX
p.d.f.
area


 under the 
P ( a  X  b)  
graph of f X 


 over [a, b] 
fX(x)
x
a
b
x
Summary of Distributions
RANDOM VARIABLE, X
Type
Values
Cumulative
Probability
Finite
A finite set of numbers
x1, x2, x3, ¼, xn
Cumulative Distribution
Function, FX
c.d.f.
P(X  x) = FX (x)
Continuous
All numbers in an interval
Cumulative Distribution
Function, FX
c.d.f.
P(X  x) = FX (x)
FX(x)
FX(x)
x
x
Expected Values

Finite Discrete Random Variables:
 E( X ) 
 x  fX ( x)
all x

Continuous Random Variables:
Distribution: E ( X )   X  a  b
2
 Exponential Distribution: E ( X )   X  
 Uniform
Additional Information
See Distribution Study Guide under
“Worksheets” link on my webpage
 Make sure you are able to distinguish
between the various types of distributions,
their expected values, the c.d.f. and p.d.f.

Download