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

Random Variable and Probability Distribution Functions

The document provides an overview of random variables and probability distribution functions, including definitions and examples of discrete and continuous random variables. It explains the Probability Mass Function (PMF) and Cumulative Distribution Function (CDF) for discrete variables, along with their properties and how to create plots using R. Additionally, it covers the Probability Density Function (PDF) and CDF for continuous random variables, detailing their definitions and characteristics.

Uploaded by

hanyeelovesgod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views

Random Variable and Probability Distribution Functions

The document provides an overview of random variables and probability distribution functions, including definitions and examples of discrete and continuous random variables. It explains the Probability Mass Function (PMF) and Cumulative Distribution Function (CDF) for discrete variables, along with their properties and how to create plots using R. Additionally, it covers the Probability Density Function (PDF) and CDF for continuous random variables, detailing their definitions and characteristics.

Uploaded by

hanyeelovesgod
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Seoul National University Instructor: Junho Song

Dept. of Civil and Environmental Engineering [email protected]

457.212 Statistics for Civil & Environmental Engineers


In-Class Material: Class 09
Random Variable and Probability Distribution Functions (A&T: 3.1)

1. Random variable

(a) Definition: a variable quantity that takes on any value in a specified set according to
the assigned probabilities.

Probability

P(X=1) = 0.2
P(X=2) = 0.3
3 2
P(X=3) = 0.5
1 1
X= 3 3 2
x
Random variable Possible outcomes

(b) Discrete random variables

T: Number of tornadoes per year, { }

B: Number of substandard beams out of 10, { }

(c) Continuous random variables

C: Compact ratio of a soil specimen (0%: air only, 100%: no air), {c| }

2. Probability distribution functions

Discrete R.V. Continuous R.V

Probability or Density Probability Mass Function Probability Density Function


at X=x (PMF), PX(x) (PDF), fX(x)

Cumulative Frequency Cumulative Distribution Function


up to X=x (CDF), FX(x)

1
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

3. Probability Mass Function (PMF) of a discrete random variable X , PX (x)

(a) Definition

PX ( x) = P( )

(b) Example

X : Number of landfalls of hurricanes per year

x P(X=x)=
0 0.10
1 0.40
2 0.30
3 0.15
4 0.05

PX (2) =
PMF
PX (4) =
0.35
0.25
P(x)

0.15
0.05

0 1 2 3 4

2
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

# Creating PMF plot by R


x = 0:4
Px = c(0.1,0.4,0.3,0.15,0.05)
plot(x,Px,type="h",xlab="x",ylab="P(x)",main="PMF")

# Use plot() with "h" type rather than barplot() to have a correct scale
on x-axis
x = c(0,1.5,2,3,4)
plot(x,Px,type="h",xlab="x",ylab="P(x)",main="PMF")

(c) Properties

•  PX ( x) 

• P
all x
X ( x) = , e.g. PX (0) + ... + PX (4) =

• P ( a  X  b) = P X ( x) , e.g. P(0  X  2) =

4. Cumulative Distribution Function (CDF) of a discrete random variable X , FX (x)

(a) Definition:

FX ( x) = P( )

(b) Example

X : Number of landfalls of hurricanes per year

x PX(x) FX(x)=P(X≤x)
0 0.10
1 0.40
2 0.30
3 0.15
4 0.05

3
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

CDF

1.0
0.8
0.6
F(x)

0.4
0.2

0 1 2 3 4

# Creating CDF plot


Fx = cumsum(Px) # Creating CDF by cumulative sum of PMF
plot(x,Fx,type="s",xlab="x",ylab="F(x)",main="CDF")
lines(x,Fx,type="p",pch=16)

(c) Properties

• FX ( a ) = P X ( x)

• FX (−) =

because P(X − ) =

• FX () =

because P( X ) =

• 𝑃(𝑎 < 𝑋 ≤ 𝑏) = −

e.g. P(0  X  2) =

4
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

Example 1: A company owns two buildings, A and B. The probabilities that the buildings A
and B will be non-operational after an earthquake are 0.2 and 0.1, respectively. The
buildings are located closely to each other. As a result, the probability that the building B is
non-operational is twice the original probability if the building A is non-operational.

(a) What is the probability that there is no building in operation?

(b) What is the probability that both buildings are in operation?

(c) Let X denote the number of operational buildings. Find and plot the probability mass
function (PMF) of X .

(d) Find and plot the cumulative distribution function (CDF) of X .

x PX(x) FX(x)=P(X≤x)

5
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

5. Probability Density Function (PDF) of a continuous random variable X , f X (x)

(a) Definition: “Density” of probability distribution at X = x.

N→∞
Bin size → 0

Normalized Polygon Probability Density Function

P( x  X  x + x) = f X ( x)  x

f X ( x) = lim

(b) Properties

• f X (x) 0


• f
−
X ( x)dx = ; “Marginalization rule”

• P ( a  X  b) = 

6
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]

6. Cumulative Distribution Function (CDF) of a continuous random variable X , FX (x)

(a) Definition

FX ( x ) = P ( )

=  f X ( x)dx

f X (x) FX (x)

x x

(b) Properties

dFX ( x)
• = . In summary, [PDF] [CDF]
dx

• Non-decreasing (because we are integrating a non-negative function)

• FX (−) = P( )=

• FX () = P( )=

FX (x)

You might also like