0% found this document useful (0 votes)
4 views25 pages

Lecture 5

The document discusses continuous random variables, defining them as functions that assign numerical values to outcomes of random experiments. It covers key concepts such as probability distributions, mean, variance, and standard deviation, along with the properties of probability density functions and cumulative distribution functions. Examples illustrate the application of these concepts in engineering contexts, including calculations for expected values and variances.

Uploaded by

handeaksoy502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views25 pages

Lecture 5

The document discusses continuous random variables, defining them as functions that assign numerical values to outcomes of random experiments. It covers key concepts such as probability distributions, mean, variance, and standard deviation, along with the properties of probability density functions and cumulative distribution functions. Examples illustrate the application of these concepts in engineering contexts, including calculations for expected values and variances.

Uploaded by

handeaksoy502
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 25

Probability and

Statistics for
Engineers
Continuous Random Variables
Random
Variables (cont’d)
● Continuous Random Variables and Their
Probability Distributions
● Mean, Variance, and Standard Deviation of
Continuous Random Variables
Random Variables
A random variable is a function that assigns a numerical value
to each outcome of a random experiment (each outcome in a
sample space).

Random variables are usually denoted by uppercase letters


(𝑋, 𝑌, 𝑍, …) and their values by lowercase letters (𝑥 , 𝑦, 𝑧, …).

If 𝑋 is a random variable, its range 𝑅 is the set of all possible


values 𝑥 that 𝑋 can take with nonzero probability. That is, … −4 −3 −2 −1 0 1 2 3 4 …

𝑅 = 𝑥: 𝑃 𝑋 = 𝑥 > 0 𝑋: 𝑆 → ℝ

A factory
A factory
inspects
tests 5a products
randomly and
selected
countsbattery
the number
and measures
of defective
how long
items.
it If
operates
the random
before
variable
failure.𝑋
represents
If the random
the number
variableof defective
𝑋 represents
items
theinlifespan
the batch,
of apossible
battery (in
values
hours),
of 𝑋andarea0,battery
1, 2, 3, can
4, and
last5.
anywhere from 50 to 150 hours, then𝑅𝑅 == 0,1,2,3,4,5
50,150 .
Random Variables

Random Variables

Discrete Continuous

takes on a countable number of takes on infinitely many values


distinct values within an interval
Continuous Random Variables

Random Variables

Discrete Continuous

A continuous random variable takes on an infinite number of values within a given range.

It arises in measurement-based processes.


Continuous Random Variables
The probability distribution 𝑓 𝑥 of a continuous random variable 𝑋 (probability density function (pdf))
is constructed so that the area under its curve bounded by the x axis is equal to 1 when computed over
the range of 𝑋 for which 𝑓 𝑥 is defined.

Properties of the pdf:


A continuous random variable has a probability of 0
i. 𝑓 𝑥 ≥ 0 for all 𝑥 ∈ ℝ
of assuming exactly any of its values. That is, if 𝑋 is
a continuous random variable, then
𝑃 𝑋=𝑥 =0
ii. 𝑓 𝑥 𝑑𝑥 = 1
Continuous Random Variables
𝐹 𝑥

The cumulative distribution function (cdf), 𝐹 𝑥 , of a continuous


random variable 𝑋 represents the probability that 𝑋 does not
exceed the value 𝑥 .

𝐹 𝑥 =𝑃 𝑋≤𝑥 =𝑃 𝑋<𝑥 = 𝑓 𝑢 𝑑𝑢 for all 𝑥 ∈ ℝ


𝑥
𝑃 𝑋=𝑥 =0
𝑓 𝑥

Since 𝐹 𝑥 = ∫ 𝑓 𝑢 𝑑𝑢 ,
Properties of the cdf:
𝑑
i. 𝐹 is a nondecreasing function 𝑓 𝑥 = 𝐹 𝑥
𝑑𝑥
if the derivative exists.
ii. 𝐹 is a continuous function

iii. lim 𝐹 𝑥 = 0 and lim 𝐹 𝑥 = 1 𝑥

→ →
Continuous Random Variables
For continuous random variables, probabilities are determined using either the probability density
function (𝑓 𝑥 ) or the cumulative distribution function (𝐹 𝑥 ).

𝑓 𝑥 𝑓 𝑥

𝑥 𝑥
𝑎 𝑎 𝑏

