0% found this document useful (0 votes)
131 views

Chapter 4 - Continuous Random Variables and Probability Distribution

This chapter discusses continuous random variables and their probability distributions. It covers the continuous uniform distribution, the normal distribution, and the exponential distribution. Key concepts include the probability density function (PDF), which determines the probability of a continuous random variable falling within a particular range of values. The cumulative distribution function (CDF) gives the probability that a random variable is less than or equal to a particular value. Methods for calculating the mean and variance of continuous random variables from their PDFs are also presented.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
131 views

Chapter 4 - Continuous Random Variables and Probability Distribution

This chapter discusses continuous random variables and their probability distributions. It covers the continuous uniform distribution, the normal distribution, and the exponential distribution. Key concepts include the probability density function (PDF), which determines the probability of a continuous random variable falling within a particular range of values. The cumulative distribution function (CDF) gives the probability that a random variable is less than or equal to a particular value. Methods for calculating the mean and variance of continuous random variables from their PDFs are also presented.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 34

4 Continuous Random

Variables and Probability


Distributions

Chapter 4 - Continuous Random Variables 1


LO
Describe the probability distribution and calculate the mean and
variance of a continuous random variable
Continuous Uniform Distribution
Normal Random Variable
Exponential Distribution

Chapter 4 - Continuous Random Variables 2


Continuous Random Variables
connection
speed
length
Continuous or size
variables can take Continuous
physical
r. v.
any value of an examples
measurements

interval in 
height
durations or weight
of time

reaction time lifetime

waiting time
Chapter 4 - Continuous Random Variables 3
Probability Density Function (pdf)
“density” is a measure of
f(x)  0 “probability mass” per unit length


Probability determined from the area under f(x). pdf
න 𝑓 𝑥 𝑑𝑥 = 1
f(x)
−
Ex. Let X be a continuous random variable and
suppose that f(x) = cx2, for -1 < x < 2, and 0 otherwise
𝑏
is the pdf of X. P(a  X  b) = ‫𝑓 ׬‬ 𝑥 𝑑𝑥
𝑎
a/ Find c
b/ Find P(X  0) = P(a  X < b)
------ = P(a < X  b) P(X = x0) = 0
 2 (different from pmf)
a/ ‫׬‬− 𝑓 𝑥 𝑑𝑥 = ‫׬‬−1 cx2𝑑𝑥 = c(8/3 +1/3) = 3c = P(a < X < b)

f(x) is the pdf of X  ‫׬‬− 𝑓 𝑥 𝑑𝑥 = 1  c = 1/3
2
b/ P(X  0) = ‫׬‬0 (1/3)x2𝑑𝑥 = 8/9
Chapter 4 - Continuous Random Variables 4
Probability Density Function Pdf – Ex
The lifetime, in years, of some electronic component is a
continuous random variable with the probability density function
𝑘
𝑓 𝑥 = ቐ 𝑥3 𝑓𝑜𝑟 𝑥 > 1
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find k and compute the probability for the lifetime to exceed 5
years.
  3
• ‫׬‬− 𝑓 𝑥 𝑑𝑥 = ‫׬‬1 k/x 𝑑𝑥 = -k(0 – 1)/2 = 1  k = 2

Chapter 4 - Continuous Random Variables 5


Cumulative Distribution Function (cdf)
F(x) = P(X  x)
= P(X < x) F′(x) = f(x)

x
P(a  X  b) cdf
F(x) = න 𝑓 𝑢 𝑑𝑢 Pdf: f(x) = x2/3, for -1 < x < 2
= F(b) – F(a) F(x)
−

F(x)  F(y) limx→ - F(x) = 0


