Module 2 Random Variables
Module 2 Random Variables
Side
Length
16”
19”
26”
34”
20”
26”
18”
24”
for Engineering
Course Instructor:
Variables Measurements
differ for each
of my fren!
JUSTIN JESSE L. SERANILLA
Assistant Professor Random Variable and Probability Distributions VARIABLES
Institute of Civil Engineering
University of the Philippines Diliman | Cumulative Distribution Functions | Mean
Course Material by: and Variance of a Random Variable
REYGIE Q. MACASIEB
1 2
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Random Variables and Probability Distributions
Length
value to each outcome in a sample space. 0.0099
0.00985
Probability
Side
Length
19.00” 19.05” 19.10”
0.0098
3 4
2021
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Random Variables and Probability Distributions
Suppose that three machines are Let X be the number of machines which
available to cut concrete blocks. Each is(are) functioning to an outcome. We are not interested in the possible outcomes and sample space. We
machine needs to be brought down just focus on the random variable and the corresponding probabilities.
from time to time for maintenance. At Machine
any given moment, the probability that Probability
a machine is down is 0.10, and the 1 2 3 X
probability that it is functioning is 0.90. Up Up Up 3 (0.9)(0.9)(0.9) = 0.729
X Probability
Assume the machines function Up Up Down 2 (0.9)(0.9)(0.1) = 0.081 0 (0.1)(0.1)(0.1) = 0.001
independently.
Up Down Up 2 (0.9)(0.1)(0.9) = 0.081 1 (0.9)(0.1)(0.1)+(0.1)(0.9)(0.1)+(0.9)(0.9)(0.1) = 0.027
Up Down Down 1 (0.9)(0.1)(0.1) = 0.009 2 (0.9)(0.9)(0.1)+(0.9)(0.1)(0.9)+(0.1)(0.9)(0.9) = 0.243
Down Up Up 2 (0.1)(0.9)(0.9) = 0.081 3 (0.9)(0.9)(0.9) = 0.729
Down Up Down 1 (0.1)(0.9)(0.1) = 0.009
Down Down Up 1 (0.1)(0.1)(0.9) = 0.009
Down Down Down 0 (0.1)(0.1)(0.1) = 0.001
5 6
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Random Variables and Probability Distributions
associated to its outcomes are discrete random variables. 0.00985 - number of heads in toss of coin repeated n times
Probability
0.0098
Hypergeometric Random Variable
0.00975
Probability Mass Function 0.0097 -number of “success” items sampled from a small finite population
The description of the possible values of X and the
0.00965
Negative Binomial Random Variable
0.0096
probabilities of each is the probability mass function. 0.00955 -number of trials needed to get k “successes” in repeated independent trials
Poisson Random Variable
The probability mass function (PMF) of a discrete random
variable X is the function p(x) = P(X = x) such that - number of outcomes occurring within a period of time, length or area (space)
(1) 𝑓 𝑥 ≥ 0 (2) ∑ 𝑓 𝑥 = 1 (3) 𝑓 𝑥 = 𝑃(𝑋 = 𝑥 ) Image modified from Harvard University (through edX)
7 8
2021
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Random Variables and Probability Distributions
Probability Distribution
0.01
Answer
Let p denote a wafer in which a 0.00995
0.0099
Probability
large particle is present & let a f(1)=P(X = 1) = 0.01 0.01 0.00985
0.0098
𝑃(𝑋 = 0) = 0.48
denote a wafer in which it is absent. f(2)=P(X = 2) = (0.99)*0.01 0.0099
0.00975
0.0097
The sample space is: 0.00965 𝑃(𝑋 = 1) = 0.39
f(3)=P(X = 3) = (0.99)2*0.01 0.0098 0.0096
𝑆 = {𝑝, 𝑎𝑝, 𝑎𝑎𝑝, 𝑎𝑎𝑎𝑝, … } f(4)=P(X = 4) = (0.99)3*0.01 0.0097
0.00955 𝑃(𝑋 = 2) = 0.12
1 2 3 4
The range of the values of 𝑋 is: Number of Wafers
𝑃(𝑋 = 3) = 0.01
𝑥 = 1, 2, 3, 4, …
UNIVERSITY OF THE PHILIPPINES DILIMAN UNIVERSITY OF THE PHILIPPINES DILIMAN
INSTITUTE OF CIVIL ENGINEERING CE 29: Probability and Statistics for Engineering 9 INSTITUTE OF CIVIL ENGINEERING CE 29: Probability and Statistics for Engineering 10
9 10
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Random Variables and Probability Distributions
Probability Density Function Image modified from Harvard University (through edX)
• Exponential Random Variable
For a continuous random variable X, a probability Let X be a continuous random variable with
density function (PDF) is a function such that probability density function 𝑓(𝑥). Let a and • Lognormal Random Variable
1. 𝑓 𝑥 ≥ 0 b be any two numbers, with 𝑎 < 𝑏. Then
b
2. ∫ 𝑓 𝑥 𝑑𝑥 = 1 P (a X b) P( a X b) P (a X b) f ( x) dx. • Gamma Random Variable
a
a
P ( X a ) P ( X a) f ( x )dx
3. 𝑃 𝑎 ≤ 𝑋 ≤ 𝑏 = ∫ 𝑓 𝑥 𝑑𝑥 = area under 𝑓 𝑥
from a to b
P( X a) P( X a) f ( x)dx.
a
• …and many more
4. 𝑓 𝑥 = 0 means there is no area exactly at x P (X a ) 0
11 12
2021
RANDOM VARIABLES Random Variables and Probability Distributions RANDOM VARIABLES Cumulative Distribution Functions
Example 2.3
Random Variables
Let the continuous random variable X denote the current measured in a thin A random variable assigns a numerical value to each outcome in a sample space.
copper wire in milliamperes(mA). Assume that the range of X is 4.9 ≤ x ≤ 5.1 and 0.01005
f(x) = 5. What is the probability that a current is less than 5mA? Between 4.95 0.01
Probability
0.00985
f(x)
2 2
0 0
4.85 4.9 4.95 5 5.05 5.1 5.15 4.85 4.9 4.95 5 5.05 5.1 5.15
x x
Image modified from Harvard University (through edX) Image modified from Harvard University (through edX)
13 14
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Cumulative Distribution Functions RANDOM VARIABLES Cumulative Distribution Functions
Suppose that three machines are Let X be the number of machines which Suppose that three machines are Let X be the number of machines which
available to cut concrete blocks. Each is(are) functioning to an outcome. available to cut concrete blocks. Each is(are) functioning to an outcome.
machine needs to be brought down machine needs to be brought down
from time to time for maintenance. At X Probability from time to time for maintenance. At X Probability
any given moment, the probability that any given moment, the probability that
a machine is down is 0.10, and the 0 0.001 a machine is down is 0.10, and the 0 0.001
probability that it is functioning is 0.90. 1 0.027 probability that it is functioning is 0.90. 1 0.027
Assume the machines function Assume the machines function
independently. 2 0.243 independently. 2 0.243
3 0.729 3 0.729
Values of X are mutually exclusive What is the probability that 1 or 2
For any two events E1 and E2 with E ∩ E2 = Ø,
machines are functioning?
P(E1 ∪ E2) = P(E1) + P(E2)
𝑃 𝑋 = 1 𝑜𝑟 𝑋 = 2 = 𝑃 𝑋 = 1 + 𝑃(𝑋 = 2)
For any 𝑋 = 𝑥1 and 𝑋 = 𝑥2, 𝑃 𝑋 = 1 𝑜𝑟 𝑋 = 2 = 0.027 + 0.243
P(X = x1 ∪ X = x2) = P(X = x1) + P(X = x2) 𝑃 𝑋 = 1 𝑜𝑟 𝑋 = 2 = 0.27
15 16
2021
RANDOM VARIABLES Cumulative Distribution Functions RANDOM VARIABLES Cumulative Distribution Functions
Suppose that three machines are Let X be the number of machines which Suppose that three machines are Let X be the number of machines which
available to cut concrete blocks. Each is(are) functioning to an outcome. available to cut concrete blocks. Each is(are) functioning to an outcome.
machine needs to be brought down machine needs to be brought down
from time to time for maintenance. At from time to time for maintenance. At Cumulative
X Probability X Probability Probability
any given moment, the probability that any given moment, the probability that
a machine is down is 0.10, and the 0 0.001 a machine is down is 0.10, and the 0 0.001 0.001
probability that it is functioning is 0.90. 1 0.027 probability that it is functioning is 0.90. 1 0.027 0.028
Assume the machines function Assume the machines function
independently. 2 0.243 independently. 2 0.243 0.271
3 0.729 3 0.729 1.000
What is the probability that at least 2
What is the probability that X is less
are functioning?
than or equal to x?
𝑃 𝑋 ≥ 2 = 𝑃 𝑋 = 2 + 𝑃(𝑋 = 3)
𝑃 𝑋 ≥ 2 = 0.243 + 0.729
𝑃 𝑋 ≥ 2 = 0.972
17 18
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Cumulative Distribution Functions RANDOM VARIABLES Cumulative Distribution Functions
A function called the cumulative distribution function (cdf) specifies the probability A function called the cumulative distribution function (cdf) specifies the probability
that a random variable is less than or equal to a given value. that a random variable is less than or equal to a given value.
Continuous
probability
Discrete
𝐹 𝑥 =𝑃 𝑋≤𝑥 =∫ 𝑓 𝑢 𝑑𝑢 for −∞ < 𝑥 < ∞
The cumulative distribution function (CDF) is
1. 𝐹 𝑥 = 𝑃 𝑋 ≤ 𝑥 = ∑ 𝑓(𝑥 )
Probability density f(x)
Probability F(x)
function (PDF).
2. 0 ≤ 𝐹 𝑥 ≤ 1
The probability density function (PDF) is the
3. If 𝑥 ≤ 𝑦, then 𝐹 𝑥 ≤ 𝐹(𝑦)
probability
19 20
2021
RANDOM VARIABLES Cumulative Distribution Functions RANDOM VARIABLES Cumulative Distribution Functions
Answer Answer
The probability mass function is calculated as follows: 1.2
𝑃 𝑋=0 = = 0.886 1
0.8
𝑃 𝑋=1 = 2 = 0.111 0 x0
F(x)
0.6
𝑃 𝑋=2 = = 0.003 0.886 0 x 1
0.4
F ( x) 0.2
Therefore, 0.997 1 x 2 0
21 22
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Cumulative Distribution Functions RANDOM VARIABLES Mean and Variance of Random Variables
for x 0
0.01005
0
F x 0.01
1 e 0.01x for 0 x 0.00995
Probability
0.00985
Answer 0.00975
0.0097
0.00965
0.0096
0.00955
Image modified from Harvard University (through edX) Image modified from Harvard University (through edX)
23 24
2021
RANDOM VARIABLES Mean and Variance of Random Variables RANDOM VARIABLES Mean and Variance of Random Variables
𝜇=𝐸 𝑋 = 𝑥𝑓 𝑥 𝑑𝑥
𝜇 = 𝑥𝑝(𝑥) 𝜎 = 𝑥 𝑝𝑥 −𝜇 𝜎 =𝑉 𝑋 = 𝑥 𝑓 𝑥 𝑑𝑥 − 𝜇
𝐸ℎ 𝑥 = ℎ 𝑥 𝑓 𝑥 𝑑𝑥
The standard deviation is the positive square root of the variance
UNIVERSITY OF THE PHILIPPINES DILIMAN UNIVERSITY OF THE PHILIPPINES DILIMAN
INSTITUTE OF CIVIL ENGINEERING CE 29: Probability and Statistics for Engineering RQM INSTITUTE OF CIVIL ENGINEERING CE 29: Probability and Statistics for Engineering RQM
25 26
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.
RANDOM VARIABLES Mean and Variance of Random Variables RANDOM VARIABLES Mean and Variance of Random Variables
27 28
2021
Answer
29 30
This material has been reproduced and communicated to you by or on behalf of University of the Philippines pursuant to PART IV: The Law on Copyright of Republic Act (RA) 8293 or the “Intellectual
Property Code of the Philippines”.
The University does not authorize you to reproduce or communicate this material. The Material may contain works that are subject to copyright protection under RA 8293. Any reproduction and/or
communication of the material by you may be subject to copyright infringement and the copyright owners have the right to take legal action against such infringement.