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

Lecture 4

The document provides an overview of discrete random variables, including their definitions, properties, and probability distributions. It explains concepts such as mean, variance, and standard deviation, along with examples illustrating discrete random variables in real-world scenarios. Additionally, it covers the probability mass function (pmf) and cumulative distribution function (cdf) for discrete random variables.

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)
2 views

Lecture 4

The document provides an overview of discrete random variables, including their definitions, properties, and probability distributions. It explains concepts such as mean, variance, and standard deviation, along with examples illustrating discrete random variables in real-world scenarios. Additionally, it covers the probability mass function (pmf) and cumulative distribution function (cdf) for discrete random variables.

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/ 27

Discrete Random Variables

● Discrete Random Variables and Their


Probability Distributions

● Mean, Variance, and Standard Deviation of


Discrete 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 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)

𝑥 = 5 (fixed value) or 𝑋 ="Number of defective products in a batch"


𝑦 = 2𝑡 + 3 (dependent on 𝑡) which varies based on chance

Is a function mapping sample space outcomes


Can be any number, equation, or function
to numerical values
Random Variables

Random Variables

Discrete Continuous

takes on a countable number of takes on infinitely many values


distinct values within an interval
Example: Determine whether the random variables defined below are discrete or
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.

c) A backup generator in a power plant is designed to start automatically in case of a power


outage. However, due to mechanical variations, it does not always start on the first attempt. The
system will keep attempting to start the generator until the first successful startup. Let 𝑍 be the
number of attempts needed before the generator starts successfully.
Discrete Random Variables

Random Variables

Discrete Continuous

A discrete random variable takes on a finitely many or countably infinite number of distinct values.

It arises in counting scenarios.


Example: An electronics engineer is designing a filter circuit that requires two
capacitors. The circuit needs one capacitor labeled 100 microfarad (μF) and
one capacitor labeled 200 microfarad (μF). However, due to manufacturing
tolerances, the actual capacitance values may slightly differ from the labeled
values.
The three available 100 μF capacitors have actual capacitance values 98, 100, and 102 μF, and
the three available 200 μF capacitors have actual capacitance values 198, 200, and 202 μF.
Since the engineer selects one capacitor from each type at random, the selection process forms
a random experiment, with nine equally likely outcomes.
a) List the elements of the sample space.

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 𝑥 ∈ ℝ

Properties of the pmf:

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 𝑥 .

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

Properties of the cdf:


i. 𝐹 is a nondecreasing function

ii. 𝐹 is a right-continuous function

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


→ →
Mean of a Discrete Random Variable

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

𝐸 𝑋 =𝜇 = 𝑥𝑓 𝑥

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

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

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: 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

a) What is the probability of experiencing three outages in a given month?


b) Sketch the graph of the probability distribution of the number of outages per month.
c) What is the probability of experiencing at most one outage in a given month?
d) Sketch the graph of the cumulative distribution function of the number of outages per month.
e) Compute the expected number of outages per month.
f) Compute the variance and standard deviation of the outages per month.
g) If the cost of an outage is $500 per occurrence, what is the mean and variance of the monthly
outage cost?

𝑋 - number of outages per month ⇒ 𝑅 = 0,1,2,3 ⇒ 𝑋 is a discrete random variable


Discrete Random Variables
𝒙 𝒇 𝒙
0 0.50
1 0.30 a) 𝑃 "experiencing three outages in a given month" = 𝑃 𝑋 = 3
2 0.15 =𝑓 3
3 0.05 = 0.05
Total 1.00

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

𝑉𝑎𝑟 𝑌 = 𝜎 = 0 − 375 𝑓 0 + 500 − 375 𝑓 1 + 1000 − 375 𝑓 2 + 1500 − 375 𝑓 3


= 140625 0.50 + 15625 0.30 + 390625 0.15 + 1265625 0.05
= $ 196875

or

𝑌 = 500𝑋 ⇒ 𝜇 = 500𝜇 = 500 0.75 = $ 375

𝜎 = 500 𝜎 = 250000 0.7875 = $ 196875


