Professional Documents
Culture Documents
Continuous Probability Distribution.
Continuous Probability Distribution.
Introduction
Random variables may be classified in two distinct categories called discrete random variables and continuous
random variables. Discrete random variables can take values which are discrete and which can be written in the
form of a list. In contrast, continuous random variables can take values within a continuous range or an interval,
like the temperature in Central Park, or the height of an athlete in centimeters.
The most commonly met continuous random variables in engineering are the Uniform, Exponential and Normal
distributions.
Definition: The probability distribution or the probability density function (pdf) of a continuous random
variable 𝑿 is a function 𝒇(𝒙) defined on some interval 𝒂 ≤ 𝑿 ≤ 𝒃 such that:
𝒃
𝑷(𝒂 ≤ 𝑿 ≤ 𝒃) = ∫𝒂 𝒇(𝒙) 𝒅𝒙
The probability density function is constructed so that the area under its curve bounded by the x- axis is equal to
1 when computed over the entire range of X when 𝒇(𝒙) is defined.
𝑷(𝒂 ≤ 𝑿 ≤ 𝒃) = ∫ 𝒇(𝒙) 𝒅𝒙
𝒂
Definition: Given an arbitrary positive function, 𝒇(𝒙) ≥ 𝟎, defined on some interval 𝒂 ≤ 𝑿 ≤ 𝒃 then the
𝒃
process of choosing a suitable constant 𝒌 to make ∫𝒂 𝒌. 𝒇(𝒙) 𝒅𝒙 = 𝟏 is called normalizing the function 𝒇(𝒙).
In other words, if we are asked to normalize the function 𝒌. 𝒇(𝒙), on an interval [𝑎, 𝑏], first we must be sure that
𝒃
𝑓(𝑥) is positive on it and second to find the value of the constant , 𝒌 such that ∫𝒂 𝒌. 𝒇(𝒙) 𝒅𝒙 = 𝟏 .
1
Cumulative Distribution Function 𝑭(𝒙)
The cumulative function 𝑭(𝒙) for a continuous random variable X with probability density function 𝒇(𝒙) is
𝒙
given by: 𝑭(𝒙) = 𝑷(𝑿 ≤ 𝒙) = ∫−∞ 𝒇(𝒖) 𝒅𝒖 −∞≤𝒙≤∞
𝝁 = 𝑬(𝒙) = ∫ 𝒙. 𝒇(𝒙) 𝒅𝒙
−∞
Standard Deviation
The standard deviation 𝑺𝑫 of rv 𝑿 is the positive square root of the variance, 𝝈𝟐
𝑺𝑫 = √𝑽𝒂𝒓(𝑿) = √𝝈𝟐
Summary:
∞
1. The mean or expected value of a random variable 𝑿 is, 𝝁 = 𝑬(𝒙) = ∫−∞ 𝒙. 𝒇(𝒙) 𝒅𝒙
∞
2. The variance of a random variable 𝑿 is, 𝝈𝟐 = 𝑬(𝑿𝟐 ) − 𝝁𝟐 = ∫−∞ 𝒙𝟐 . 𝒇(𝒙) 𝒅𝒙 − 𝝁𝟐
6. For any two numbers a and b with 𝑎 < 𝑏 𝑷(𝑿 > 𝒂) = 𝟏 − 𝑭(𝒂)
2
Examples on Continuous Random Variables
Example (1): Let X be continuous random variable having the probability density function:
𝑐𝑥 , 0≤ 𝑥≤1
𝑓(𝑥) = {
0, 𝑜𝑡ℎ𝑒𝑟𝑤𝑖𝑠𝑒
i) Find the value of the constant .
ii) Find the mean and variance for the continuous random variable 𝑋.
iii) Find the cumulative density function 𝐹(𝑋) and use it to evaluate 𝑃(0.2 < 𝑋 < 0.5).!!
Solution
1
∞ ∞ 1 𝑥2 1
i) Since, ∫−∞ 𝑓(𝑥)𝑑𝑥 = 1, therefore, ∫−∞ 𝑓(𝑥) 𝑑𝑥 = ∫0 𝑐𝑥 𝑑𝑥 = 𝑐 | = 𝑐 (2) = 1, ⟹ 𝑐=2
2 0
∞ 1 2 1 2
ii) The mean 𝜇 = 𝐸(𝑋) = ∫−∞ 𝑥. 𝑓(𝑥) 𝑑𝑥 = ∫0 2𝑥 2 𝑑𝑥 = 𝑥3| =
3 0 3
∞ 1 2 1 1
and 𝐸(𝑋 2 ) = ∫−∞ 𝑥 2 . 𝑓(𝑥) 𝑑𝑥 = ∫0 2𝑥 3 𝑑𝑥 = 𝑥4| =
4 0 2
1 2 2
therefore, the variance is : 𝜎 2 = 𝐸(𝑋 2 ) − 𝜇 2 = − ( 3) = 0.0556
2
iii) The cumulative distribution for the continuous random variable X with the probability
density function 𝑓(𝑥) is given by :
𝑥
𝐹(𝑥) = 𝑃(𝑋 ≤ 𝑥) = ∫−∞ 𝑓(𝑢)𝑑𝑢 −∞ ≤ 𝑥 ≤ ∞
𝑥
= ∫0 2𝑢 𝑑𝑢 = 𝑢2 |0𝑥 = 𝑥 2 0≤𝑥≤1
0 𝑥<0
Therefore, 𝐹(𝑥) = {𝑥 2 0≤𝑥≤1
1 𝑥>1
3
∞ 1 1 1.5 1 1.5 3
ii) The mean 𝝁 = ∫−∞ 𝑥. 𝑓(𝑥)𝑑𝑥 = (1.5) ∫0 𝑥(𝑥 1.5 )𝑑𝑥 = (1.5) ∫0 (𝑥 1.5 )𝑑𝑥 = (2.5)𝑥 2.5 | = 2.5 (1) = 5 = 0.6
0
∞ 1 1 1.5 3
iii) ∵ 𝐸(𝑋 2 ) = ∫−∞ 𝑥 2 . 𝑓(𝑥) 𝑑𝑥 = ∫0 (𝑥 2 )(1.5𝑥 0.5 )𝑑𝑥 = 1.5 ∫0 3𝑥 2.5 𝑑𝑥 = 3.5
𝑥 3.5 |10 = 7
= 0.43
0 𝑥<0
𝑭(𝒙) = { 𝑥 1,5 0≤𝑥≤1
1 𝑥>1
Example (3): The probability density function of a random variable X, that represents the lifetime of certain
type of electronic devices (measured in hours), is given by,
10/𝑥 2 𝑖𝑓 𝑥 > 10
𝑓(𝑥) = {
0 𝑥 ≤ 10
𝟏𝟎
𝟏− 𝒊𝒇 𝒙 > 𝟏𝟎
𝒙
Therefore, the cumulative distribution is; 𝑭(𝒙) = {
𝟎 𝒙 ≤ 𝟏𝟎
𝟏𝟎 𝟏𝟎 3 1 1
ii) 𝑃(20 < 𝑋 < 40) = 𝐹(40) − 𝐹(20) = [𝟏 − 𝟒𝟎] − [𝟏 − 𝟐𝟎] = 4 − 2 = 4 = 0.25 and,
∞ ∞ ∞ 1 1
𝑃(𝑋 > 20) = ∫20 𝑓(𝑥)𝑑𝑥 = ∫20 (10/𝑥 2 ) 𝑑𝑥 = 10 ∫20 (𝑥 −2 ) 𝑑𝑥 = −10| 𝑥−1 |∞
20 = −10 [0 − 20] = 2
4
iii) What is the probability that of 6 such types of devices at least 3 will function for at least 15 hours? What
assumptions are you making? This is another one of those problems that must be considered hierarchically in
steps. Break the problem up into two steps:
a) finding the probability that 1 device functions for at least 15 hours, and
b) finding the probability that 3 of the 6 devices function for at least 15 hours.
Step 1: One Device
First we must find the probability that one randomly selected device will function for at least 15 hours.
It is given that each device follows a probability distribution 𝒇(𝒙) given earlier. Let 𝑋 be the number of hours
that the device functions. Then,
∞ ∞ ∞ 1 2
𝑃(𝑋 ≥ 15) = ∫15 𝑓(𝑥)𝑑𝑥 = ∫15 (10/𝑥 2 ) 𝑑𝑥 = 10 ∫15 (𝑥 −2 ) 𝑑𝑥 = −10| 𝑥−1 |∞
15 = −10 [0 − 15] = 3
Example (4) The time unit a chemical reaction is complete (in millisecond) is approximated by the cumulative
distribution function,
1 − 𝑒 −0.01 𝑥 𝑥≥0
𝑭(𝒙) = {
0 𝑥<0
a) Determine the probability density function of X .
b) What proportion of the reaction is complete within 200 milliseconds ?
Solution
a) Using the result that the probability density function is the derivative of the 𝐹(𝑥), i.e
𝒅 𝟎. 𝟎𝟏𝒆−𝟎.𝟎𝟏 𝒙 𝒙≥𝟎
∵ 𝒇(𝒙) = 𝑭(𝒙) , we obtain; 𝒇(𝒙) = {
𝒅𝒙
𝟎 𝒙<𝟎
b) The probability that a reaction completes within 200 milliseconds is
𝑃(𝑋 < 200) = 𝐹(200) = 1 − 𝑒 (−0.01 )×(200) = 1 − 𝑒 −2 = 0.8647 .
5
Some Important Continuous Distributions
There are a number of continuous distributions which have important applications in engineering and science.
Among the most important continuous probability distributions are:
(1) The Uniform Distribution
This Section introduces the simplest type of continuous uniform distribution which features a continuous
random variable 𝑋 with probability density function 𝑓(𝑥) which assumes a constant value over a finite interval.
Definition: The Uniform (or Rectangular) Distribution of random variable 𝑿 restricted to a finite interval [𝑎, 𝑏]
has a constant probability density function 𝒇(𝒙) = 𝒌 defined by:
𝒌 𝒊𝒇 𝒂 ≤ 𝒙 ≤ 𝒃
𝒇(𝒙) = {
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
Example (1): A clock stops at random at any time during the day. If 𝑿 is the time (hours plus fractions of
hours) at which the clock stops.
i) Determine the probability density function for 𝑋.
ii) Calculate the expected value and variance for 𝑋 at which the clock stops.
iii) Find the cumulative distribution function for rv 𝑋.
iv) Find the probability that the clock will stop between 2:00 pm and 2:45 pm using two methods.
Solution
∵ 𝑿 is the time at which the clock stops and follows a uniform distribution over the interval [0 , 24].
∞
Therefore, its probability density function for 𝑋 is 𝑓(𝑥) = 𝑘 and it satisfies; ∫−∞ 𝒇(𝒙)𝒅𝒙 = 𝟏
∴
∞ 𝟐𝟒 𝟐𝟒
𝒅𝒙 = 𝒌. | 𝑥 |
24 = 𝑘(24 − 0) = 24𝑘
∫−∞ 𝒇(𝒙)𝒅𝒙 = ∫𝟎 𝒌 𝒅𝒙 = 𝒌. ∫𝟎
0
𝟏
∴ 24𝑘 = 1 ⟹ 𝒌 = 𝟐𝟒
i) Over the interval [0 , 24] the probability density function 𝑓(𝑥) is given by the formula:
𝟏
𝒇(𝒙) = { 𝟐𝟒 𝒊𝒇 𝟎 ≤ 𝒙 ≤ 𝟐𝟒
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
∞
ii) The expected value of 𝑋 is, 𝑬(𝑿) = ∫−∞ 𝒙. 𝒇(𝒙) 𝒅𝒙
𝑏 𝟏 24 𝟏 𝑥2 24 𝟏 𝟏
Therefore, 𝑬(𝑿) = ∫𝑎 𝑥. 𝑓(𝒙) 𝑑𝑥 = ( ) ∫0 𝑥. 𝑑𝑥 = ( ) . | | = ( ) ( ) 242 = 12
𝟐𝟒 𝟐𝟒 2 0 𝟐𝟒 𝟐
∞
The variance of 𝑋 is, 𝑽𝒂𝒓(𝑿) = 𝑬(𝑿𝟐 ) − [𝑬(𝑿)]𝟐 = ∫−∞ 𝒙𝟐 . 𝒇(𝒙) 𝒅𝒙 − [𝑬(𝑿)]𝟐
24 𝟏 1 𝑥3 24 (12)2 (24)2
∴ 𝑽𝒂𝒓(𝑿) = ∫0 𝒙𝟐 . (𝟐𝟒) 𝑑𝑥 − (12)2 = | | − = − (12)2 = 48
(24) 3 0 3
iii) The cumulative distribution function 𝑭(𝒙) for the continuous random variable 𝑿 is defined by:
𝒙
𝑭(𝒙) = 𝑷(𝑿 ≤ 𝒙) = ∫−∞ 𝒇(𝒖) 𝒅𝒖 𝟎 ≤ 𝒙 ≤ 𝟐𝟒
𝑥 𝟏 𝟏 𝟏
∴ 𝐹(𝑥) = ∫0 (𝟐𝟒) 𝑑𝑢 = (𝟐𝟒) . | 𝑢 |𝑥0 = (𝟐𝟒) . 𝑥
6
𝟎 𝒙<𝟎
𝒙
𝑭(𝒙) = { 𝟎 ≤ 𝒙 ≤ 𝟐𝟒
𝟐𝟒
𝟏 𝒙 > 𝟐𝟒
14.75 14 0.75 1
iv) 𝑷(𝟏𝟒 < 𝑿 < 𝟏𝟒. 𝟕𝟓) = 𝑭(𝒃) − 𝑭(𝒂) = 𝐹(14.75) − 𝐹(14) = ( ) − (24) = = 32 and also,
24 24
𝒃 14.75 14.75 1 1 1
𝑷(𝟏𝟒 ≤ 𝑿 ≤ 𝟏𝟒. 𝟕𝟓) = ∫𝒂 𝒇(𝒙)𝒅𝒙 = ∫14 𝑓(𝑥)𝑑𝑥 = ∫14 (24) 𝑑𝑥 = (24) [14.75 − 14] = 32
Example (2): The thickness x of a protective coating applied to a conductor designed to work in corrosive
conditions follows a uniform distribution over the interval [20,40] microns. Find the mean, standard deviation
and cumulative distribution function of the thickness of the protective coating. Find also the probability that the
coating is less than 35 microns thick.
Solution
∵ Let 𝑋 be the random variable that represent the thickness x of a protective coating applied to a conductor
and follows a uniform distribution over the interval [20 , 40]. Therefore, its 𝑓(𝑥) is pdf that satisfies;
∞ ∞ 𝟒𝟎 𝟒𝟎 40 = 𝑘(40 − 20) = 20𝑘
∫−∞ 𝒇(𝒙)𝒅𝒙 = 𝟏, ⟹ ∫−∞ 𝒇(𝒙)𝒅𝒙 = ∫𝟐𝟎 𝒌 𝒅𝒙 = 𝒌. ∫𝟐𝟎 𝒅𝒙 = 𝒌. | 𝑥 |
20
𝟏 𝟓
∴ 20𝑘 = 1 ⟹ 𝒌 = 𝟐𝟎 = 𝟏𝟎𝟎 = 𝟎. 𝟎𝟓
i) Over the interval [20 , 40] the probability density function 𝑓(𝑥) is given by the formula:
𝟎. 𝟎𝟓 𝒊𝒇 𝟐𝟎 ≤ 𝒙 ≤ 𝟒𝟎
𝒇(𝒙) = {
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
∞ 40 𝑥2 40 (𝟎.𝟎𝟓) [402
ii) Mean 𝑬(𝑿) = ∫−∞ 𝒙. 𝒇(𝒙) 𝒅𝒙 = (𝟎. 𝟎𝟓) ∫20 𝑥. 𝑑𝑥 = (𝟎. 𝟎𝟓). | | = 2 − 202 ] = 30 𝜇𝑚
2 20
∞ 40
The variance 𝑽𝒂𝒓(𝑿) = 𝑬(𝑿𝟐 ) − [𝑬(𝑿)]𝟐 = ∫−∞ 𝒙𝟐 . 𝒇(𝒙) 𝒅𝒙 − [𝑬(𝑿)]𝟐 = ∫20 𝑥2 . (0.05) 𝑑𝑥 − (30)2
𝑥3 40 (30)2 (𝟎.𝟎𝟓)×[403 − 203 ]
= (0.05) | | − = − (30)2 ≈ 33.33
3 20 3
Definition: A continuous random variable 𝑋 is said to have an exponential distribution with parameter 𝜆, if its
pdf is given by
𝝀𝒆−𝝀𝒙 𝑥 ≥ 0,
𝒇(𝒙) = {
𝟎 𝒐𝒕𝒉𝒆𝒓𝒘𝒊𝒔𝒆
where 𝝀 > 𝟎 is called the rate of the distribution.
If 𝑿 is the time till failure, the question asks for 𝑃(𝑋 > 5000):
∞ ∞ ∞
𝑃(𝑋 > 5000) = ∫𝟓𝟎𝟎𝟎 𝝀 𝒆−𝝀𝒙 𝒅𝒙 = − ∫𝟓𝟎𝟎𝟎(−𝝀) 𝒆−𝝀𝒙 𝒅𝒙 = −| 𝒆−𝝀𝒙 | = −[0 − 𝒆−𝟓𝟎𝟎𝟎𝝀 ] ≈ 0.59
5000
8
(b) Find the mean and standard deviation of the time till failure.
∞ ∞
𝑴𝒆𝒂𝒏, is, 𝝁 = ∫−∞ 𝒙. 𝒇(𝒙) 𝒅𝒙 = ∫0 𝑥. (𝝀𝒆−𝝀𝒙 ) 𝑑𝑥 Using Integration by parts,
Let 𝑢 = 𝑥 𝑑𝑣 = 𝝀 𝒆−𝝀𝒙
𝒅𝑢 = 𝑑𝑥 𝑣 = − 𝒆−𝝀𝒙
∞ ∞ ∞ ∞ 1 ∞ 1 𝟏
∴ 𝝁 = ∫0 𝑥. (𝝀𝒆−𝝀𝒙 ) 𝑑𝑥 = − | 𝑥 𝒆−𝝀𝒙 | + ∫0 (𝒆−𝝀𝒙 ) 𝑑𝑥 = − | 𝑥 𝒆−𝝀𝒙 | − . | 𝒆−𝝀𝒙 | = − [0 − 1] =
0 0 𝝀 0 𝝀 𝝀
𝟏 𝟏𝟎𝟎𝟎
𝑴𝒆𝒂𝒏 𝝁 = = = 𝟗𝟒𝟗𝟏. 𝟐𝟕 𝒉𝒐𝒖𝒓𝒔
𝝀 𝟎.𝟏𝟎𝟓𝟑𝟔
As an exercise, you may wish to verify that by applying integration by parts twice,
∞
𝑬(𝑿𝟐 ) = ∫−∞ 𝒙𝟐 . 𝒇(𝒙) 𝒅𝒙 = ⋯ = 𝟐/𝝀𝟐
𝟐 𝟏 𝟐
The variance of 𝑋 is, 𝑽𝒂𝒓(𝑿) = 𝑬(𝑿𝟐 ) − [𝑬(𝑿)]𝟐 = 𝟐 − 𝟐 = 𝟏/𝝀
𝝀 𝝀
24 𝟏 1 𝑥3 24 (12)2 (24)2
∴ 𝑽𝒂𝒓(𝑿) = ∫0 𝒙𝟐 . (𝟐𝟒) 𝑑𝑥 − (12)2 = | | − = − (12)2 = 48
(24) 3 0 3
𝟏 𝟏
𝑺𝒕𝒂𝒏𝒅𝒂𝒓𝒅 𝒅𝒆𝒗𝒊𝒂𝒕𝒊𝒐𝒏 = √𝑽𝒂𝒓𝒊𝒂𝒏𝒄𝒆 = √𝝀𝟐 = 𝝀 = 𝟗𝟒𝟗𝟏. 𝟐𝟕 𝒉𝒐𝒖𝒓𝒔
Dr.Mohamed Said
9
MSA University Module Title: Probability and Statistics
Faculty of Engineering Module Code: MAT 361/231
1 1
a) 𝑓(𝑥) = 2 (𝑥 2 + 4) 0 ≤ 𝑥 ≤ 1, b) 𝑓(𝑥) = 12 (2𝑥 + 1) 0 ≤ 𝑥 ≤ 3,
10
c) 𝑓(𝑥) = 𝑥 2 − 4𝑥 + 0 ≤ 𝑥 ≤ 3, d) 𝑓(𝑥) = 6𝑥(1 − 𝑥) 0≤𝑥≤1
3
𝑥
e) 𝑓(𝑥) = 4 1≤𝑥≤3 f) 𝑓(𝑥) = 12𝑥(1 − 𝑥)2 0≤𝑥≤1
(2) Normalize each of the following functions over the given range:
𝑒
a) 𝑓(𝑥) = 𝑘𝑒 −𝑥 0≤𝑥≤1 Ans: 𝑘 = ≈ 1.582
𝑒−1
(5) The time unit a chemical reaction is complete (in millisecond ) is approximated by the cumulative distribution
function,
0 𝑥<0
𝐹(𝑥) = {
1 − 𝑒 −0.01 𝑥 0≤𝑥
i) Determine the probability density function of X.
ii) What proportion of the reaction is complete within 200 milliseconds?
(6) The lifetime T (years) of an electronic component is a continuous random variable with a probability density function
given by; 𝒇(𝒙) = 𝒆−𝒙 𝑥 ≥ 0,
Find the lifetime L which a typical component is 60% certain to exceed. If five components are sold to a manufacturer
find the probability that at least one of them will have a lifetime less than L years.
10