Download as pdf or txt
Download as pdf or txt
You are on page 1of 47

Eng Stat I 2104253

Continuous Random Variables


and Probability Distribution
Probability Density Function
Cumulative Distribution Functions and Expected Values
Well-known continuous distribution
 Uniform Distribution
 Exponential Distribution
 Normal Distribution
Other Continuous Distributions
Probability Plot 1
Eng Stat I 2104253

Continuous R.V.
• An R.V. may take on values in an uncountable range (real line).
– Depth in sea, temperature measurement.

• Such R.V. must have P(X = x) ≈ 0 because of infinite sample


points.
• Assign a probability to a very small interval dx

• f(x) is called Probability Density Function (pdf)

2
Eng Stat I 2104253

Probability Density Function


• Definition: A continuous R.V. is an R.V. that takes on sample
space S = R and its probability assignment is given by
f(x)
P (a ≤ X ≤ b)

x
a b
is called the probability density function (pdf) of X. We also
write fX(x) to emphasize that it is a pdf of X.
3
Eng Stat I 2104253

Probability Density Function


• From the definition of f(x), the pdf assigns a probability
to a very small interval dx
– Analogous to PMF for a discrete R.V.
– Unlike a discrete random variable P(X=c) = 0;
therefore,
P(a ≤ X ≤ b) = P (a < X < b) = P(a ≤ X < b) = P(a < X ≤ b)

4
Eng Stat I 2104253

CDF for Continuous R.V.


• Therefore,

• A discrete R.V. has a discontinuity in its cdf while


an R.V. that takes on continuous values will have
no discontinuity in its cdf.

5
Eng Stat I 2104253

CDF of Continuous R.V.


• Since P(X = a) = P(X = b) ≈ 0,

• P(X > x) = 1 – F(x) is called the “tail distribution” or


“survivor function”.

6
Eng Stat I 2104253

Example
• Let X denote the amount of time for which a book on 2-
hour reserve at a college library is checked out by a
randomly selected student

• Find CDF
• Calculate the probabilities
– P(X ≤ 1) (Ans: 0.25)
– P(0.5 ≤ X ≤ 1.5) (Ans: 0.5)
– P(X >1.5) (Ans: 0.4375)
7
Eng Stat I 2104253

Example
• Suppose X has a pdf of

• Find P(X < 4) and P(3 < X < 4). (Ans: 16/27, 1/3)

8
Eng Stat I 2104253

Percentiles 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 η(p), is defined by

9
Eng Stat I 2104253

Example
• 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

• Find 50th percentile (median) of the X? (Ans: 0.29)

10
Eng Stat I 2104253

Expected Value
• For a continuous R.V. X,

– Ex: f(x) = 2(x-1), x∈(1, 2), Find E(X) (Ans: 5/3)

• For Y = g(X), its expectation is

11
Eng Stat I 2104253

Example
– Two species are competing in a region for control of a limited
amount of a certain resource. Let X = the proportion of the
resource controlled by species 1 and has pdf

– The species that controls the majority of this resource controls


the amount

– What is expected amount controlled by the species having


majority control? (Ans: 0.75)
12
Eng Stat I 2104253

Variance
• For a continuous R.V.,

– Ex: f(x) = 2(x-1), x ∈ (1, 2), Find V(X)


(Ans: 17/6 – 25/9 = 0.056)
13
Eng Stat I 2104253

Uniform Distribution (1)


• An R.V. X takes on values that are equally likely in a range [a, b].
• X has a uniform distribution, i.e., X ~ unif(a, b) if its pdf is

1/(b-a)

x
a b
14
Eng Stat I 2104253

Uniform Distribution (2)


• X ~ unif(0,1) is called a standard uniform distribution.

• Ex: Consider a long distance telephone network. The time


taken between detection of a link failure and the setting of
an alarm at the telephone office is unif(0.3, 2.7)
a) What is P( Time alarm sets ≤ 1 second)? (Ans.0.2916)
b) What is the percentage of the alarm set between 1 and 2
seconds? (Ans. 41.67%)
c) What length of time are 90% of the alarm setting is less
than? (Ans. 2.46) 15
Eng Stat I 2104253

Exponential Distribution
• If R.V. X is the amount of time or distance between occurrence
of random event,
• then X has an exponential distribution with following

• Denoted by X ~ expo(λ) – Exponential with parameter λ.


16
Eng Stat I 2104253

Example
• Suppose the response time X at a certain on-line computer
terminal has an exponential distribution with expected
response time equal to 5 sec. Find the probability that the
response time is at most 10 sec.

– Find the probability that response time is between 5 and


10 sec. (Ans: 0.233)