𝑃 𝑋≤𝑎 =𝑃 𝑋<𝑎 = 𝑓 𝑥 𝑑𝑥 𝑃 𝑋≥𝑎 =𝑃 𝑋>𝑎 = 𝑓 𝑥 𝑑𝑥 𝑃 𝑎≤𝑋≤𝑏 =𝑃 𝑎≤𝑋<𝑏 =𝑃 𝑎<𝑋≤𝑏 =𝑃 𝑎<𝑋<𝑏

= 𝑓 𝑥 𝑑𝑥
=𝐹 𝑎 =1−𝐹 𝑎
=𝐹 𝑏 −𝐹 𝑎
Mean of a Continuous Random Variable

The expected value (mean), 𝐸 𝑋 or 𝜇 , of a continuous random variable 𝑋 is defined as

𝐸 𝑋 =𝜇 = 𝑥𝑓 𝑥 𝑑𝑥

If 𝑋 is a continuous random variable, then the expected value of a function of 𝑋, say 𝑔 𝑋 , can be
obtained by

𝐸 𝑔 𝑋 =𝜇 = 𝑔 𝑥 𝑓 𝑥 𝑑𝑥
Variance and Standard Deviation of a
Continuous Random Variable
The variance, 𝑉𝑎𝑟 𝑋 or 𝜎 , of a continuous random variable 𝑋 is defined as

𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝜇 = 𝑥−𝜇 𝑓 𝑥 𝑑𝑥

An alternative formula for the variance is

𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = 𝑥 𝑓 𝑥 𝑑𝑥 − 𝑥𝑓 𝑥 𝑑𝑥

The standard deviation, 𝑆𝐷 𝑋 or σ , of 𝑋 is


𝑆𝐷 𝑋 = σ = 𝜎
Means and Variances of Linear
Combinations of Random Variables
Let 𝑋 and 𝑌 be random variables with means 𝜇 and 𝜇 , and variances 𝜎 and 𝜎 , respectively.

For any real numbers 𝑎, 𝑏, and 𝑐

𝐸 𝑎𝑋 + 𝑏𝑌 + 𝑐 = 𝜇 = 𝑎𝜇 + 𝑏𝜇 + 𝑐

Additionally, if 𝑋 and 𝑌 are independent, then

𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 + 𝑐 = 𝜎 =𝑎 𝜎 +𝑏 𝜎
Example: An engineer is analyzing the power output of two independent
generators that supply electricity to an industrial facility. Let 𝑋 and 𝑌 be
the power outputs (in MW) of Generator 1 and Generator 2, respectively.
The facility's total net power supply is affected by:
• 3𝑋 (since Generator 1 is used in high-demand mode, supplying 3 times its base output),
• −2𝑌 (since Generator 2 runs in backup mode and sometimes reduces the total supply),
• a constant base power of 5 MW is always available from an auxiliary system.
Thus, the total power supplied to the facility is modeled as 𝑍 = 3𝑋 − 2𝑌 + 5.

If the means and variances of X and Y are 𝜇 = 3, 𝜇 = 4, 𝜎 = 2, and 𝜎 = 3, compute the


expected value and the variance of the total output.

𝑍 = 3𝑋 − 2𝑌 + 5 ⟹ 𝜇 = 3𝜇 − 2𝜇 + 5 = 3 3 − 2 4 + 5 = 9 − 8 + 5 = 6 MW

𝜎 = 3 𝜎 + −2 𝜎 = 5 = 9 2 + 4 3 = 30 MW2
Example: An engineer is analyzing the thickness (in mm) of a metal sheet
produced by an industrial rolling machine. The random variable 𝑋 represents
the thickness of a randomly selected sheet.
Due to manufacturing imperfections, the thickness varies between 2 mm and 5 mm, following
the probability distribution
𝑘 5 − 𝑥 if 2 ≤ 𝑥 ≤ 5
𝑓 𝑥 =
0 otherwise
where 𝑘 is a constant.

a) Find the value of 𝑘 .


b) Sketch the graph of the density function of 𝑋.
c) Obtain the cumulative distribution of 𝑋 and sketch its graph.
d) What is the probability that the metal sheet is between 3 mm and 4 mm thick?
e) Find the mean thickness.
f) Find the variance and standard deviation of the sheet thickness.

𝑋 - thickness of a randomly selected sheet ⇒ 𝑅 = 2,5 ⇒ 𝑋 is a continuous random variable


Continuous Random Variables
a) For 𝑓 𝑥 to be a pdf, it should satisfy i. 𝑓 𝑥 ≥ 0 for all 𝑥 ∈ ℝ

ii. 𝑓 𝑥 𝑑𝑥 = 1

