Chapter 3 Continuous Random Variables
description
Transcript of Chapter 3 Continuous Random Variables
Chapter 3 Continuous Random Variables
3.2 – Definitions
Definition 3.2.1 A random variable X is said to be continuous if there exists a function f called the probability density function (p.d.f ) which is continuous at all but a finite number of points and satisfies the following three properties:
( ) 0 for all
(
1.
2.
3 ) ).
) 1
( (b
a
f x x
f x dx
P a X b f x dx
The c.d.f.
• The cumulative distribution function (c.d.f.) of a continuous random variable X is
• An important relationship:
( ) ( ) ( )x
F x P X x f t dt
( ) ( ) ( )xdF x f t dt f x
dx
Example 3.2.1
Suppose that X is a continuous random variable with range [1, 2] and p.d.f
2 2 1 2( )
0 elsewherex x
f x
2 22
11(
Verif
) 2 2 2 (4 4) (1 2) 1
y Property 2:
f x dx x dx x x
Example 3.2.1
• Calculate :
• Find the c.d.f.:
1.25 1.252 2
11(1 1.25) 2 2 2 (1.25 2(1.25)) (1 2)
0.0625
P X x dx x x
2
1
( ) ( ) ( )
0 1
2 2 2 1 1 2
1 2
x
x
F x P X x f t dt
x
t dt x x x
x
Definition 3.2.2
Let X be a continuous random variable with p.d.f. f (x)
2 2 2
: ( ) ( )
: ( ) ( ) ( ) ( )
: ( )
: ( ) ( )
( ) : [ ( )] ( ) ( )
tX tx
Mean E X x f x dx
Variance Var X E X x f x dx
Standard Deviation Var X
Moment - generating function M t E e e f x dx
Expected value of u X E u X u x f x dx
Example 3.2.2
22 3 2
11
22 2
1
22
211
22 2
2 2 1 2( )
0 elsewhere
2 5(2 2)3 3
1( 5 / 3) (2 2)18
1 1( ) (2 2)
Mean :
Varian
2
1 1 12 2 for 0
ce :
m.g.f. :x
tx tx
x
t t
x xf x
x x dx x x
x x dx
xM t e x dx et t
e e tt t t
Percentiles
Definition 3.2.3 Let X be continuous random variable with p.d.f. f and c.d.f. F, and let p be a number between 0 and 1. The (100p)th percentile is a value of X, denoted πp, such that
• The 50th percentile is called the median and is denoted m.
• The mode of X is the value x for which f is maximum.
( )p
pp f x dx F
Special Percentiles
• 25th – First Quartile – p1 = π0.25 • 50th – Second Quartile – p2 = π0.50 = m• 75th – Third Quartile – p3 = π0.75
Example 3.2.4
22 2 1 2( ) ( ) 2 1 for 1 2
0 elsewherex x
f x F x x x x
1 0.25
20.25 0.25 0.25 0.25
Find
0.
: Solve
25 2
the quadratic
.1 1 5
p
F
3.3 – Uniform and Exponential
Definition 3.3.1 A continuous random variable X has a uniform distribution if its p.d.f. is
where a < b are any real numbers. The phrases “X is U(a, b)” and “X is uniformly distributed over [a, b]” mean that X has this type of distribution.
1( )
0 otherwise
a x bf x b a
Uniform Distribution
2
2 2
22
1 12
12 2
( )( ) 12
2( )Variance : m.g.f. : ( ) , 0
1
e :
)
M a
(
n
2
bb
aa
tb ta
xx dxb a b a
b ab a
b a b ab a
a b
b a e eM t tt b a
Example 3.3.2
The owner of a local gas station observes that customers typically purchase between five and 20 gallons of gasoline at each fill-up and that no amount is more frequent than any other. If gas costs $2.50 per gallon, find the probability that a randomly selected customer spends more than $30 on gas.
Example 3.3.2
Let X = gallons of gas purchased by a customer– Assume X is U(5, 20)– for
Let Y = amount of money spent by a customer– Y = 2.5X
20
12
( 30) (2.5 30) ( 12)1 8 0.533
20 5 15
P Y P X P X
dx
Exponential Distribution
Definition 3.3.2 A random variable X has an exponential distribution if its p.d.f. is
where – Describes waiting time between events that are
described by a Poisson distribution
00 otherwise
xe xf x
Exponential Distribution
22
0
1Mean :
1Variance :
c.d.f. : ( ) ( ) 1 for 0
( ) 1
m.g.f. : ( )
( ) 1 1 for 0
x xt x
x x
t
F x P X x F x f t dt e dt e x
P X x P X x e e
M t
x
Example 3.3.6
Suppose a manufacturer of electrical wire observes a mean of 0.5 defects per 100 ft of wire. Find the mean distance between defects (in ft) and find the probability that the distance between one defect and the next is less than 125 ft.– Assume the number of defects per ft has a Poisson
distribution0.5 defects 0.005 defects/ft100 ft
Example 3.3.6
Let X = the distance in ft between defects– “Wait time” between defects– X is exponential with
0.005(125)
1 2000.005
( 125) (125) 1 0.465
Mean :
P X F e
3.4 – The Normal Distribution
Definition 3.4.1 A continuous random variable Z has a standard normal distribution if its p.d.f. is
2 /21( ) for2
zf z e z
2 /2
2
m.g.f. :Mea
( )0
Variance 1
n :
:
tM t e
The c.d.f.
See Table C.1 – Two important properties
Example 3.4.1
2 /21( ) ( )2
z tz P Z z e dt
( ) 1 ( ) 1 ( )( ) (
1.) (. )2
P Z z P Z z zP a Z b b a
( 2.05) 0.9798( 1.23) 1 ( 1.23) 1 0.1093 0.8907
( 2.65 0.23) (0.23) ( 2.65) 0.5910 0.0040 0.5870
P ZP Z
P Z
The Normal Distribution
Definition 3.4.2 A continuous random variable X has a normal distribution if its p.d.f. is
where μ is any real number and σ > 0– The phrase “X is ” means that X has a normal
distribution with parameters μ and σ
2 2( ) / 21( ) for2
xf x e x
2 22: :: ( ) exp
2tM t t
VarianMean m.g.fc .e
The Normal Distribution
Empirical Rule( ) 0.68, ( 2 2 ) 0.95
and ( 3 3 ) 0.997P X P X
P X
Relationship
Theorem 3.4.1 If X is then the random variable is Proof: We find the c.d.f. of Z:
2 2( ) / 2
( ) ( ) ( )
12
z x
XF z P Z z P z P X z
e dx
Let so that ,
Thus
so Z has the same c.d.f. as that of a standard normal random variable. Therefore, it must have the same p.d.f., and we conclude that Z is N (0, 1).
, and( )
x yzx z y z
2 /21( ) ( )2
z yF z e dy z
Application
The “z-score” of x is
( ) X xP X x P
( ) ( )
xz
P X x P Z z z
Example 3.4.2
Consider the random experiment of choosing a woman at random and measuring her height. Let the random variable X be the height in inches. Assuming that X is , find the probability of selecting a woman who is between 60 and 62 inches tall.
Example 3.4.2
We want – Calculate z-scores:
1 260 63.6 62 63.61.44 and 0.64
2.5 2.5z z
(60 62) ( 1.44 0.64)( 0.64) ( 1.44)
0.2611 0.0749 0.1862
P X P Z
3.5 – Functions of Continuous Random Variables
Goal: To find the p.d.f. of a variable defined in terms of another variable– An important relationship
– Second Fundamental Theorem of Calculus
( )( ) ( ( ))
u x
a
d duf t dt f u xdx dx
( ) ( ) ( )xdF x f t dt f x
dx
Example 3.5.2
Consider the random variable X with range and p.d.f. . Define the variable . Find the p.d.f. of Y.– Find the c.d.f.
– Find the p.d.f. 2 4
0( ) ( ) 5
y
YF y P Y y P X y P X y x dx
44 3/2
0
1 5( ) 5 5 , 0 122
y
Ydf y x dx y y ydy y
Simulations
Theorem 3.5.1 Let Y be a random variable that is and let satisfy the requirements of a c.d.f. of a continuous random variable with certain properties.– Let denote the inverse of the function – Define the random variable – Then has the c.d.f.
Example 3.5.4
Generate values of a random variable X with an exponential distribution1. Find the c.d.f.: 2. Find
11 11 ln 1 ln 1xy e x y F y y
Example 3.5.4
3. Use software to generate values of a random variable Y that is – Suppose – - Values of Y– - Values of X
3.6 – Joint Distributions
Definition 3.6.2 Let X and Y be two continuous random variables. The joint probability density function, or joint p.d.f., is an integrable function f(x, y) that satisfies the following three properties:
1. 0
2.
3. if is a subset of t
( , ) for all a
he two-dimensi
nd
( , ) 1
( , ) (
onal plane, the
)
n
,S
f x y x y
f x y dy dx
P X Y S f x y dy d
S
x
Marginal Distributions
The marginal probability density functions, or marginal p.d.f.’s, of X and Y are
Definition 3.6.3 Two discrete or continuous random variables X and Y are said to beindependent if
( ) ( , ) and ( ) ( , )X Yf x f x y dy f y f x y dx
(( ), () )X Yx ff x y f y
Example 3.6.3
Suppose the joint p.d.f. of X and Y is
Note
Marginal p.d.f.’s:
1/ 2 0 1, 0 2,
0 otherwisex y
f x y
1 2 1
0 0 0
1 1 1( , ) 2 (2) 12 2 2
f x y dy dx dy dx dx
2
0
1
0
1( ) 1 for 0 1 and21 1( ) for 0 22 2
X
Y
f x dy x
f y dx y
Example 3.6.4
Suppose a man and a woman agree to meet at a restaurant sometime between 6:00 and 6:15 PM. Find the probability that the man has to wait longer than five minutes for the woman to arrive.– Let X and Y denote the number of minutes past
6:00 PM that the man and the woman arrive, respectively.
Example 3.6.4
Assume
Then
2
0, 15 1/15 for 0 15, 0
1. oth and are so that
2. and are independent so that
15
( , ) ( ) ( ) (1/15)
YX
X Y
B U f x f yx x
f x y f x f y
X Y
X Y
2 2
10 15 10
0 5 0
102 2
0
1 1( 5) 15 ( 5)15 15
1 210 .15 2 9
xP Y X dy dx x dx
xx
3.7 – Functions of Independent Random Variables
Definition 3.7.1 The mean or expected value of a function of two random variables and , is
where is the joint p.d.f. of and ( , ) ( , ) ( , )E u X Y u x y f x y dy dx
Example 3.7.1
Suppose the joint p.d.f. of X and Y is
1/ 2 0 1, 0 2,
0 otherwisex y
f x y
2 2
1 2 2
0 0
1
0
3 2 3 2 ( , )
1 3 22
4 253 23 6
E XY X Y xy x y f x y dy dx
xy x y dy dx
x x dx
Properties
Theorem 3.7.1 For any discrete or continuous random variables,
If X and Y are independent, then
Theorem 3.7.2 If X and Y are independent, then
E X Y E X E Y
E XY E X E Y
( ) ( ) ( )Var X Y Var X Var Y
Properties
Theorem 3.7.3 If and are independent random variables with respective m.g.f.’s and , and a and b are constants, then the m.g.f. of is
W X YM t M at M bt
Properties
2 2
2 2 2 2
, , is , , and
are independent, and and are constants, then the variable
is , .
Let and be independent discret
If is
or c
e
X X Y Y
X Y X Y
N Y N X Y
a bW aX bY
N a b a
X
b
X Y
Theorem 3.7
The
.4
orem 3.7.5ontinuous random variables and let ( ) and ( ) be any
functions. Then the random variables ( ) and ( )are independent.
g x h xZ g X W h y
Example 3.7.5
Let X and Y be independent and both Define . Then is
So that
2 2220 220,29 29 440,1682N N
500 4416
0( 500) ( 1.46) 0.07282
1P W P Z P Z
3.8 – The Central Limit Theorem
Definition 3.8.1 When a set of objects is selected from a larger set of objects, the larger set is called the population and the smaller set is called the sample. The number of objects in the sample is called the sample size.
The Central Limit Theorem
Theorem 3.8.2 If X1, X2,…, Xn are mutually independent random variables with a common distribution, mean μ, and variance σ2, then as the distribution of the sample mean
21 approaches ,n
nXX X
Nn n
Example 3.8.5
Suppose people at a certain movie theater wait a mean of 30 sec with a variance of 52 sec2 to buy tickets. Find the probability that the mean wait time of a group of 50 movie-goers is less than 28 sec.– 50We want to fin 28d P X
Example 3.8.5
By CLT:
Then
50
50
2
50
1. is approximately normally distributed
2. has mean 30
3. has varianc 5 0.55
e 0
X
X
X
5028 3028 ( 2.83) 0.0023
0.5P X P Z P Z
3.9 – The Gamma and Related Distributions
Definition 3.9.2 A random variable X has a gamma distribution with parameters r and λ where and if its p.d.f. is
1
0The Gamma Function: ( ) for 0
If is an integer: ( ) ( 1)!
t yt y e dy t
n n n
1( ) for 0( )
rr xf x x e x
r
Chi-Square Distribution
Theorem 3.9.1 Let be independent random variables each with a standard normal distribution. Define the random variable
Definition 3.9.3 A random variable with this p.d.f. is said to have a chi-square distribution with n degrees of freedom.
2 2 21 2
/2 1 /2/2
1The p.d.f. of is ( ) for 0( / 2)2
n
n xn
X Y Y Y
X f x x e xn
Chi-Square Distribution
2 2
2
Let be a number between 0 and 1 and let
( ). Define the ( ) to be a positive
number such that
( ) 1
See Table C
be
.3
p
p
n c
p
X ritical value n
P X n p
Definition 3.9.4
Student-t Distribution
Definition 3.9.5 Let and be independent random variables where is and is . The random variable
is called the Student-t ratio with n degrees of freedom.
/ZT
C n
Student-t Distribution
Theorem 3.9.2 The p.d.f. for the Student-t ratio with n degrees of freedom is
Definition A random variable with this p.d.f. is said to have a Student-t distribution with n degrees of freedom.
( 1)/22
12( ) ,
12
n
n
f t tn tn
n
Student-t Distribution
Definition 3.9.6 Let be a number between 0 and 0.5 and let have a Student-t distribution with n degrees of freedom. A critical t-value is a number such that
– See Table C.2 ( ) 1pP T t n p
F-Distribution
Theorem 3.9.3 Let and V be two independent chi-square random variables with n and d degrees of freedom, respectively. Define the random variable
The p.d.f. of is
//
U nFV d
/2 /2 ( /2) 1
( )/2
2( ) , 0( )
2 2
n d n
n d
n d n d xf x x
n d d nx
F-Distribution
Definition 3.9.7 A random variable with this p.d.f. is said to have an F-distribution with n and d degrees of freedom. The number n is called the numerator degrees of freedom while d is called the denominator degrees of freedom.
F-Distribution
Definition 3.9.8 Let p be a number between 0 and 1 and let have an F-distribution with n and d degrees of freedom. A critical F-value is a number such that
– See Table C.4
( , ) 1pP F f n d p
3.10 – Approximating the Binomial Distribution
Theorem 3.10.1 (Limit Theorem of De Moivre and Laplace) Let be . Then as the distribution of approaches
Application: Let be . Then
, (1 )N np np p
( ) ( 0.5 0.5)P a X b P a Y b
Example 3.10.1
An airline has a policy of selling 375 tickets for a plane that seats only 365 people (called “over-booking”). Records indicate that about 95% of people who buy tickets for this flight actually show up. Find the probability that there are enough seats.
Example 3.10.1
Let X = number of ticket-holders who show up– X is – Let Y be
Then(375 0.95,375 0.95 0.05) (356.25,17.81)N N
365.5 356.25( 365) ( 365.5)17.81
( 2.19) 0.9857
P X P Y P Z
P Z
Bernoulli’s Law of Large Numbers
Theorem 3.10.2 Let the random variable be the number of times a specified event is observed in n trials of a random experiment. Let . Then for any small number ,
1 asXP p nn
ò