17
Eng Stat I 2104253

Applications of Exp
Distribution
• Interarrival times of telephone calls, call holding time, time to
failure of a component.
• Ex: Time to failure of a certain component has an exponential
distribution with λ = 0.2. If 5 of these components are
installed in different systems, what is the probability that at
least two of them are still functioning at the end of 8 years?
– X = time to failure ~ Exp(λ = 0.2)
– P(X > 8) = 0.2019
– N = # functioning components ~ B(5, 0.2019)
– P(N >= 2) = 1 – P(N=0) – P(N=1) = 0.2667
18
Eng Stat I 2104253

Exp Vs Poisson
• Suppose that the number of events occurring in any time
interval of length t has a Poisson distribution with parameter
αt (where α, the rate of the event process, is the expected
number of events occurring in 1 unit of time) and that
numbers of occurrences in non-overlaping intervals are
independent of one another. Then the distribution of elapsed
time between the occurrences of two successive events is
exponential with parameter λ = α

19
Eng Stat I 2104253

Example
• Suppose that calls are received at a hotline service
according to a Poisson process with rate α = 0.5 calls per
day. Find the probability that more than 2 days elapse
between calls.

– The number of days X between successive calls has an


exponential distribution with parameter value 0.5,

20
Eng Stat I 2104253

Memoryless Property
• Lemma: For X » expo(λ),
• Proof:

• Therefore, if we know that X has passed for t seconds,


– The probability that it will take more than additional s
seconds does not depend on t.
– Like we “renew” X.
Eng Stat I 2104253

Normal Distribution
• Most widely used distribution.
– Model a sum of a large number of small R.Vs.
– Model measurement errors in scientific experiment,
anthropometric measurements, scores on tests, etc.
• The pdf of the Normal R.V. X is given by

• Denoted by X ~ normal(µ, σ2) or N(µ, σ2)

22
Eng Stat I 2104253

Pdf of Normal Distribution


f(x) 0.8
0.7
µ = 0, σ = 1/2
0.6

0.5

0.4

0.3
µ = 0, σ = 1
0.2

0.1

0
-4 -2 0 2 4
23
Eng Stat I 2104253

Standard Normal Distribution


• N(0, 1) is called the standard normal distribution.

– Denote a standard normal R.V. with Z.


– Complementary CDF:
– Φ(x) is tabulated.
24
Eng Stat I 2104253

Standard Normal and


General Normal R.V.
• For X ~ normal(µ, σ2),

• Therefore, X = µ + σZ or Z = (X - µ)/σ
• Any normal R.V. can be written in terms of a standard normal R.V.
25
Eng Stat I 2104253

Standard Normal and


General Normal R.V.
• Using the transformation X = µ + σZ

26
Eng Stat I 2104253

Using Normal Table


The four digit probability in a particular row and column of
Z-Table gives the area under the z curve to the left that
particular value of z.

Area for z = 1.36


27
Eng Stat I 2104253

Example
Use Z-Table to calculate these probabilities:
P(z ≤1.36) = .9131

P(z >1.36)
= 1 - .9131 = .0869

P(-1.20 ≤ z ≤ 1.36) =
.9131 - .1151 = .7980

28
Eng Stat I 2104253

Example
• X has a normal distribution with mean = 5 and σ = 2.

• Find P( X > 7).

7−5
P( x > 7) = P( z > )
2
=P( z > 1) =1 − .8413 =.1587 1 z

29
Eng Stat I 2104253

Example
The weights of packages of ground beef are normally
distributed with mean 1 pound and standard deviation
.10. What is the probability that a randomly selected
package weighs between 0.80 and 0.85 pounds?

P (.80 < x < .85) =


P (−2 < z < −1.5) =
.0668 − .0228 = .0440

30
Eng Stat I 2104253

Standard Normal and


General Normal R.V.
• Suppose P(X < x) = p, what is the value of x ?

31
Eng Stat I 2104253

Example
Find the value of z that has area .25 to its left.
1. Look for the four digit area
closest to .2500 in Z-Table.
2. What row and column does
this value correspond to?
3. z = -.67

4. What percentile
does this value
represent?25th percentile,
or 1st quartile (Q1)
32
Eng Stat I 2104253

Example
From previous example in page 32, what is the
weight of a package such that only 1% of all
packages exceed this weight?
P( x > ?) = .01
?− 1
P( z > )= .01
.1
From Z-Table,
?− 1
= 2.33
.1
=? 2.33(.1) = + 1 1.233
33
Eng Stat I 2104253