Since 𝑓 𝑥 is defined as
𝑘 5−𝑥 if 2 ≤ 𝑥 ≤ 5
𝑓 𝑥 =
0 otherwise

𝑥 25 4 9𝑘
𝑓 𝑥 𝑑𝑥 = 0𝑑𝑥 + 𝑘 5 − 𝑥 𝑑𝑥 + 0𝑑𝑥 = 𝑘 5𝑥 − = 𝑘 25 − − 10 + = = 1.
2 2 2 2

So,
2
𝑘=
9
Continuous Random Variables
b) If
2
𝑘= ,
9
then
2
𝑓 𝑥 = 9 5−𝑥 if 2 ≤ 𝑥 ≤ 5
0 otherwise

The graph of 𝑓 𝑥 is 𝑓 𝑥

10⁄9
1
8⁄9
7⁄9
6⁄9
5⁄9
4⁄9
3⁄9
2⁄9
1⁄9
𝑥
0 1 2 3 4 5 6
Continuous Random Variables
Recall:
c) Recall that, 𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = 𝑃 𝑋 < 𝑥 = ∫ 𝑓 𝑢 𝑑𝑢 .
𝐹 𝑥

𝐹 𝑥 is obtained by using the density function


2
𝑓 𝑥 = 9 5−𝑥 if 2 ≤ 𝑥 ≤ 5
0 otherwise

Case 1 (𝑥 < 2): 𝑥

𝐹 𝑥 =∫ 𝑓 𝑢 𝑑𝑢 = ∫ 0𝑑𝑢 = 0 𝑓 𝑥

Case 2 (2 ≤ 𝑥 ≤ 5):
𝐹 𝑥 =∫ 𝑓 𝑢 𝑑𝑢 = ∫ 0𝑑𝑢 + ∫ 5 − 𝑢 𝑑𝑢 = − + −

Case 3 (𝑥 > 5):


𝑥
𝐹 𝑥 =∫ 𝑓 𝑢 𝑑𝑢 = ∫ 0𝑑𝑢 + ∫ 5 − 𝑢 𝑑𝑢 + ∫ 0𝑑𝑢 = 1
Continuous Random Variables
Thus,
0 if 𝑥 < 2
𝑥 10𝑥 16
𝐹 𝑥 = − + − if 2 ≤ 𝑥 ≤ 5
9 9 9
1 if 𝑥 > 5

The graph of 𝐹 𝑥 is 𝐹 𝑥

𝑥
0 1 2 3 4 5 6
Continuous Random Variables
d) 𝑃 "thickness is between 3 mm and 4 mm" = 𝑃 3 ≤ 𝑋 ≤ 4 can be found using either 𝑓 𝑥 or 𝐹 𝑥 .

5−𝑥 if 2 ≤ 𝑥 ≤ 5
Using 𝑓 𝑥 =
0 otherwise

2 2 𝑥 2 16 9 1
𝑃 3≤𝑋≤4 = 𝑓 𝑥 𝑑𝑥 = 5 − 𝑥 𝑑𝑥 = 5𝑥 − = 20 − − 15 + =
9 9 2 9 2 2 3

0 if 𝑥 < 2
Using 𝐹 𝑥 = − + − if 2 ≤ 𝑥 ≤ 5
1 if 𝑥 > 5
16 40 16 9 30 16 1
𝑃 3≤𝑋 ≤4 =𝐹 4 −𝐹 3 =− + − − − + − =
9 9 9 9 9 9 3
Continuous Random Variables
2 2 5𝑥 𝑥
e) 𝐸 𝑋 =𝜇 = 𝑥𝑓 𝑥 𝑑𝑥 = 0𝑑𝑥 + 𝑥 5 − 𝑥 𝑑𝑥 + 0𝑑𝑥 = − =3
9 9 2 3

2
f) 𝑉𝑎𝑟 𝑋 = 𝜎 = 𝑥−𝜇 𝑓 𝑥 𝑑𝑥 = 𝑥 − 3 𝑓 𝑥 𝑑𝑥 = 0𝑑𝑥 + 𝑥−3 5 − 𝑥 𝑑𝑥 + 0𝑑𝑥
9
2 𝑥 11𝑥 39𝑥 1
= − + − + 45𝑥 =
9 4 3 2 2

