Professional Documents
Culture Documents
4.random Vectors Clase
4.random Vectors Clase
4.random Vectors Clase
Mean
Variance, Covariance, Correlation
11Joint
Jointdistribution
distributionof
ofaarandom
randomvector
vector
Mean
Variance, Covariance, Correlation
3
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Discrete variables
p( x, y ) = Pr( X = x, Y = y )
F ( x0 , y0 ) = Pr( X x0 , Y y0 ) = Pr( X = x, Y = y)
x x0 y y0
4
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
5
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
4 4.1x10-5
3 4.1x10-5 1.84x10-3
p ( x, y ) 0
p( x, y) = 1
x y
2 1.54x10-5 1.38x10-3 3.11x10-2
0 1 2 3 4 X 6
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
4 4.1x10-5
3 4.1x10-5 1.84x10-3
0 1 2 3 4 X 7
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Continuous variables
Given two continuous r.v., X , Y their joint density function is defined as:
f ( x, y )
9
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Continuous variables
10
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Example
Let X be a random variable which represents the time until your PC connects
to a server and Y, the time until the server recognize you as a user.
The joint density function is given by:
11
Estadística. Profesora: María Durbán
1 Joint distribution of a random vector
Example
3000
Region where the density
funtion is not 0
2000
1000
3000
2000
Region used to compute that
probability
1000
Y
1000 y
Pr( X 1000, Y 2000) = f ( x, y )dxdy +
0 0
3000
2000
x=y
1000
3000
= 0.915
2000
x=y
1000
Mean
Variance, Covariance, Correlation
Discrete variables
pY ( y ) = Pr(Y = y ) = Pr( X = x, Y = y )
x
We can compute their mean,
variance, etc.
17
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
X = Number of bits acceptables
The marginal probability 4 4.1x10 -5
Y = Number of suspicious bits
functions are obtained by
adding in both directions. 3 4.1x10-5 1.84x10-3
0 1 2 3 4 X 18
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
X = Number of bits acceptables
The marginal probability
Y = Number of suspicious bits
functions are obtained by
adding in both directions.
0 1 2 3 4 X 19
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
X = Number of bits acceptables
The marginal probability 4 4.1x10 -5
Y = Number of suspicious bits
functions are obtained by
adding in both directions. 3 4.1x10-5 1.84x10-3
0 1 2 3 4 X 20
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Y
X = Number of bits acceptables
The marginal probability 4 0.00004
Y = Number of suspicious bits
functions are obtained by
adding in both directions. 3 0.00188
2 0.03250
1 0.24925
0 0.71637
X 21
Estadística. Profesora: María Durbán
2 Marginal distributions
Continuous variables
Given two continuous r.v., X , Y With joint density function f ( x, y )
the marginal density functions are given by:
+
f X ( x) = f ( x, y )dy They are density functions
−
+
fY ( y ) = f ( x, y )dx We can compute their mean,
−
variance, etc.
0.4
0.3
f(x) 0.2
0.1
0.0
-4 -2 0
x
2 4 22
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
Let X be a random variable which represents the time until your PC connects
to a server and Y, the time until the server recognize you as a user.
The joint density function is given by:
¿ Pr(Y 2000) ?
23
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
24
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
0
1000 2000 3000 X 26
Estadística. Profesora: María Durbán
2 Marginal distributions
Example
0
27
Estadística. Profesora: María Durbán
2 Conditional distributions
When we observe more than one r.v. in an experiment, one variable may
affect the probabilities associated with the other.
Pr (A B )
Pr (B A ) =
Pr (A ) Measures the
size of one
event with
respect to the
other
28
Estadística. Profesora: María Durbán
2 Conditional distributions
When we observe more than one r.v. in an experiment, one variable may
affect the probabilities associated with the other.
Discrete variables
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
Knowing the value of X changes the probability associated with the values of Y
30
Estadística. Profesora: María Durbán
2 Conditional distributions
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
f ( x, y) = f ( y | x) f X ( x)
32
Estadística. Profesora: María Durbán
2 Conditional distributions
Example
Let X be a random variable which represents the time until your PC connects
to a server and Y, the time until the server recognize you as a user.
The joint density function is given by:
What is the probability that the time until the server recognize you as user is
mote than 2000, if your PC has taken 1500 to connect to the server?
33
Estadística. Profesora: María Durbán
2 Conditional distributions
Example
1000
f ( y | x) = 0.002e0.002 x −0.002 y 0 x y
0
1000 2000 3000 X 34
Estadística. Profesora: María Durbán
2 Conditional distributions
Example
= 0.368
0
1000 2000 3000 X 35
Estadística. Profesora: María Durbán
Random Vectors
33Independent
Independentrandom
randomvariables
variables
Mean
Variance, Covariance, Correlation
When we observe more than one r.v. in an experiment, one variable may
not affect the probabilities associated with the other.
Discrete variables
p( y | x) = pY ( y) p ( x | y ) = p X ( x)
p( x, y) = p( x | y) pY ( y) = pX ( x) pY ( y) x, y
38
Estadística. Profesora: María Durbán
3 Independent random variables
Continuous variables
f ( y | x ) = fY ( y ) f ( x | y) = f X ( x)
f ( x, y) = f ( x | y) fY ( y) = f X ( x) fY ( y) x, y
39
Estadística. Profesora: María Durbán
3 Independent random variables
Example
Let X be a random variable which represents the time until your PC connects
to a server and Y, the time until the server recognize you as a user.
The joint density function is given by:
f ( y | x) = 0.002e0.002 x −0.002 y 0 x y
For all values of x
fY ( y ) = 6 10−3 e−0.002 y (1 − e−0.001 y ) y0
40
Estadística. Profesora: María Durbán
Random Vectors
44 Characteristics
Characteristics of
of random
random vectors
vectors
Mean
Variance, Covariance, Correlation
X1
X2
Given n r.v. X 1 , X 2 , , X n an n-dimensional random vector is X=
Xn
The probability/density function of the vector is the joint probability/density
function of the vector components.
Mean
We define the vector of means as the vector whose components are the
means of each component.
E X1
μ = E X =
E 2
X
E X n 42
Estadística. Profesora: María Durbán
4 Characteristics of random vectors
Covariance
Properties
Covariance
h( x, y) p( x, y)
E h( X , Y ) = x y
+ +
− −
h( x, y ) f ( x, y )dxdy
44
Estadística. Profesora: María Durbán
4 Characteristics of random vectors
45
Negative
Estadística. Profesora: MaríaCovariance
Durbán Zero Covariance
4 Characteristics of random vectors
Example
A new receptor for the transmission of digital information receives bit that
Are classified as acceptable, suspicious or non-acceptable, depending on
The quality of the signal received.
4 bits are transmitted, and two r.v. are defined:
46
Estadística. Profesora: María Durbán
4 Characteristics of random vectors
Correlation
If Y = aX + b | ( X , Y ) |= 1
47
Estadística. Profesora: María Durbán
4 Characteristics of random vectors
Vaciance-Covariance Matrix
Properties
Symmetric
Positive semi-definite
48
Estadística. Profesora: María Durbán
Random Vectors
Mean
Variance, Covariance, Correlation
55 Transformation
Transformation of
of random
random vectors
vectors
4 x1 x2 0 x1 , x2 1
f X1 X 2 ( x1 , x2 ) =
0 elsewhere
1. Define Y2 = X 2
Example
4 x1 x2 0 x1 , x2 1
f X1 X 2 ( x1 , x2 ) =
0 elsewhere
dX
f (Y) = f ( g −1 (Y))
dY
g ( X) = ( X 1 + X 2 , X 2 ) → g −1 (Y) = (Y1 − Y2 , Y2 )
Y1 Y2 f (Y) = 4( y1 − y2 ) y2
dX 1 −1 In which
−1
region is defined?
= =1 f ( g (Y)) = 4( y1 − y2 ) y2
dY 0 1
52
Estadística. Profesora: María Durbán
5 Transformation of random vectors
Example
0 x1 , x2 1
Y1 = X1 + X 2 → 0 y1 2
Y2 = X 2 → 0 y2 1 Y1 − Y2 = X 2 → 0 y1 − y2 1
53
Estadística. Profesora: María Durbán
5 Transformation of random vectors
Example
0 x1 , x2 1
Y1 = X1 + X 2 → 0 y1 2
Y2 = X 2 → 0 y2 1 Y1 − Y2 = X 2 → 0 y1 − y2 1
y1 − y2 = 0 y1 − y2 = 1
54
Estadística. Profesora: María Durbán
5 Transformation of random vectors
Example
f (Y) =0 4( y1 − y2 ) y2
x , x 11 2
0 y1 1 0 y2 y1
Y1 = X1 + X 2 → 0 y1 2
Y2 = X 2 → 0 y2 1 Y1 − Y2 = X 2 → 0 y1 − y2 1
1 y1 2 y1 -1 y2 1
1
0 y1 1 0 y2 y1
y1 − y2 = 0 y1 − y2 = 1 1 y1 2 y1 -1 y2 1
55
Estadística. Profesora: María Durbán
5 Transformation of random vectors
Example
y1
3 3
0 4( y1 − y2 ) y2y2 = 2 y1 0 y1 1
fY1 ( y1 ) = 1
8 3 3
y −1 4( y1 − y2 ) y2y2 = − 3 + 4 y1 − 2 y1 1 y1 2
1
56
Estadística. Profesora: María Durbán
5 Transformation of random vectors
Convolution of X1 and X2
+
( f X1 * f X 2 ) = fY ( y ) = f X1 ( y − x) f X 2 ( x)x
−
57
Estadística. Profesora: María Durbán
5 Transformation of random vectors
E Y = AE X
Var Y = AM X A
Example
X1
Y = X1 + X 2 Y = (1 1)
X2
E Y = E X1 + E X 2
Var X1 Cov( X1 , X 2 ) 1
Var Y = (1 1) = Var X1 + Var X 2 + 2Cov( X1 , X 2 )
Cov( X1 , X 2 ) Var X 2 1 58
Estadística. Profesora: María Durbán
5 Transformation of random vectors
E Y = AE X
Var Y = AM X A
Example
X1
Y = X1 − X 2 Y = (1 −1)
X2
E Y = E X1 − E X 2
Var X1 Cov( X1 , X 2 ) 1
Var Y = (1 −1) = Var X1 + Var X 2 − 2Cov( X1 , X 2 )
Cov( X1 , X 2 ) Var X 2 −1 59
Estadística. Profesora: María Durbán
5 Transformation of random vectors
E Y = AE X
Var Y = AM X A
Normal Distribution
X i ~ N ( i , i ) i = 1, , n independent
Y = a1 X 1 + a2 X 2 + + an X n Normal
n n
E Y = ai i Var Y = ai2 i2
i =1 i =1
60
Estadística. Profesora: María Durbán
Random Vectors
Mean
Variance, Covariance, Correlation
66 Multivariate
Multivariate Normal
Normal distribution
distribution 61
Estadística. Profesora: María Durbán
6 Multivariate Normal distribution
X
If a random vector X = 1 follow a bivariante Normal distibution
X2
1 variance-covariance matrix
with vector of means μ=
2
12 1 2
=
1 2 2
2
1
f (X ) =
1 −1
exp− ( X − μ)' ( X − μ)
(2 ) 1/ 2
2
62
Estadística. Profesora: María Durbán
6 Multivariate Normal distribution
1
f (X ) =
1 −1
exp− ( X − μ)' ( X − μ)
(2 ) 1/ 2
2
1 −
2 1 2
12 1 2 1 1
= = 12 22 (1 − 2 ) −1 =
1 2 22 (1 − 2 ) − 1
22
1 2
1
1 x − 2 x − 2 x1 − 1 x2 − 2
f ( x1 , x2 ) = exp −
1 1
+
2 2
− 2
( 2 ) 1 2 (1 − 2 ) 2(1 − 2
)
1 2 1 2
63
Estadística. Profesora: María Durbán
Density function
Scatterplot
6 Multivariate Normal distribution
X1 1 12 1 2
X= μ= =
2 1 2 2
2
X2
Properties
= 0 X1 , X 2 independent
X1 ~ N ( 1 , 1 ) X 2 ~ N ( 1 , 1 )
X1 | X 2 y X 2 | X1 are Normal
65
Estadística. Profesora: María Durbán