Continuous Random Variables

You might also like

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

CONTINUOUS RANDOM VARIABLES

1
CONTINUOUS RANDOM VARIABLES
Remember that random variables may be classified as
✓ Discrete
• The random variable assumes either finite or countably infinite values.
✓ Continuous
• The random variable is characterized by (infinitely) uncountable values
within any interval.

LO 6.1
2
CONTINUOUS RANDOM VARIABLES
• When computing probabilities for a continuous random variable,
remember that P(X = x) = 0.
✓ We cannot assign a nonzero probability to each infinitely uncountable
value and still have the probabilities sum to one.
✓ Thus, since P(X = a) and P(X = b) both equal zero, the following holds
for continuous random variables:

P (a  X  b ) = P (a  X  b ) = P (a  X  b ) = P (a  X  b )
LO 6.1
3
PROBABILITY DISTRIBUTION FUNCTION
• Probability Density Function f(x) for a continuous random variable:

✓ Used to find the probability that the variable assumes a value within an
interval (e.g., P(a < X < b) ).

✓ f(x) ≥ 0 for all possible values x of X.

✓ The area under f(x) over all values of x of X equals one.

LO 6.1
4
PROBABILITY DISTRIBUTION FUNCTION
The basic idea is that probabilities are defined by areas under the graph of
𝑓(𝑥).
That is, a random variable 𝑋 has density 𝑓(𝑥) if for all 𝑎 ≤ 𝑏.
𝑏
𝑃 𝑎 ≤ 𝑋 ≤ 𝑏 = න 𝑓 𝑥 𝑑𝑥
𝑎

Such that
▪ 𝑓(𝑥) ≥ 0

▪ Total area = 1, i.e., ‫׬‬−∞ 𝑓 𝑥 𝑑𝑥 = 1
5
CUMULATIVE DISTRIBUTION FUNCTION
• Cumulative Distribution Function F(x) of a continuous random variable
X:
✓ For any value x of the random variable X, the cumulative distribution
function F(x) is defined as:
𝑥
F(x) = P(X < x) = 𝑃 −∞ ≤ 𝑋 ≤ 𝑥 = ‫׬‬−∞ 𝑓 𝑦 𝑑𝑦
✓ As a result, P(a < X < b) = F(b) − F(a)

LO 6.1
6
EXAMPLE
Suppose that X is a continuous random variable whose probability density
function is given by

2
𝑓 𝑥 =ቊ 𝐶 4𝑥 − 2𝑥 0<𝑥<2
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒

1. What is the value of C?


2. Find 𝑃(𝑋 > 1)

7
EXPECTATION AND VARIANCE OF CONTINUOUS
RANDOM VARIABLE
The mean/expectation of X is given by

𝐸 𝑋 = න 𝑥𝑓 𝑥 𝑑𝑥
−∞

The variance is given by


∞ ∞ 2
𝑉𝑎𝑟 𝑋 = 𝐸 𝑋 2 − 𝐸 𝑋 2 = න 𝑥 2 𝑓 𝑥 𝑑𝑥 − න 𝑥𝑓 𝑥 𝑑𝑥
−∞ −∞

8
EXAMPLE
For some constant c, the random variable X has the probability density function

4 0<𝑥 <2
𝑓 𝑥 =ቊ 𝑐𝑥
0 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
Find 𝐸[𝑋] and Var 𝑋

9
STANDARD CONTINUOUS
DISTRIBUTIONS
10
UNIFORM DISTRIBUTION FUNCTION
▪ This distribution is appropriate when the underlying random variable is equally
likely to assume a value within a specified range.
▪ Scenario: Suppose that over a period of several days, the manager of a large hotel
has recorded the waiting times of 1,000 people waiting for an elevator in the lobby
at dinnertime (5:00 p.m. to 7:00 p.m.).
▪ The observed waiting times range from zero to four minutes. Furthermore, when
the waiting times are arranged into a histogram, the bars making up the histogram
have approximately equal heights, giving the histogram a rectangular appearance.
This implies that the relative frequencies of all waiting times from zero to four
minutes are about the same.
11
UNIFORM DISTRIBUTION

 1
 for a  x  b
