Probability Distribution Functions and Partial Descriptors
Probability Distribution Functions and Partial Descriptors
Example 1: Suppose the likelihood of accidents is uniform along the 100 km highway. Let
X denote the distance between the starting point and an accident location. Determine
0 100
f X (x)
FX (x)
1
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]
Example 2: Suppose an object can fall anywhere within a 10-km radius circle at random
(i.e., uniform likelihood over points inside the circle). Determine PDF and CDF of the
distance between the location and the center of the circle, 𝑅.
2
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]
# draw CDF
distance = sqrt(ex02_sample[,1]^2+ex02_sample[,2]^2)
ex02_sample = cbind(ex02_sample, distance)
plot(ecdf(ex02_sample[,3]), verticals=TRUE, pch="", main="CDF")
Note:
• Expectation: E[] = () f X ( x)dx (continuous) or () p X ( x) (discrete)
− all x
x
𝑛] ∞
∫−∞ 𝑥 𝑛 𝑓𝑋 (𝑥)𝑑𝑥
n
• Moment: 𝐸[𝑋 = or p X ( x)
all x
• Central Moment, E[( X − X ) ] = ( x − X ) n f X ( x)dx or
n
( x − X ) n p X ( x)
− all x
Mode, ~
x arg max f X ( x )
x
3
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]
Radius of ( )
Standard
Deviation, X 2X
__________ed radius of ( )
Coefficient of X
Variation
(C.O.V.), X | X |
moment normalized
Coefficient of by 3X , >0
Skewness, X =0
E[( X − X ) 3 ] <0
3X
Fourth-order “Peakedness” - more of the variance is due
central moment to infrequent extreme deviations, as
Flatness
Example 3: Compute the mean, median, mode, variance, standard deviation and
coefficient of variation for a discrete random variable X whose PMF is given as
x PX (x)
0 0.20
1 0.50
2 0.30
4
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]
Example 4: Compute the mean, median, mode, variance, standard deviation and coefficient
of variation for a continuous random variable X whose PDF is given by
f X ( x) = (3 / 1000) x 2 , 0 x 10 and 0 elsewhere. What is your guess on the sign of the
coefficient of the skewness? Confirm your guess by computing it.
# mean
ex04_pdf = function(x) {x*(3/1000)*x^2}
mean_data = integrate(ex04_pdf, lower=0, upper=10) # integrate function
mean = mean_data$value # only 'value' of the integrate result
# variance
ex04_var = function(x) {(x-mean)^2*(3/1000)*x^2}
var_data = integrate(ex04_var, lower=0, upper=10)
var = var_data$value
std = sqrt(var)
# skewness
ex04_skew = function(x) {(x-mean)^3*(3/1000)*x^2}
5
Seoul National University Instructor: Junho Song
Dept. of Civil and Environmental Engineering [email protected]