statistics joint and conditional distributions professor ke-sheng cheng department of...
TRANSCRIPT
STATISTICS Joint and Conditional
Distributions
Professor Ke-Sheng ChengDepartment of Bioenvironmental Systems Engineering
National Taiwan University
Joint cumulative distribution function
• Let be k random variables all defined on the same probability space ( ,A, P[]). The joint cumulative distribution function of , denoted by , is defined as
for all .
kXXX ,,, 21
kXXX ,,, 21 ),,(,,1 kXXF
],,[ 2211 kk xXxXxXP ),,( 21 kxxx
04/21/23 2Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Discrete joint density
04/21/23 3Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 4Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Marginal discrete density• If X and Y are bivariate joint discrete
random variables, then and are called marginal discrete density functions.
)(Xf )(Yf
}:{
, ),()(ki xxi
iiYXkX yxfxf
}:{
, ),()(ki yyi
iiYXkY yxfyf
0),( yxf XY x y
XY yxf 1),(
04/21/23 5Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Continuous Joint Density Function• The k-dimensional random variable
( ) is defined to be a k-dimensional continuous random variable if and only if there exists a function such that
for all .
• is defined to be the joint probability density function.
kXXX ,, 21
0),,(,,1 kXXf
k
x x
kXXkXX duduuufxxFk
kk 11,,1,,
1
11),,(),,(
),,( 21 kxxx
),,(,,1 kXXf
04/21/23 6Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
0),,( 1,,1kXX xxf
k
1),,( 11,,1
kkXX dxdxxxfk
],,,[ 222111 kkk bXabXabXaP
k
b
a
b
a kXX dxdxxxfk
kk
11,,
1
11
),,(
04/21/23 7Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Marginal continuous probability density function
If X and Y are bivariate joint continuous random variables, then and are called marginal probability density functions.
)(Xf )(Yf
dyyxfxf XYX ),()(
dxyxfyf XYY ),()(
04/21/23 8Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Conditional distribution functions for discrete random variables
• If X and Y are bivariate joint discrete random variables with joint discrete density function
, then the conditional discrete density function of Y given X=x, denoted by
or , is defined to be
),( XYf
)|(| xf XY )(| xXYf
)(
),()|(| xf
yxfxyf
X
XYXY
04/21/23 9Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
}:{
|| )|(]|[)|(yyj
jXYXY
j
xyfxXyYPxyF
04/21/23 10Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Conditional distribution functions for continuous random variables
• If X and Y are bivariate joint continuous random variables with joint continuous density function , then the conditional probability density function of Y given X=x, denoted by or , is defined to be
),( XYf
)|(| xf XY )(| xXYf
)(
),()|(| xf
yxfxyf
X
XYXY
04/21/23 11Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 12Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
dyyxfxf
dyxf
yxfdyxyf
XYX
X
XYXY
),()(
1
)(
),()|(|
1)(
)(
xf
xf
X
X
04/21/23 13Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 14Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Stochastic independence of random variables
04/21/23 15Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Expectation of function of a k-dimensional discrete random variable
04/21/23 16Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 17Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Conditional Expectation
04/21/23 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
18
xY X
XY
X
XYXY
dyxf
yxfyxXYE
xf
yxfxyf
|
|
)(
),(|
)(
),()|(
04/21/23 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
19
][
)(
),(),(
)()(
),(
]|[|
|
|
|
YE
dyyyf
dydxyxfydxdyyxyf
dxxfdyxf
yxfy
xYEEXYEE
Y
Y
Y X
XY
X xY
XY
X
X xY X
XY
xXYX
)]|([][ XYEEYEX
Expectation of a Random Sum of Random Variables
• Let N be a random variable which can assume positive integer values 1, 2, 3....
• Let Xi be a sequence of independent random variables which are also independent of N and have a common mean E[X] independent of i. Then the expectation of the sum of N Xi’s can be expressed as
04/21/23 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
20
][][][ XENESE
N
iiXS
1Homework problem
Covariance
04/21/23 21Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
YXXYEYXCov ][),(
04/21/23 22Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
• If two random variables X and Y are independent, then .0),( YXCov
Therefore,
YXXYEYXCov ][),(
YXYX
YX
XY
dyyyfdxxxf
dxdyyfxxyf
dxdyyxxyfXYE
)()(
)()(
),()(
.0),( YXCov
04/21/23 23Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
• However, does not imply that two random variables X and Y are independent.
0),( YXCov
04/21/23 24Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
A measure of linear correlation:Pearson coefficient of correlation
YXXY
YXCovYXCorrel
),(
),(
11 XY04/21/23 25Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental
Systems Engineering, National Taiwan Univ.
Covariance and Correlation Coefficient • Suppose we have observed the following data.
We wish to measure both the direction and the strength of the relationship between Y and X.
04/21/23 26Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 27Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 28Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 29Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 30Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 31Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 32Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Examples of joint distributions
• Duration and total depth of storm events. (bivariate gamma, non-causal relation)
• Hours spent for study and test score. (causal relation)
04/21/23 33Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Bivariate Normal Distribution
• Bivariate normal density function
1
2
1
21
2
1)(),(
zz
ZXY
T
ezfyxf
04/21/23 34Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
• Conditional normal density
2
22|1
)()(
2
1exp
)1(2
1)|(
Y
XX
YY
Y
XY
xy
xyYf
)(| yf xXY
04/21/23 35Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 36Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 37Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Bivariate normal simulation I. Using the conditional density
04/21/23 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
38
2
22|1
)()(
2
1exp
)1(2
1)|(
Y
XX
YY
Y
XY
xy
xyYf
04/21/23 39Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 40Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
(x,y) scatter plot
04/21/23 41Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Histogram of X
04/21/23 42Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Histogram of Y
04/21/23 43Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Bivariate normal simulation II. Using the PC Transformation
04/21/23 44Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 45Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 46Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
04/21/23 47Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
(x,y) scatter plot
04/21/23 48Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Histogram of X
04/21/23 49Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Histogram of Y
04/21/23 50Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
Multivariate normal simulation using R
• The mvtnorm package in R • dmvnorm• rmvnorm• pmvnorm• qmvnorm
04/21/23 Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.
51
Conceptual illustration of Bivariate gamma simulation
04/21/23 52Laboratory for Remote Sensing Hydrology and Spatial Modeling, Dept of Bioenvironmental Systems Engineering, National Taiwan Univ.