f ( x )=  b − a
0
 otherwise

𝑎+𝑏
Mean:
2

(𝑏−𝑎)2
Variance:
12

12
ELEVATOR WAITING TIME

Elevator wait time  1 1


 = = 1 for 0  x  4
Uniform 0 - 4 f ( x) = b − a 4 − 0 4
a=0  0 Otherwise
b=4
a+b 0+4
x = = =2
2 2
b−a 4−0
x = = = 1.1547
12 12

13
ELEVATOR WAITING TIME
Suppose the manager wishes to find the
probability that a randomly selected
person will spend at least 2.5 minutes
waiting for an elevator, then this
probability is the area under the curve
f(x) corresponding to the interval [2.5,
4].
𝑃 𝑥 ≥ 2.5 = 𝑃 2.5 ≤ 𝑥 ≤ 4 =
1
𝑏𝑎𝑠𝑒 ∗ ℎ𝑒𝑖𝑔ℎ𝑡 = 1.5 ∗ = 0.375
4

14
PROBLEM
A manager of a local drugstore is projecting next month’s sales for a particular
cosmetic line. She knows from historical data that sales follow a continuous
uniform distribution with a lower limit of $2,500 and an upper limit of $5,000.
1. What are the mean and the standard deviation for the distribution?
With a lower limit of a = 2,500 and an upper limit of b = 5,000, we calculate the
mean and the standard deviation for this continuous uniform distribution as
2500+5000
𝑚𝑒𝑎𝑛 = = $3,750; 𝑆𝐷 = $721.69
2

15
CONT’D…

What is the probability that sales exceed


$4,000?
1
𝑓 𝑥 = = 0.0004
5000−2500

𝑃 𝑥 > 4000 = 1000 ∗ 0.0004 = 0.4

16
CONT’D…

What is the probability that sales are


between $3,200 and $3,800?

𝑃 3200 ≤ 𝑥 ≤ 3800 = 600 ∗


0.0004 = 0.24

17
EXPONENTIAL DISTRIBUTION FUNCTION
Scenario: Suppose the likelihood of a specified number of cars arriving at a
McDonald’s drive-thru over a particular period follows Poisson distribution.
Suppose we are interested in the time that elapses between car arrivals at the
McDonald’s drive-thru. We can use the exponential distribution to describe these
times. The exponential random variable is nonnegative; the underlying variable X is
defined for x ≥ 0.
The x is described by the exponential distribution with parameter λ, which is used to
model the time between successive events, e.g., the time between failures of light
bulbs, the time between two customer arrivals, the time between two earthquakes,
time between two customer feedback calls, etc.

18
EXPONENTIAL DISTRIBUTION FUNCTION
A random variable X follows the exponential distribution if its probability density
function is

 e −  x for x  0
f ( x )= 
0 otherwise
P ( a  x  b ) = e −  a − e − b
and
P ( X  x ) = 1 − e− x
Note: If the rate is λ, the expected waiting time
 X = 1  and  X = 1  between events is 1/λ.
19
EXPONENTIAL DISTRIBUTION FUNCTION

20
POISSON AND EXPONENTIAL
If the number of events occurring per unit of time or space (for example, the
number of customer arrivals per hour or the number of imperfections per square yard
of cloth) has a Poisson distribution with mean λ, then the number of units, x, time
or space between successive events has an exponential distribution with mean 1/
λ

21
PROBLEM
Let the time between e-mail messages during work hours be exponentially
distributed with a mean of 25 minutes.
1. Calculate the rate parameter λ.
1
𝐸[𝑋] = = 25
𝜆