Example: In a robotic control system, a central controller sends a control signal to a
robotic arm to execute a specific movement. The robotic arm is expected to send
back a confirmation signal once the movement is successfully executed. If the central
controller does not receive the confirmation signal within a predefined time window,
it assumes the control signal was not received or executed and retransmits the signal.
Let 𝑋 represent the number of times the control signal is sent before the robotic arm
successfully executes the movement and sends back the confirmation signal.
Assume that the probability mass function of 𝑋 is given by
𝑐𝑥 if 𝑥 = 1,2,3,4,5
𝑓 𝑥 =
0 otherwise
where 𝑐 is a constant.
a) Find the value of the constant 𝑐 .
b) Obtain 𝑃 𝑋 = 2 .
c) Find the mean of 𝑋.
d) Find the standard deviation of 𝑋.
Discrete Random Variables
𝒙 𝒇 𝒙
1 𝑐 a) For 𝑓 𝑥 to be a pmf it should satisfy i. 𝑓 𝑥 ≥ 0 for all 𝑥 ∈ ℝ
2 2𝑐
3 3𝑐 ii. 𝑓 𝑥 =1
4 4𝑐
So, 15𝑐 = 1 and 𝑐 =
5 5𝑐
Total 15𝑐
b) 𝑃 𝑋 = 2 = 𝑓 2 =
𝒙 𝒇 𝒙 𝒙𝒇 𝒙 𝒙𝟐 𝒇 𝒙
1 1⁄15 1⁄15 1⁄15 c) 𝐸 𝑋 = 𝜇 = ∑ 𝑥𝑓 𝑥 =
2 2⁄15 4⁄15 8⁄15
3 3⁄15 9⁄15 27⁄15 d) 𝐸 𝑋 =𝜇 =∑ 𝑥 𝑓 𝑥 =
4 4⁄15 16⁄15 64⁄15
𝑉𝑎𝑟 𝑋 = 𝜎 = 𝐸 𝑋 − 𝐸 𝑋 = − =
5 5⁄15 25⁄15 125⁄15
Total 1 55⁄15 225⁄15 𝑆𝐷 𝑋 = 𝜎 = 𝜎 = ≅ 1.2472
Example: Consider an experiment where an engineer tests a circuit component
(e.g., a resistor) three times to check if it meets the required specifications. The
component can either pass (success) or fail (failure) each test. Assume that the
component has a 80% success rate and let 𝑋 represent the number of times the
component passes the test.
a) Obtain the probability distribution of 𝑋.
b) Calculate the mean of 𝑋.
c) Calculate the standard deviation of 𝑋.
d) Interpret your findings in parts b and c.
Discrete Random Variables
a) For each test, let 𝑆 denote the component passes the test and 𝐹 denote the component fails.
𝑋 - number of times the component passes the test in three tests ⇒ 𝑅 = 0,1,2,3

𝑓 0 = 𝑃 𝑋 = 0 = 𝑃 "component passes none of the three tests"


= 𝑃 𝐹𝐹𝐹 = 0.2 0.2 0.2 = 0.2 = 0.008 𝒙 𝒇 𝒙
0 0.008
𝑓 1 = 𝑃 𝑋 = 1 = 𝑃 "component passes one of the three tests" 1 0.096
= 𝑃 𝑆𝐹𝐹 ∪ 𝐹𝑆𝐹 ∪ 𝐹𝐹𝑆 = 𝑃 𝑆𝐹𝐹 + 𝑃 𝐹𝑆𝐹 + 𝑃 𝐹𝐹𝑆
2 0.384
= 0.8 0.2 0.2 + 0.2 0.8 0.2 + 0.2 0.2 0.8 = 3 0.8 0.2 = 0.096
3 0.512
𝑓 2 = 𝑃 𝑋 = 2 = 𝑃 "component passes two of the three tests" Total 1.000
= 𝑃 𝑆𝑆𝐹 ∪ 𝑆𝐹𝑆 ∪ 𝐹𝑆𝑆 = 𝑃 𝑆𝑆𝐹 + 𝑃 𝑆𝐹𝑆 + 𝑃 𝐹𝑆𝑆
= 0.8 0.8 0.2 + 0.8 0.2 0.8 + 0.2 0.8 0.8 = 3 0.8 0.2 = 0.384
3
𝑓 3 = 𝑃 𝑋 = 3 = 𝑃 "component passes all of the three tests" 𝑓 𝑥 = 0.8 0.2 , 𝑥 = 0,1,2,3
𝑥
= 𝑃 𝑆𝑆𝑆 = 0.8 0.8 0.8 = 0.8 = 0.512
Discrete Random Variables

𝒙 𝒇 𝒙 𝒙𝒇 𝒙 𝒙𝟐 𝒇 𝒙 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

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

You might also like