Random Variable and Probability Distribution Functions
Random Variable and Probability Distribution Functions
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
C: Compact ratio of a soil specimen (0%: air only, 100%: no air), {c| }
1
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]
(a) Definition
PX ( x) = P( )
(b) Example
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]
# 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) =
(a) Definition:
FX ( x) = P( )
(b) Example
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
(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.
(c) Let X denote the number of operational buildings. Find and plot the probability mass
function (PMF) 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]
N→∞
Bin size → 0
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]
(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
• FX (−) = P( )=
• FX () = P( )=
FX (x)