Download Handout 4

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Central limit theorem wikipedia , lookup

Transcript
STAT 211
Handout 4 (Chapter 4): Continuous Random Variables
A r.v. X is said to be continuous if its set of possible values is an entire interval
of numbers. Then a probability distribution of X is f(x) (pdf: probability density
b
function) such that for any two numbers a and b, P(a  X  b)   f ( x)dx.
a
Conditions to be a legitimate probability distribution:
(i)
f(x)  0, for all x

(ii)
 f ( x)dx  1
(area under the entire graph of f(x)).

If X is a continuous r.v., then for any number c, P(X=c)=0.
x
Cumulative Distribution Function for X (cdf) : F(x)= P( X  x) 
 f ( y)dy.

F(-)=0, F()=1, P(a  X  b)  P(a  X  b)  F (b)  F (a) , P(X>a)=P(Xa)=1-F(a)
Example: A college professor never finishes his lecture before the bell rings to end the
period and always finishes his lectures within 2 min after the bell rings. Let X=the time
that elapses between the bell and the end of the lecture and suppose the pdf of X is
k  x 2 , 0  x  2
. Find the value of k which makes f(x) a legitimate pdf.
f ( x)  
0
,
otherwise

Example: The amount of bread (in hundreds of pounds) that a certain bakery is able to
sell in a day is a random variable with probability function,
0 x5
 Ax,

f ( x)   A(10  x),
5  x  10
0,
otherwise