2 2 5𝑥 𝑥 19
or 𝐸 𝑋 = 𝑥 𝑓 𝑥 𝑑𝑥 = 0𝑑𝑥 + 𝑥 5 − 𝑥 𝑑𝑥 + 0𝑑𝑥 = − =
9 9 3 4 2
19 1
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = − 3 =
2 2
1
𝑆𝐷 𝑋 = 𝜎 = 𝜎 = ≅ 0.7071
2
Example: A software development company frequently outsources
projects to freelance developers through a competitive bidding process.
For each project, the company provides an estimated budget, denoted
as 𝑏.
Based on historical data, the company has determined that the density function of the winning
(lowest) bid is given by
2 𝑏
𝑓 𝑥 = 3𝑏 if ≤ 𝑥 ≤ 2𝑏
2
0 otherwise

a) Obtain the probability that the winning bid is less than the estimated budget.
b) Obtain the expected winning bid.
c) Obtain the standard deviation of the winning bid.
Continuous Random Variables
Let 𝑋 denote the winning bid. Then 𝑋 is a continuous random variable with range 𝑅 = , 2𝑏 , where 𝑏 is
the estimated budget, a constant.

a) 𝑃 "winning bid is less than the estimated budget" = 𝑃 𝑋 ≤ 𝑏 = ∫ 𝑓 𝑥 𝑑𝑥 = ∫ 0𝑑𝑥 + ∫ 𝑑𝑥 =

b) 𝐸 𝑋 = 𝜇 = ∫ 𝑥𝑓 𝑥 𝑑𝑥 = ∫ 𝑥 𝑑𝑥 =

c) 𝐸 𝑋 =∫ 𝑥 𝑓 𝑥 𝑑𝑥 = ∫ 𝑥 𝑑𝑥 =

𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = − =

𝑆𝐷 𝑋 = 𝜎 = 𝜎 = =
Example: An engineer studies the failure time (in hours) of a critical electronic
component used in an industrial machine. The failure time, represented by the
random variable 𝑋, has the following probability distribution

𝑓 𝑥 = 0.02𝑒
.
if 𝑥 ≥ 0
0 otherwise

a) What is the probability that the component fails between 50 and 150 hours?
b) What is the probability that the component lasts more than 100 hours?
c) What is the mean failure time?
d) What is the standard deviation of the failure time?
Continuous Random Variables
a) 𝑃 "component fails between 50 and 150 hours" is equivalent to 𝑃 50 ≤ 𝑋 ≤ 150 .

.
1 .
𝑃 50 ≤ 𝑋 ≤ 150 = 𝑓 𝑥 𝑑𝑥 = 0.02𝑒 𝑑𝑥 = 0.02 − 𝑒 =𝑒 −𝑒 ≅ 0.3181
0.02

b) 𝑃 "component lasts more than 100 hours" is equivalent to 𝑃 𝑋 > 100 .

.
𝑃 𝑋 > 100 = 𝑓 𝑥 𝑑𝑥 = 0.02𝑒 𝑑𝑥 = ⋯ = 𝑒 ≅ 0.1353

c) 𝐸 𝑋 = 𝜇 = ∫ 𝑥𝑓 𝑥 𝑑𝑥 = ∫ 0.02𝑥𝑒 .
𝑑𝑥 = ⋯ = 50 hours

d) 𝐸 𝑋 =∫ 𝑥 𝑓 𝑥 𝑑𝑥 = ∫ 0.02𝑥 𝑒 .
𝑑𝑥 = ⋯ = 5000
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = 5000 − 50 = 2500 hours2
𝑆𝐷 𝑋 = 𝜎 = 𝜎 = 2500 = 50 hours
Example: Let 𝑋 be a continuous random variable representing the total power
consumption, in units of 100 kWh, of a household air conditioner over a period
of one year. The density function (pdf) of 𝑋 is given by

𝑥 − 1 if 1 ≤ 𝑥 ≤ 2
𝑓 𝑥 = 3 − 𝑥 if 2 < 𝑥 ≤ 3
0 otherwise

a) Find the probability that the power consumption is between 150 and 250 kWh. 0.75
b) Find the mean of 𝑋. 2 0 if 𝑥 < 1
c) Find the standard deviation of 𝑋. 0.4082 𝑥 1
−𝑥+ if 1 ≤ 𝑥 ≤ 2
d) Obtain the cumulative distribution function of 𝑋. 𝐹 𝑥 = 𝑥2 2
7
− + 3𝑥 − if 2 < 𝑥 ≤ 3
2 2
1 if 𝑥 > 3
[email protected]

CREDITS: This presentation template was created by Slidesgo, and


includes icons by Flaticon, and infographics & images by Freepik

CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik

You might also like