219323 Probability and Statistics for Software and Knowledge Engineers
Lecture 3: Random Variables II
Monchai Sopitkamon, Ph.D.
219323 Probability and Statistics for Software and Knowledge - - PowerPoint PPT Presentation
219323 Probability and Statistics for Software and Knowledge Engineers Lecture 3: Random Variables II Monchai Sopitkamon, Ph.D. Outline Discrete Random Variables (2.1) Continuous Random Variables (2.2) Expectation of a Random
Monchai Sopitkamon, Ph.D.
Discrete Random Variables (2.1) Continuous Random Variables (2.2) Expectation of a Random Variable
The Variance of a Random Variable
Jointly Distributed Random Variables
Functions and Combinations of
Definition and Interpretation (2.4.1) Examples of Variance Calculations
Chebyshev’s Inequality (2.4.3) Quantiles of Random Variables
Measures the spread or variability in the
Var(X) = σ2 = E((X - E(X))2) = E(X2) - (E(X))2
Variance must be positive The greater the variance value, the more
Standard deviation (σ) = SD has the same unit as the RV, while
Two distributions with different mean values, but identical variances Two distributions with identical mean values, but different variances
Do examples 1 pg.103 and 14
2 2 1 1 2 2
n n
2 2 2 2 2 2
Provides bounds on the prob. that a RV
If a RV has a mean μ and a variance σ2,
Refer to next slide for c = 2 and c = 3 Do example 14 pg.108
The pth quantile of a RV X with a cdf F(x) is the
value of x for which
F(x) = p p x 100th percentile
There is a prob. of p that the RV takes a value <
the pth quantile
Spread of distribution can also be obtained by
computing its quartiles.
The upper quartile = 75th percentile The lower quartile = 25th percentile The interquartile range = distance between the
lower and upper quartiles.
Do example 14 pg. 110
Illustration of 70th percentile Illustration of quartiles and median
Interquartile range Interquartile range for metal cylinder diameters
The Variance of a Random Variable
Jointly Distributed Random Variables
Functions and Combinations of
Joint Probability Distributions (2.5.1) Marginal Probability Distributions
Independence and Covariance
Consider two RVs X and Y and their
The joint prob distribution of two RVs
A joint pdf f(x, y) for continuous RVs. The joint pmf must satisfy While the joint pdf must satisfy
1 =
i j ij
p
The prob that a ≤ X ≤ b and c ≤ Y ≤ d
The joint cdf F(x, y) = P(X ≤ x, Y ≤ y) See example 19 pg. 114
= = b a x d c y
−∞ = −∞ = ≤ ≤
x w y z x x i y y j ij
i j
: :
For discrete RVs For continuous RVs
i j ij
= =
x i y j ij
1 1
F(2, 2) = p11+p12+p21+p22
For two discrete RVs X and Y, the
For two continuous RVs, the prob
+ j ij i i
∞ ∞ −
21 . 01 . 08 . 12 . ) 1 (
3 1 1
= + + = = =
= j j
p X P
=
= =
4 1
) ( ) (
i
i X iP X E
= (1x0.21)+… …+(4x0.25) = 2.59
P(X = i) P(Y = j)
Marginal probability mass function of service time
=
= =
4 1 2 2
) ( ) (
i
i X P i X E
= (1x0.21)+… …+(16x0.25) = 7.87
Var(X) = E(X2) – (E(X))2 = 7.87 – 2.59^2 = 1.162 SD (σ) = √1.162 = 1.08
=
= =
4 1
) ( ) (
i
i X iP X E
= (1x0.21)+… …+(4x0.25) = 2.59
Marginal probability mass function of number of air conditioner units
Y
Two RVs X and Y are independent if the
Two RVs are independent if their joint
If the RVs are discrete, then they are
pij = pi+p+j for all values of xi and yj
If the RVs are continuous, then they are
f(x, y) = fX(x)fY(y) for all values of x and y
See independent example on pg. 122 The covariance of two RVs X and Y
Cov(X, Y) = E[(X – E(X))(Y – E(Y))] = E(XY) – E(X)E(Y)
The covariance can be any positive or
Independent RVs have a covariance = 0 The correlation between two RVs X and Y The correlation takes values between -1
See examples on pg. 124, 125
) ( ) ( ) , ( ) , ( Y Var X Var Y X Cov Y X Corr =
The Variance of a Random Variable
Jointly Distributed Random Variables
Functions and Combinations of
Linear Functions of a Random
Linear Combinations of a Random
Nonlinear Functions of a Random
If X is a RV and Y = aX + b for some
Sums of RVs
E(X1 + X2) = E(X1) + E(X2)
Linear Combination of RVs
E(a1X1 + … + anXn + b) = a1E(X1) + … + anE(Xn) + b
Var( a1X1 + … + anXn + b) = a1
2Var(X1) + … +
an
2Var(Xn)
Averaging Independent RVs
Then and
n
1
2