if x  y limx→  F(x) = 1
(increasing)
x
Cdf: F(x) = ‫׬‬−1 t2/3𝑑𝑡 = x3/9 + 1/9
for -1 < x < 2, and 0 otherwise
Chapter 4 - Continuous Random Variables 6
Pdf vs Cdf – Ex
F(x) = P(X  x) Ex. The lifetime, in years, of some
electronic component is a continuous
= P(X < x) F′(x) = f(x) random variable with the probability
density function
x
P(a  X  b) cdf 2
F(x) = න 𝑓 𝑢 𝑑𝑢 𝑓 𝑥 = ቐ 𝑥3 𝑓𝑜𝑟 𝑥 > 1
= F(b) – F(a) F(x)
− 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find the cdf F(x) and P(2 < X < 3).
F(x)  F(y) 𝑥 𝑥 𝑥 2
limx→ - F(x) = 0 F(x) = ‫׬‬− 𝑓 𝑢 𝑑𝑢 = ‫׬‬1 𝑓 𝑢 𝑑𝑢 = ‫׬‬1 𝑑𝑢
if x  y 𝑢3
limx→  F(x) = 1 = 1 – 1/x2 for x > 1
(increasing)
P(2 < X < 3) = F(3) – F(2)
= ¼ - 1/9 = 0.139

Chapter 4 - Continuous Random Variables 7


Mean and Variance
Expected Measure
value of X central
value
Expected
value of g(x) Mean  = E(X)
E[g(x)]  ∞
= ‫׬‬−∞ 𝑥𝑓 𝑥 𝑑𝑥

= ‫׬‬−∞ 𝑔(𝑥)𝑓 𝑥 𝑑𝑥

Ex. Given the pdf of X,


X
Standard 2 = V(X)
3
𝑓 𝑥 = ቐ 𝑥4 𝑓𝑜𝑟 𝑥 > 1
Variance

deviation 2 = ‫׬‬−∞ 𝑥 −  𝑓 𝑥 𝑑𝑥
2
 0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find the mean and variance of X.
 = 2
Measure spread 2 = E(X2) – E(X)2 ∞ ∞
of values E(X) = ‫׬‬−∞ 𝑥𝑓 𝑥 𝑑𝑥 = ‫׬‬1 3/𝑥3𝑑𝑥 = 1.5
V(X) = E(X2) – E(X)2 = 0.75

Chapter 4 - Continuous Random Variables 8


Chapter 4 - Continuous Random Variables 9
Continuous Uniform Distribution
used for computer used in any situation when a i.e., locations of errors
simulation of various value is picked “at random” from in a program, birthdays
events and processes a given interval throughout a year

Variance: Uniform
pdf:
2 = (b – a)2/12 Distribution f(x) = 1/(b-a)

For h > 0,
Mean: P(t < X < t + h) = h/(b-a)
 = (a + b)/2 is independent of t

Ex. Tri is taking a bus from Dist.1 to Thu Duc city, a distance of 15km. His position is uniformly
distributed between the two areas. What is the probability that he is past Saigon Bridge, which
is 5km from Dist.1?
Let X be Tri’s location ➔ X ∼ Unif(0, 15) ➔ P(X > 5) = (5 < X < 15) = (15 – 5)/(15 – 0) = 2/3.

Chapter 4 - Continuous Random Variables 10


Continuous Uniform Distribution – Ex
(Uniform Current) Let the continuous random variable X denote
the current measured in a thin copper wire in milliamperes.
Assume that the range of X is [0, 20 mA], and assume that the
probability density function of X is f(x) = 0.05, 0  x  20. Find
P(5 < X < 10), E(X), V(X).
-----
P(5 < X < 10) = (10 – 5)(0.05) = 0.25
E(X) = (a + b)/2 = (0 + 20)/2 = 10
V(X) = (b – a)2/12 = (20 – 0)2/12 = 33.33

Chapter 4 - Continuous Random Variables 11


Normal Distribution (Gaussian
Plays a vital role in
distribution)
Probability and Statistics Good model for physical variables like weight, height,
temperature, voltage, pollution level (household
incomes or student grades, etc.)

Normal
N(, 2) distribution Related to the Central Limit Theorem (chapter 7)

Bell-shaped curve

Not easy to compute Normal probability density functions


with paper and pencil for selected values of  and 2.

Chapter 4 - Continuous Random Variables 12


Normal Distribution
For any normal random variable

Probability that X > 13 for a normal random


variable with and  = 10 and 2 = 4.

6 is often referred to as the


width of a normal distribution.

Chapter 4 - Continuous Random Variables 13