𝜆 = 0.04
2. What is the probability that you do not get an e-mail for over one hour?
𝑃 𝑋 > 60 = 1 − 𝑃 𝑋 ≤ 60 = 𝑒 −0.04∗60 = 0.0907

22
CONT’D…
3. What is the probability that you will get an e-mail within 10 minutes?

𝑃 𝑋 ≤ 10 = 1 − 𝑒 −0.04∗10 = 0.3297

23
MEMORYLESS PROPERTY
Memoryless Property:
The memoryless property is a unique characteristic of the exponential distribution,
which states that the probability of an event occurring at a certain time in the future
does not depend on how much time has already passed, i.e., the past has no bearing
on its future value.
𝑃 𝑋 > 𝑡 + 𝑠 𝑋 > 𝑡 = 𝑃(𝑋 > 𝑠)
Every instant is like the beginning of a new random period, which has the same
distribution regardless of how much time has already elapsed.

24
EXAMPLE
The time X (in minutes) between customer arrivals at a bank is exponentially
distributed with mean 1.5 minutes.
a. If a customer has just arrived, what is the probability that no customer will
arrive in the next 2 minutes?
1 2
= 1.5 𝑚𝑖𝑛𝑢𝑡𝑒𝑠 ⇒ 𝜆 =
𝜆 3
2
− 𝑥
𝑃 𝑋 >𝑥 =1−𝐹 𝑥 =𝑒 3

2
−3∗2
𝑃 𝑋>2 =𝑒 = 0.2636

25
CONT’D…
b. What is the probability that no customer will arrive within the next minute,
given that no customer has arrived in the past minute?
By memoryless property:
2 2
−3∗1 −3
𝑃 𝑋 > 2|𝑋 > 1 = 𝑃 𝑋 > 1 = 𝑒 =𝑒 = 0.5134

26
GAMMA DISTRIBUTION
▪ Gamma (r, λ) distribution is a generalization of the exponential distribution. It
models the waiting time for the 𝑟 𝑡ℎ event.
▪ Therefore, Exponential(λ) is also Gamma(1, λ).
▪ A random variable X follows the Gamma distribution if its probability density
function is
 e −  x ( x ) r
f ( x) =
( x)

where 𝛤(𝑥) is called the gamma function and is defined as: ( x) =  e− x x r −1dx = (r − 1)!
0

▪ Mean and SD:  X = r  and  X = r 


27
NORMAL DISTRIBUTION
▪ The normal probability distribution is the most important distribution for describing a
continuous random variable.
▪ It has been used in a wide variety of applications including:
▪ Heights of people
▪ Amounts of rainfall
▪ Test scores
▪ Scientific measurements
▪ Closely approximates the probability distribution for a wide range of random variables and
considers the natural distribution for a number of features for large groups.

28
NORMAL PROBABILITY DISTRIBUTION
▪ The entire family of normal probability distributions is defined by its mean μ and its
standard deviation σ.
▪ Normal distribution is symmetric around its mean μ, and its shape depends on
standard deviation σ.
▪ The highest point on the normal curve is at the mean, which is also the median and
mode.

29
NORMAL PROBABILITY DISTRIBUTION
Normal Probability Density Function

1  x− 
2

1 −  
2  
f ( x) = e
 2
where:
𝜇 = mean
𝜎 = standard deviation
𝜋 = 3.14159
e = 2.71828
30
NORMAL PROBABILITY DISTRIBUTION
The mean can be any numerical value: negative, zero, or positive.

31
NORMAL PROBABILITY DISTRIBUTION
The standard deviation determines the width of the curve: larger values
result in wider, flatter curves.

32
NORMAL PROBABILITY DISTRIBUTION
Probabilities for the normal random variable are given by areas under the
curve. The total area under the curve is 1 (0.5 to the left of the mean and 0.5
to the right).

33
NORMAL PROBABILITIES