(a) Find the value of A which makes f(x) a legitimate pdf.
(b) What is the probability that the number of pounds of bread that will be sold tomorrow
is
(i)
more than 500 pounds
(ii)
less than 500 pounds
(iii)
between 250 and 750 pounds
Obtaining f(x) from F(x) : If X is a continuous r.v. with pdf f(x) and cdf F(x), then at
every x at which the derivative exists, F`(x)=f(x).
Percentile of a continuous distribution: Let p be a number between 0 and 1. the
(100p)th percentile of the distribution of a continuous r.v. X, denoted by r(p), is defined
r ( p)
 f ( y)dy.
by p  F (r ( p ))  P( X  r ( p)) 

P(Xmedian)=P(X>median)=0.50
Expected value for the continuous random variable, X:   E ( X ) 

 x  f ( x)dx.

Variance for the continuous random variable, X:
  Var( X )  E[( X   ) ] 
2
2

 (x  )
2
 f ( x)dx. or the shortcut is

  Var( X )  E ( X )  
2
2

2
where
E( X ) 
2
x
2
 f ( x)dx.

If h(X) is the function of random variable X,

E (h( X )) 
 h( X )  f ( x)dx


Var (h( X )) 
 (h( X )  E (h( X )))
2
 f ( x)dx

If h(X) is a linear function of X, the rules of the mean and the variance can directly be
used instead of going through the mathematics.
Example: Go back to the example with the college professor in this chapter and
calculate cumulative density function F(X), 90th percentile of X, the median, the expected
value of X (E(X)) and the variance of X (Var(X)). Also demonstrate how to obtain f(x)
from F(x). Define the findings by word.
Uniform Distribution: X ~U[a,b]
1
f ( x) 
, axb
ba
Chebyshev's Inequality : P(| X   |)  k   ) 
1
k2
is the probability that the value of
X lies at least k standard deviations from its mean is at most
1
.
k2
Empirical Rule: If the population distribution of a random variable is (approximately)
normal, then
 Roughly 68% of the values are within one standard deviation of the mean
 Roughly 95% of the values are within two standard deviations of the mean
 Roughly 99.7% of the values are within three standard deviations of the mean
Normal Distribution: X ~ N ( , 2 )
A continuous r.v. X is said to have a normal distribution with parameters  and 2
where - <  <  and  > 0. The pdf of X is
f ( x;  ,  ) 
1
 e ( x   )
2
/ 2 2
,
   x  ,
     ,
2 0
2 
It is symmetric and bell-shaped. It is called standard normal distribution when =0 and
2 =1 and the random variable is denoted by Z (standard normal random variable,N(0,1)).
The cdf of Z is  (z ) =P(Zz). Appendix table A.3 can be used to compute  (z ) .
The (100p)th percentile of X with N ( ,2) =
 + [The (100p)th percentile of Z with N (0,1)]
Example: Let X be normally distributed with mean, =20 (symmetric around 20) and
X   X  20

the variance, 2 =4 (or standard deviation, =2), then Z 
is normally

2
distributed with, =0 and the variance, 2 =1 (or standard deviation, =1).
This information can be shown as X~N(=20, 2 =4) and Z~N(=0, 2 =1)
(a) P(X<16) = P(X16) because normal distribution is continuous.
P(X<16) = P(Z<-2)=0.0228
P(X>16) = 1 - P(X16) = 1 - 0.0228 = 0.9772
(b) P(X<23.5) = P(Z<1.75) = 0.9599
P(X>23.5) = P(Z>1.75) = 1 - P(Z1.75) = 1 - 0.9599 = 0.0401
(c) If you would like smallest 5% of X to be 16 how many points you need to add or
subtract to X?
x * 20
x * 20 

P(X<x*)=0.05= P Z 
=-1.645  x* =
 then by looking at the z-table,
2
2 

16.71. You need to subtract 0.71.
(d) If you would like largest 5% of X to be 24 how many points you need to add or
subtract to X?
x * 20
x * 20 

P(X>x*)=0.05= P Z 
=1.645  x* =
 then by looking at the z-table,
2
2 

23.29. You need to add 0.71.
Example: In mathematics test, if we assume that your test scores (X) were
approximately normally distributed with mean of 76.8 and standard deviation of 13.94.
a. If a score below 60 represents a grade of F (failure), approximately what percent of
students failed the test?
b. If the cutoff for a grade of A is the lowest score of the top 15%, what is that cutoff
point?
c. How many points must be added to the student scores so that only 10% fail (less than
60 be the failing grade)?
d. If the cutoff for a grade of C is the lowest score of the top 45%, what is that cutoff
point?
e. What is the 90th percentile of test scores (x)?
Example:A chemical plant superintendent orders a process shutdown and setting
readjustment whenever the pH of the final product falls below 6.9 or above 7.1. The
sample pH is normally distributed with unknown  and standard deviation 0.05.
Determine the probability
(a) of readjusting when the process is operating as intended and =7
(b) of failing to readjust when the process is too alkaline and the mean pH is =7.15

IF X is a random variable whose logarithm is normally distributed then X has a
lognormal distribution.
Normal Approximation to the Binomial Distribution:
Let X be a binomial r.v. based on n trials with success probability p. Then if the binomial
probability histogram is not too skewed, X has approximately a normal distribution with
 x  0.5  np 


  P Z  x  0.5  np 
 = np and   np(1  p) then P( X  x)  
 np(1  p) 

np(1  p) 



(check if np10 and n(1-p)10 to use the formula).
Exercise 4.48 (textbook): Suppose that 10% of all steel shafts produced by a certain
process are nonconforming but can be reworked (rather than having to be scrapped).
Consider a random sample of 200 shafts and let X denote the number among these that
are nonconforming and can be reworked. What is the approximate probability that X is
(a) At most 30?
(b) Less than 30?
(c) Between 15 and 25 (inclusive)?
The Gamma Distribution: X ~ Gamma (  ,  )
f ( x) 
1
 x  1  e  x /  ,
  ( )

x  0,
,   0
It is a skewed distribution. Note that

( )   x  1 e  x dx,
 0
0
 (  1)  (  1),
 1
 (  1)!,
 is any positive integer
(1 / 2)   ,
E( X )     ,
Var ( X )     2

If =1 then it is called standard gamma distribution.

When the random variable is a standard gamma r.v. then the cdf is called the
incomplete gamma function (Appendix Table A.4). F(x;,)=F(x/;)

If  = 1 then it is Exponential(=1/). It is used as a model for the distribution of
times between the occurrence of successive events. The gamma distribution is used
for the segment of time or and space occurring until some specified number of events
has transpired where  being the average process rate and  being the specified
number of events that must transpired as X is reached.

If  = r / 2 and  = 2 then it is Chi-squared(r). (Appendix table A.7)

If the random variable, X is distributed Exponential () then Y=X1/
Weibull(,).
has
Exercise 4-56 (textbook): Suppose the time spent by a randomly selected student who
uses a terminal connected to a local time sharing facility has a gamma distribution with
mean 20 and variance 80 min2.
(a) What are the values of  and ?
(b) What is the probability that a student uses the terminal for at most 24 min?
(c) What is the probability that a student spends between 20 and 40 min using the
terminal?
Example: Find the probability that the time taken for the next two cars to arrive at a
tollbooth will be 1 minute or less when =2 per minute.
Example: Flaws in a reel of high-fidelity radar recording tape occur on the average of
once every 10 feet. Determine the probability that the next recording will begin on a
flawless stretch of tape over 5 feet long.
Example: A series system consists of 100 independent units, each with exponential
distribution with =0.005. Find the system reliability over a span of t=10.
Exercise 4-60 (textbook): Extensive experience with fans of a certain type used in
diesel engines has suggested that the exponential distribution provides a good model for
time until failure. Suppose the mean time until failure is 25000 hours. What is the
probability that
(a) A randomly selected fan will last at least 20000 hours?
(b) A randomly selected fan will last at most 30000 hours?
(c) A randomly selected fan will last between 20000 and 30000 hours?
(d) The lifetime of a fan exceeds the mean value by more than 2 standard deviations?
Exponential distribution shares memoryless property of the geometric distribution then
P(Xt+t0|Xt0)=P(Xt). It simply is the distribution of additional lifetime is exactly the
same as the original distribution of lifetime.
Probability plots: Order the n-sample observations from smallest to largest. Then the ith
smallest observation in the list is taken to be the [100(i-0.5)/n]th sample percentile.
Exercise 4-80 (textbook): Ten observations on bearing lifetime (in hours) are collected.
Construct a normal probability plot and comment on the plausibility of the normal
distribution as a model for bearing lifetime.
Data
152.7
172
172.5
173.3
193
204.7
216.5
243.9
262.6
422.6
i
1
2
3
4
5
6
7
8
9
10
(i-0.5)/n
.05
.15
.25
.35
.45
.55
.65
.75
.85
.95
z
-1.645
-1.036
-0.675
-0.385
-0.126
0.126
0.385
0.675
1.036
1.645
data
450
400
350
300
250
200
150
100
50
0
-2
-1.5
-1
-0.5
0
0.5
1
1.5
2
z
Exercise 4-87 (textbook): The failure time observations (1000’s of hours) resulted from
accelerated life testing of 16 integrated circuit chips of a certain type. Use the
corresponding percentiles of the exponential distribution with =1 to construct a
probability plot. Comment on the sample having been generated from any exponential
distribution.
F(x)= 1  e x  1  e  x , x  0
That means if the smallest 5 th percentile is observed then F(x)=0.05 and we are trying to
find what x is. x can be found as -ln(1-F(x)).
Data
11.6
26.5
82.8
179.7
204.6
212.6
229.9
242
244.8
304.3
307.8
359.5
366.7
379.1
502.5
558.9
i
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
(i-0.5)/n
5/160
15/160
25/160
35/160
45/160
55/160
65/160
75/160
85/160
95/160
105/160
115/160
125/160
135/160
145/160
155/160
x
0.031749
0.09844
0.169899
0.24686
0.330242
0.421213
0.521297
0.632523
0.757686
0.900787
1.067841
1.268511
1.519826
1.856298
2.367124
3.465736
1.2
1
data
0.8
0.6
0.4
0.2
0
0
100
200
300
x
400
500
600