Standard Normal Random Variable
Standardize: If X ~ N(, 2),
then Z = (X - )/ ~ N(0, 1) It is the key step to calculating
a probability for an arbitrary
normal random variable.

Standard Assume Z is a standard normal random variable.


Z ~ N(0, 1) normal
Appendix Table III provides probabilities of the form
distribution
(z) = P(Z  z). Read down the z column to the row
that equals 1.5. The probability P(Z  1.5) is read from
the adjacent column, labeled 0.00, to be 0.93319.
(z) = P(Z  z)

0.93319

Chapter 4 - Continuous Random Variables 14


Using Table III in the text book
to find probabilities of Normal
distribution
(1.34) = P(Z  1.34) = 0.909877

Chapter 4 - Continuous Random Variables 15


Chapter 4 - Continuous Random Variables 16
P(-1.25 < Z < 0.37) = P(Z < 0.37) – P(Z < -1.25)

(6) Find z such that


P(Z > z) = 0.05.
Equivalently, find z
such that
P(Z  z) = 0.95

(5) P(Z < -4.6) cannot be found exactly from (7) Find z such that
Appendix Table III. The last entry in the P(-z < Z < z) = 0.99.
table can be used to find that P(Z < -3.99) = ➔ Find z such that
0.00003. So, 0  P(Z < -4.6) < P(Z < -3.99). P(Z  z) = 0.995

Chapter 4 - Continuous Random Variables 17


Chapter 4 - Continuous Random Variables 18
Standardizing a Normal Random
Variable - Ex
Suppose the current measurements in a strip of wire are assumed to follow a
normal distribution with a mean of 10 milliamperes and a variance of 4
(milliamperes)2. What is the probability that a measurement will exceed 13
milliamperes?
Let X denote the current in milliamperes.
Let Z = (X - 10)/2.
Note that X >13 corresponds to Z >1.5.
Therefore, from Appendix Table III
P(X > 13) = P(Z > 1.5)
= 1 – P(Z 1.5) = 1- 0.93319 = 0.06681

Practical Interpretation: Probabilities for any normal random variable can be computed with a simple
transform to a standard normal random variable.

Chapter 4 - Continuous Random Variables 19


Standardizing to Calculate a
Probability
(Normally Distributed Current) Continuing the previous example.
a/ What is the probability that a current measurement is between
9 and 11 milliamperes?
b/ Determine the value for which the probability that a current
measurement is below this value is 0.98.

Chapter 4 - Continuous Random Variables 20


Normal
Approximation
to the
Binomial
Distribution

Binom(n, p) ~ N( = np, 2 = np(1-p))

Good approximation with n and p such


that
np > 5, n(1 – p) > 5

Chapter 4 - Continuous Random Variables 21


Normal Approximation to the Binomial
Distribution
• X ~ Binom(n, p)
X – np
•Z= ~ N(0, 1)
np(1 – p)
• Normal Approximation of Binomial as follow
x + 0.5 – np
P(X  x) = P(X  x + 0.5) = P( Z  )
continuity correction
np(1 – p)
x – 0.5 – np
P(x  X) = P(x – 0.5  X) = P( Z)
np(1 – p)

Chapter 4 - Continuous Random Variables 22


Normal Approximation to the Binomial Distribution – Ex
Assume that in a digital communication channel, the number of bits
received in error can be modeled by a binomial random variable, and
assume that the probability that a bit is received in error is 10-5. If 16
million bits are transmitted, what is the probability that 150 or fewer
errors occur?
Let the random variable X denote the number of errors. Then X is a
binomial random variable with n = 16106 and p = 10-5, and

DIFFICULT!
Use normal distribution to approximate

Chapter 4 - Continuous Random Variables 23


Ex. A new computer virus attacks a folder consisting of 200 files.
Each file gets damaged with probability 0.2 independently of
other files. What is the probability that fewer than 50 files get
damaged?

Chapter 4 - Continuous Random Variables 24


Conditions for approximating
hypergeometric and binomial probabilities

N = 400, K = 120, n = 30 n = 30, p = 0.3  = np = 9, 2 = np(1-p) = 6.3

Chapter 4 - Continuous Random Variables 25