7-34
STANDARD NORMAL PROBABILITY DISTRIBUTION
▪ A random variable having a normal distribution with a mean of 0 and a standard
deviation of 1 is said to have a standard normal probability distribution.
▪ The letter z is used to designate the standard normal random variable.

35
STANDARD NORMAL PROBABILITY DISTRIBUTION

36
STANDARD NORMAL PROBABILITY DISTRIBUTION
2 𝑋−𝜇
If 𝑋~𝑁(𝜇, 𝜎 ), then Z = ~𝑁 0, 1 , standard normal distribution and
𝜎

1 1
− 𝑧2
𝜑 𝑧 = 𝑒 2
2𝜋

Note:
▪ The pdf φ(.) is symmetric around 0, i.e., φ(-z) = φ(z).
▪ Cumulative Probabilities: 𝐹(-z) = 1- 𝐹(z)

37
EXAMPLE
Pep Zone sells auto parts and supplies, including a popular multi-grade motor oil.
When the stock of this oil drops to 20 gallons, a replenishment order is placed.
The store manager is concerned that sales are lost due to stockouts while waiting for a
replenishment order.
It has been determined that demand during replenishment lead-time is normally
distributed with a mean of 15 gallons and a standard deviation of 6 gallons.
The manager would like to know the probability of a stockout during replenishment
lead time. In other words, what is the probability that demand during lead time will
exceed 20 gallons?
38
STANDARD NORMAL PROBABILITY DISTRIBUTION
Solving for the Stockout Probability
Step 1: Convert x to the standard normal distribution.

Step 2: Find the area under the standard normal curve to the left of 𝑧 = 0.83.

39
STANDARD NORMAL TABLE

40
STANDARD NORMAL PROBABILITY DISTRIBUTION

z .00 .01 .02 .03 .04 .05 .06 .07 .08 .09
. . . . . . . . . . .
.5 .6915 .6950 .6985 .7019 .7054 .7088 .7123 .7157 .7190 .7224
.6 .7257 .7291 .7324 .7357 .7389 .7422 .7454 .7486 .7517 .7549
.7 .7580 .7611 .7642 .7673 .7704 .7734 .7764 .7794 .7823 .7852
.8 .7881 .7910 .7939 .7967 .7795 .8023 .8051 .8078 .8106 .8133
.9 .8129 .8186 .8212 .8238 .8264 .8289 .8315 .8340 .8365 .8389
. . . . . . . . . . .

