Lecture 4
Lecture 4
A factory inspects 5 products and counts the number of defective items. If the random variable 𝑋
represents the number of defective items in the batch, possible values of 𝑋 are 0, 1, 2, 3, 4, and 5.
𝑅 = 0,1,2,3,4,5
Random Variables
Variable Random Variable
A symbol that represents a value, which can be A function that assigns numerical values to the
fixed or change within a given set outcomes of a random experiment
Deterministic Random
(The value is either fixed or chosen without (The value depends on the outcome of a
uncertainty) probabilistic event)
Random Variables
Discrete Continuous
a) A wireless communication system transmits four data packets from a remote sensor to a base
station. Due to signal interference, some packets may fail to be received. Let 𝑋 be the number of
successfully received packets out of the four sent.
b) An automated fuel dispenser at a gas station fills 10-liter fuel tanks for vehicles. However, due
to sensor precision limitations and environmental factors, the actual amount of fuel dispensed
into a tank may slightly vary. Let 𝑌 be the amount of fuel (in liters) in a randomly chosen tank after
dispensing.
Random Variables
Discrete Continuous
A discrete random variable takes on a finitely many or countably infinite number of distinct values.
Assume that the capacitors are connected parallely. Then, the total capacitance is
𝐶 = 𝐶 +𝐶 ,
where 𝐶 is the selected 100 μF capacitor and 𝐶 is the selected 200 μF capacitor.
b) Let 𝑋 be the total capacitance of the selected capacitor pair. Since 𝑋 takes different values
based on the selection, it is a random variable. Obtain the range of 𝑋.
c) Determine the probability of occurrence for each possible value of 𝑋.
Discrete Random Variables
a) 𝑆 = 98,198 , 98,200 , 98,202 , 100,198 , 100,200 , 100,202 , 102,198 , 102,200 , 102,202
b)
𝑪𝟏 𝑪𝟐 𝑪𝒕𝒐𝒕𝒂𝒍
98 198 296 1
c) 𝑃 𝑋 = 296 =
98 200 298 9
98 202 300 2
𝑃 𝑋 = 298 =
100 198 298 9
100 200 300 3
𝑃 𝑋 = 300 =
100 202 302 9
102 198 300 2
𝑃 𝑋 = 302 =
102 200 302 9
102 202 304 1
𝑃 𝑋 = 304 =
9
𝑋 - total capacitance of the selected capacitor pair
𝑅 = 296,298,300,302,304
Discrete Random Variables
The probability distribution 𝑓 𝑥 of a discrete random variable 𝑋 (probability mass function (pmf))
represents the probability that 𝑋 takes the value 𝑥 .
𝑓 𝑥 = 𝑃 𝑋 = 𝑥 for all 𝑥 ∈ ℝ
i. 𝑓 𝑥 ≥ 0 for all 𝑥 ∈ ℝ
ii. 𝑓 𝑥 =1
Discrete Random Variables
The cumulative distribution function (cdf), 𝐹 𝑥 , of a discrete random variable 𝑋 represents the
probability that 𝑋 does not exceed the value 𝑥 .
𝐸 𝑋 =𝜇 = 𝑥𝑓 𝑥
If 𝑋 is a discrete random variable, then the expected value of a function of 𝑋, say 𝑔 𝑋 , can be
obtained by
𝐸 𝑔 𝑋 =𝜇 = 𝑔 𝑥 𝑓 𝑥
Variance and Standard Deviation of a
Discrete Random Variable
The variance, 𝑉𝑎𝑟 𝑋 or 𝜎 , of a discrete random variable 𝑋 is defined as
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝜇 = 𝑥−𝜇 𝑓 𝑥
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = 𝑥 𝑓 𝑥 − 𝑥𝑓 𝑥
𝐸 𝑎𝑋 + 𝑏𝑌 + 𝑐 = 𝜇 = 𝑎𝜇 + 𝑏𝜇 + 𝑐
𝑉𝑎𝑟 𝑎𝑋 + 𝑏𝑌 + 𝑐 = 𝜎 =𝑎 𝜎 +𝑏 𝜎
Example: In a month, a power grid experiences outages based on the
following probability distribution:
Number of outages per month (𝑿) 𝟎 𝟏 𝟐 𝟑
𝑷 𝑿=𝒙 0.50 0.30 0.15 0.05
b) The graph of 𝑓 𝑥 is 𝑓 𝑥
0.50 if 𝑥 = 0 0.5
0.30 if 𝑥 = 1 0.4
𝑓 𝑥 = 0.15 if 𝑥 = 2 0.3
0.05 if 𝑥 = 3 0.2
0 otherwise 0.1
𝑥
0 1 2 3
Discrete Random Variables
𝒙 𝒇 𝒙 𝑭 𝒙 c) 𝑃 "experiencing at most one outage in a given month" = 𝑃 𝑋 ≤ 1
0 0.50 0.50 =𝑓 0 +𝑓 1
1 0.30 0.80 = 0.50 + 0.30
= 0.80
2 0.15 0.95
or
3 0.05 1.00 𝑃 "experiencing at most one outage in a given month" = 𝑃 𝑋 ≤ 1
Total 1.00 =𝐹 1
= 0.80
d) The graph of 𝐹 𝑥 is 𝐹 𝑥
0 if 𝑥 < 0 1.0
0.50 if 0 ≤ 𝑥 < 1 0.8
𝐹 𝑥 = 0.80 if 1 ≤ 𝑥 < 2 0.6
0.95 if 2 ≤ 𝑥 < 3 0.4
1 if 𝑥 ≥ 3 0.2
𝑥
0 1 2 3
Discrete Random Variables
e) 𝐸 𝑋 = 𝜇 = ∑ 𝑥𝑓 𝑥 = 0𝑓 0 + 1𝑓 1 + 2𝑓 2 + 3𝑓 3 = 0 0.50 + 1 0.30 + 2 0.15 + 3 0.05 = 0.75
f) 𝑉𝑎𝑟 𝑋 = 𝜎 = ∑ 𝑥−𝜇 𝑓 𝑥
= 0 − 0.75 𝑓 0 + 1 − 0.75 𝑓 1 + 2 − 0.75 𝑓 2 + 3 − 0.75 𝑓 3
= 0.5625 0.50 + 0.0625 0.30 + 1.5625 0.15 + 5.0625 0.05 = 0.7875
𝑆𝐷 𝑋 = 𝜎 = 𝜎 = 0.7875 ≅ 0.8874
or
𝒙 𝒇 𝒙 𝒙𝒇 𝒙 𝒙𝟐 𝒇 𝒙 e) 𝐸 𝑋 = 𝜇 = ∑ 𝑥𝑓 𝑥 = 0.75
0 0.50 0 0
f) 𝐸 𝑋 =𝜇 =∑ 𝑥 𝑓 𝑥 = 1.35
1 0.30 0.30 0.30
2 0.15 0.30 0.60
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = 1.35 − 0.75 = 0.7875
3 0.05 0.15 0.45
Total 1.00 0.75 1.35 𝑆𝐷 𝑋 = 𝜎 = 𝜎 = 0.7875 ≅ 0.8874
Discrete Random Variables
g) Let the random variable 𝑌 denote the cost of an outage. Then 𝑌 = 500𝑋 .
Obviously, Y takes the values 0, 500, 1000, 1500 with probabilities 0.50, 0.30, 0.15, and 0.05, respectively.
𝐸 𝑌 = 𝜇 = 0𝑓 0 + 500𝑓 1 + 1000𝑓 2 + 1500𝑓 3 = 0 0.50 + 500 0.30 + 1000 0.15 + 1500 0.05
= $ 375
or
𝒙 𝒇 𝒙 𝒙𝒇 𝒙 𝒙𝟐 𝒇 𝒙 b) 𝐸 𝑋 = 𝜇 = ∑ 𝑥𝑓 𝑥 = 2.4
0 0.008 0 0
c) 𝐸 𝑋 =𝜇 =∑ 𝑥 𝑓 𝑥 = 6.24
1 0.096 0.096 0.096
2 0.384 0.768 1.536
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = 6.24 − 2.4 = 0.48
3 0.512 1.536 4.608
Total 1.000 2.400 6.240 𝑆𝐷 𝑋 = 𝜎 = 𝜎 = 0.48 ≅ 0.6928
d) On average, the resistor is expected to pass 2.4 out of 3 tests. The variability in the number of
successful tests around the mean is approximately 0.6928.
Example: A shipment of 20 similar electronic microcontrollers is sent to a
manufacturing facility. Among these, 3 are defective. An engineer randomly
selects 2 microcontrollers from the shipment for quality inspection. Let 𝑋
represent the number of defective microcontrollers in the sample.
a) Obtain the probability distribution of 𝑋.
b) Find the expected number of defective microcontrollers sampled. 0.3
c) Find the standard deviation of the number of defectives microcontrollers sampled. 0. 4915
Discrete Random Variables
a) 𝑋 - number of defective microcontrollers in the sample times ⇒ 𝑅 = 0,1,2
136 𝒙 𝒇 𝒙
𝑓 0 =𝑃 𝑋=0 = =
190 0 136⁄190
51 1 51⁄190
𝑓 1 =𝑃 𝑋=1 = = 𝑓 𝑥 = , 𝑥 = 0,1,2
190 2 3⁄190
3 Total 1
𝑓 2 =𝑃 𝑋=2 = =
190
[email protected]
CREDITS: This presentation template was created by Slidesgo, and includes icons by Flaticon, and infographics & images by Freepik