Normal Approximation to the Poisson
Distribution
• X is a Poisson random variable with E(X) = λ and V(X) = λ
X–λ
•Z= ~ N(0, 1)
λ
• Normal Approximation to Poisson as follow
x + 0.5 – λ
P(X  x) = P(X  x + 0.5) = P( Z  )
λ
x – 0.5 – λ
P(x  X) = P(x – 0.5  X) = P( Z)
λ

Chapter 4 - Continuous Random Variables 26


Normal Approximation to the Poisson
Distribution – Ex
Ex. Assume that the number of asbestos particles in a squared
meter of dust on a surface follows a Poisson distribution with a
mean of 1000. If a squared meter of dust is analyzed, what is the
probability that 950 or fewer particles are found?
Let X be the number of particles found. Then X ~ Pois(1000)

DIFFICULT!
AN APPROXIMATION

Chapter 4 - Continuous Random Variables 27


Exponential Distribution
• • • •

X = waiting time for the next event

Consider the sequence of “rare” events, where the number of occurrences


has Poisson distribution with parameter λ.
Event “the time X until the next event is greater than x” can be rephrased as
“zero events occur by the time x.”
Let N be the number of events during the time interval [0, x] ➔
N~Poisson(λx).
P(X > x) = P(N = 0) = e-λx(λx)0/0! = e-λx
➔ F(x) = P(X  x) = 1 P(X > x) = 1 – e-λx
➔ f(x) = F(x) = λe-λx
Chapter 4 - Continuous Random Variables 28
Exponential Distribution
Often used to model waiting time between rare events:
time between telephone calls, accidents, etc. When the
number of events is Poisson, the time between events is
Exponential.

Exp.
distribution

For small lambda,


it’s usual that we
need a long
waiting time for the
next event

Chapter 4 - Continuous Random Variables 29


Exponential Distribution – Ex
Ex. Questions are sent to the chatbot of a Student Service at an
average rate of 12 questions per day.
a/ What is the probability that the next question is sent within 1 hour
minutes?
b/ What is the expected time between questions?
Questions arrivals represent rare events, thus the time X between
them has an exponential distribution with λ = 12 (questions per day).
a/ 1hr = 1/24 day, P(X  1/24) = F(1/24) = 1 − e−λx = 1 − e−1/2 = 0.3935
b/ E(X) = 1/λ = 1/12 (day) = 2 hours

Chapter 4 - Continuous Random Variables 30


Exponential Distribution – Ex
Suppose that X has an exponential distribution with a mean of
10. Determine the following:
a/ P(X < 5)
b/ P(X < 15 | X > 10)
E(X) = 1/ = 10 ➔  = 1/10
a/ P(X < 5) = F(5) = 1 − e−5λ = 1 − e−1/2 = 0.3935
b/ P(X < 15 | X > 10) = P(10 < X < 15)/P(X > 10)
= (F(15) – F(10))/(1 – F(10)) = [(1 − e−15λ ) – (1 − e−10λ)]/e−10λ
= e−10λ(1 - e−5λ)/e−10λ = 1 - e−5λ = 0.3935 = P(X < 5)

Chapter 4 - Continuous Random Variables 31


Lack of Memory Property
For an exponential random variable X,
P(X < t1 + t2 | X > t1) = P(X < t2)
Ex. The time between the arrival of electronic
messages at your computer is exponentially
distributed with a mean of two hours ( = 1/2).
a/ What is the probability that you do not receive a
message during a two-hour period?
P(X > 2) = 1 – P(X  2) = e-2 = e-1 = 0.368
b/ If you have not had a message in the last four
hours, what is the probability that you do not
receive a message in the next two hours?
P(X > 6 | X > 4) = P(X > 2)

Chapter 4 - Continuous Random Variables 32


Exercises
(5x + 19) mod 109
(7x + 29) mod 109
(9x + 39) mod 109

Chapter 4 - Continuous Random Variables 33


SUMMARY

Continuous
Uniform

Continuous
variables can take Continuous
any value of an r. v.
Normal
interval in 

Exponential

Chapter 4 - Continuous Random Variables 34

You might also like