41
STANDARD NORMAL PROBABILITY DISTRIBUTION (

Solving for the Stockout Probability


Step 3: Compute the area under the standard normal curve to the right of z
= 0.83.

42
STANDARD NORMAL PROBABILITY DISTRIBUTION
Solving for the Stockout Probability

43
TRANSFORMING A NORMAL RANDOM VARIABLE WITH MEAN 50 AND
STANDARD 10 INTO THE STANDARD NORMAL CURVE

44
THE COFFEE TEMPERATURE CASE: MEETING
CUSTOMER REQUIREMENTS
Marketing research done by a fast-food restaurant indicates that coffee tastes best if
its temperature is between 153°F and 167°F. The restaurant has sampled the coffee it
serves and observed the 48 temperature readings. The temperature readings have a
mean of 159.3958 and a standard deviation of 6.4238 and are described by a bell-
shaped histogram. Using sample mean and standard deviation as point estimates of
the mean μ and the standard deviation σ of the population of all possible coffee
temperatures, calculate the probability that x, the temperature of a randomly selected
cup of coffee, is outside the customer requirements for best-tasting coffee (that is,
less than 153° or greater than 167°).

45
THINK ABOUT IT
If 𝑋1 ~𝑁(𝜇, 𝜎 2 ) and 𝑋2 ~𝑁(𝜇, 𝜎 2 ) are independent and identical normal random
variables, then what’s the difference between 2𝑋1 and 𝑋1 + 𝑋2 ? .
𝐸(2𝑋1 ) = 2𝐸 𝑋1 = 2μ and
𝑉𝑎𝑟(2𝑋1 ) = 4𝑉𝑎𝑟 𝑋1 = 4𝜎 2
and
𝐸 𝑋1 + 𝑋2 = 2μ
𝑉𝑎𝑟(𝑋1 + 𝑋2 ) = 𝑉𝑎𝑟 𝑋1 + 𝑉𝑎𝑟 𝑋2 = 2𝜎 2
Both are Normal distribution but the variance of sum is 2𝜎 2 rather than 4𝜎 2

46
RESULTS
Consider any set of random variables 𝑋1 , 𝑋2 , … 𝑋𝑛 that are independent and
identically distributed.
E(𝑋𝑖 ) = E(X) = μ
Var(𝑋𝑖 ) = V(X) = 𝜎 2
Then,
𝐸(𝑋1 + 𝑋2 + 𝑋3 + ⋯ 𝑋𝑛 ) = 𝑛μ
𝑉𝑎𝑟(𝑋1 + 𝑋2 + 𝑋3 + ⋯ 𝑋𝑛 ) = 𝑛𝜎 2

47
RESULTS
For two independent normal random variables X~𝑁(𝑎, 𝑢) and Y~𝑁 𝑏, 𝑣 , then
1. X + Y~𝑁(𝜇 = 𝑎 + 𝑏, 𝜎 2 = 𝑢 + 𝑣)
2. X − Y~𝑁(𝜇 = 𝑎 − 𝑏, 𝜎 2 = 𝑢 + 𝑣)

Example: Suppose X~𝑁(𝜇 = 5, 𝜎 2 = 16) and Y~𝑁 𝜇 = −5, 𝜎 2 = 9 .


Find P(X-Y>15)?

48
AVERAGE (SAMPLE MEAN) OF IID RANDOM
VARIABLES
Suppose we are looking at n independent and identically distributed random
variables, 𝑋1 , 𝑋2 , … 𝑋𝑛 with each random variable 𝑋𝑖 has same mean, µ, and
variance, 𝜎 2 .
Let’s suppose we want to look at the average value of n random variables:
𝑋ത = (𝑋1 +𝑋2 + ⋯ 𝑋𝑛 )/𝑛.
𝑋1 +𝑋2 + ⋯𝑋𝑛 1 𝑛𝜇
Then, 𝐸 𝑋ത = = 𝐸 𝑋1 +𝑋2 + ⋯ 𝑋𝑛 = =𝜇
𝑛 𝑛 𝑛

𝑋1 +𝑋2 + ⋯𝑋𝑛 1 𝑛𝜎2 𝜎2


Var 𝑋ത = = 𝑉𝑎𝑟 𝑋1 +𝑋2 + ⋯ 𝑋𝑛 = =
𝑛 𝑛2 𝑛2 𝑛

49
RESULT
If 𝑋1 , 𝑋2 , … 𝑋𝑛 are n independent and identically distributed random variables
with each random variable 𝑋𝑖 has mean, µ, and variance, 𝜎 2 , then
𝑋1 +𝑋2 + ⋯ 𝑋𝑛 ~𝑁(𝑛𝜇, 𝑛𝜎 2 )
and
𝑋1 +𝑋2 + ⋯𝑋𝑛 𝜎 2

𝑋= ~𝑁(𝜇, )
𝑛 𝑛

50
EXAMPLE
A production company’s hourly employees’ age is normally distributed with an
average age of 37.6 years and a standard deviation of 8.3 years. What is the
probability that the randomly chosen 45 hourly employees will have an average age
of less than 40?
Alternatively,
What is the average age distribution of randomly chosen 45 employees?

51
WHEN RANDOM VARIABLES ARE NOT
NORMAL
52
WHEN RANDOM VARIABLES ARE NOT NORMAL

Consider the daily expenditure of a person on groceries depending on the items


purchased is Rs. 100, Rs. 140, or Rs. 150 with probabilities of 60%, 20%, and 20%,
respectively. Their grocery items vary independently each day, unrelated to their
previous selections.

a. Obtain the distribution of the person’s daily expenditure on groceries.

b. Obtain the distribution of the person’s average expenditure for groceries over
two days.

53
DISTRIBUTION OF 𝑋ത

0.4 n=2
0.36
0.35

0.3
0.24 0.24
0.25

Probability
0.2

0.15

0.1 0.08
0.04 0.04
0.05

0
100 110 120 130 140 150
Average Expenditure on Groceries

54
DISTRIBUTION OF 𝑋ത FOR 5 DAYS

Probability

Average Expenditure

55
DISTRIBUTION OF 𝑋ത FOR 30 DAYS

Probability

Average Expenditure

56
THE CENTRAL LIMIT THEOREM (CLT)
Let 𝑋1 , 𝑋2 , … 𝑋𝑛 are n independent and identically distributed random variables with
each random variable 𝑋𝑖 has mean, µ, and variance, 𝜎 2 , then for large n
𝑋1 +𝑋2 + ⋯ 𝑋𝑛 is approximately 𝑁(𝑛𝜇, 𝑛𝜎 2 )
Equivalently, for large n
𝑋1 +𝑋2 + ⋯𝑋𝑛 𝜎2
𝑋ത = is approximately 𝑁(𝜇, )
𝑛 𝑛

Note: A common reference point for what is considered “large” is when n is greater
than or equal to 30.

57
EXAMPLE CONT’D…
Identify the expected expenditure on groceries and the standard deviation:
𝜇 = 𝐸 𝑋 = 118, 𝜎 2 = 496, 𝜎 = 22.27
Now, the approximate distribution of average (sample mean) for 𝑛 = 30, using CLT:
496

𝑋~𝑁 118, = 𝑁(118, 16.53)
30
What is the probability that over 30 days, the average spend is at least Rs.122?

58
LIMITATION OF CLT
▪ It can be used only when the random variables are independent and have identical
distribution.
▪ It can lead to a wrong approximation when n is small, and the distribution is
skewed.

59
EXAMPLE
Robertson Employment Service customarily gives standard intelligence and aptitude
tests to all people who seek employment through the firm. The firm has collected
data for several years and found that the scores’ distribution is not normal but
skewed to the left, with a mean of 86 and a standard deviation of 16. What is the
probability that in a sample of 75 applicants who take the test, the mean score will be
less than 84 or greater than 90?

60
THE NORMAL APPROXIMATION TO THE BINOMIAL
DISTRIBUTION
An important result in probability theory is that when n is large, a binomial
random variable with parameters n and p will have approximately the same
distribution as a normal random variable with the same mean and variance as
the binomial.
Conversion Equation: 𝜇 = 𝑛𝑝 and 𝜎 = 𝑛𝑝𝑞
The normal approximation will, in general, be quite good for ‘large’ values of
n satisfying 𝑛𝑝 ≥ 5 and 𝑛(1 − 𝑝) ≥ 5

61
The probability mass function of a binomial (n, p) random
variable becomes more and more “normal” as n becomes
larger and larger.

62
THE BINOMIAL DISTRIBUTION WITH P = .20
n = 10, p = 0.2 n = 100, p = 0.2

63
THE BINOMIAL DISTRIBUTION WITH P = .01

64
EXAMPLE
Let X be the number of times that a fair coin hat is flipped 40 times lands on
heads. Find the probability that X = 20. Use the normal approximation and
then compare it with the exact solution.

65
CORRECTING FOR CONTINUITY
A correction of +.50 or -.50 or .50, depending on the problem, is required. This
correction ensures that most of the binomial problem’s information is correctly
transferred to the normal curve analysis.

This correction is called the correction for continuity, which is made during the
conversion of a discrete distribution into a continuous distribution.

66

You might also like