Examples
• X ~ N (50, 102), find the probability that X is between
45 and 62. (Ans: 0.5764)
• X ~ N (300, 502), find the probability that X is greater
than 362. (Ans: 0.1075)
• X ~ N (40, 62), find the value of x such that P(X > x)
is 0.14 and P(X < x) is 0.45. (Ans: 46.48, 39.25)

34
Eng Stat I 2104253

The Normal Approximation


to the Binomial
• When n is large, and p is not too close to zero or one,
areas under the normal curve with mean np and
variance npq can be used to approximate binomial
probabilities.

35
Eng Stat I 2104253

The Normal Approximation


to the Binomial

• Make sure that np and nq are both


greater than 5 to avoid inaccurate
approximations
36
Eng Stat I 2104253

Example

10.5 − 12
P( x ≤ 10) ≈ P( z ≤ )
2.683
= P( z ≤ −.56) = .2877 37
Eng Stat I 2104253

Example
• A production line produces AA batteries with a
reliability rate of 95%. A sample of n = 200 batteries
is selected. Find the probability that at least 195 of
the batteries work.
The normal
Success = working battery n = 200 approximation is
ok!
p = .95 np = 190 nq = 10

194.5 − 190
P( x ≥ 195) ≈ P( z ≥ )
200(.95)(.05)
= P( z ≥ 1.46) = 1 − .9278 = .0722 38
Eng Stat I 2104253

Gamma Function
• Define the gamma function, for α > 0

• Important properties
– For any α > 1,
– For any positive inter, n, Γ(n) = (n-1)!
– Γ(0.5) =
39
Eng Stat I 2104253

Gamma Distribution
• An R.V. X has a gamma distribution if its pdf is

• Denoted by X ~ Gamma (α, β), where α > 0 and β >0


1

0.8 α=β=1 E(X) = αβ and V(X) = αβ 2


0.6

0.4
α = 2, β = 1 If β = 1 Standard gamma
α = 4, β = 1 If α= 1 and β = 1/λ, Expo dist
If α = n/2 and β = 2, Chi-square
0.2

40
0
0 2 4 6 8 dist
Eng Stat I 2104253

Other Continuous
Distributions
• Erlang (hypo-exponential) distribution  a sum of n exponential
R.Vs.
• Hyper-exponential distribution  a parallel of n exponential
R.Vs.
• Weibull distribution  time to component failure.
• Pareto (hyperbolic, power law) distribution  time consumed
by a CPU process, Web file size, Bytes in FTP transfer.
• Chi-square (χ2) distribution  goodness of fit test in statistics.
• F distribution  Analysis of variance.
• Student-t distribution  Sampling distribution in statistics.
41
Eng Stat I 2104253

Probability Plot
• To investigate whether the sample data came from
a population distribution of some particular type
– Statistical Inference
– Probability plot
• Probability plot compares between percentile of
the sample data and the corresponding percentiles
of the distribution under consideration
– If the distribution is correct, the points in the
plot will fall close to a straight line
42
Eng Stat I 2104253

Probability Plot
• Definition: 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.
• Probability plot
– [100(i-0.5)/n]th percentile of distribution,
ith smallest sample observation]

43
Eng Stat I 2104253

Example
• The experimenter makes n=10 independent
measurements, -1.91, -1.25, -0.75, -0.53,
0.2, 0.35, 0.72, 0.87, 1.4, 1.56
• Is it plausible that the random variable has a
standard normal distribution?

44
Eng Stat I 2104253

Example
• Calculate sample percentile
– [100(1-0.5)/10]th = 5% , [100(2-0.5)/10]th = 15% ,
25%, 35%…
• Find z percentile from standard normal table
– 5% = -1.645 , 15% = -1.037, 25% = -0.675, ….
• Plot sample data against z percentile
Percentage 5 15 25 … 95
z percentile -1.645 -1.037 -0.675 … 1.645
Sample -1.91 -1.25 -0.75 …. 1.56 45
Eng Stat I 2104253

Example
2

1.5

0.5

0
-2 -1.5 -1 -0.5 0 0.5 1 1.5 2
-0.5

-1

-1.5

-2

-2.5

Although the points deviate a bit from 45 degree line,


the plot suggest that standard normal distribution is
reasonable

46
Eng Stat I 2104253

Normal Probability Plot


• Percentile for N(µ, σ2) = µ + σ (z percentile)

• Plot ([100(i-0.5)/n]th z percentile, ith smallest observation)


on a two-dimensional coordinate system is called a normal
probability plot. If the sample observations are drawn from
N(µ, σ2), the points should fall close to a straight line with slope
σ and intercept µ.

• Look at MINITAB –normal probability plot (a nonlinear


probability axis)

47

You might also like