Variables Aleatorias
Variables Aleatorias
Definitions
A variable is defined as random, or stochastic, when it describes mathematically, in accordance
with probability laws, the numerical outcomes of experiments related to random phenomena.
A continuous random variable can assume continuous values on the real axis.
A discrete random variable can assume values in a discrete set of numbers.
A mixed random variable can assume both continuous and discrete values.
The following notes focus on continuous random variables.
Distribution function
The distribution function, also called cumulative distribution, FX ( x ) , is the probability that the
random variable X assumes values less or equal to x:
FX ( x ) = P ( X x )
(1)
This function is always defined on the whole real axis ( < x < + ) ; x is called the state variable.
The distribution function has several noteworthy properties. In particular:
FX ( ) = P ( X ) = P ( 0 ) = 0
FX ( + ) = P ( X + ) = 1
P {x1 < X x 2 } = FX ( x 2 ) FX ( x1 )
P {x1 < X x 2 } 0 FX ( x1 ) FX ( x 2 ) . So, FX (x ) is a not decreasing function.
Density function
The density function p X (x ) , or simply the density of a random variable X, is the prime derivative
of the distribution function with respect to x:
p X (x ) =
dFX (x )
dx
pX ( x ) 0
Remembering that FX ( ) = 0 , the application of the fundamental theorem of the integral calculus
provides the relationship:
FX (x ) = p x () d
x
It derives:
FX (x 2 ) FX (x 1 ) = x 2 p x (x ) dx
x
and then:
P ( x1 < X x 2 ) = p X ( x ) dx
x2
x1
p X ( x ) dx = 1
X = xp X ( x )dx
Let us define as root mean square value of the random variable X the quantity:
2X = x 2 p X ( x ) dx
( x x )
2X =
p X ( x ) dx
X
X
3
1 =
1
3X
(x X )
p X (x ) dx
2 =
1
4X
(x X )
p X (x ) dx
Normal distribution
A continuous random variable X has normal distribution if its density function has the form:
pX ( x ) =
1
X
1 x 2
X
exp
2 X
2
1
FX ( x ) =
2
1 u 2
exp 2 du
The following figure shows some qualitative diagrams of the normal distribution and its most
important properties.
X X
X
Thus the mean value and the standard deviation of Z are 0 and 1, respectively.
FXY ( x, y ) = P ( X x, Y y )
It is always defined on the bi-dimensional space ( < x < + ) , ( < y < + ) .
The marginal distribution functions of X and Y, FX (x ) e FY (y ) , are the distribution functions of
each variable X and Y. In general, the knowledge of FX and FY does not allow to determine FXY .
Instead, given FXY , it is possible to derive FX e FY :
FX ( x ) = P ( X x, Y < + ) = FXY ( x, + )
FY ( y ) = P ( X < +, Y y ) = FXY ( +, y )
The joint distribution function has some relevant properties:
FXY ( , y ) = P ( X < , Y y ) = P ( 0 ) = 0
FXY ( x, ) = P ( X x, Y < ) = P ( 0 ) = 0
x2
x1
y2
y1
p XY ( x, y ) dxdy
p XY ( x, y ) dxdy = 1
Moreover:
+
p X (x ) = p XY (x , y ) dy
p Y (y ) = p XY (x , y ) dx
The density functions p X (x ) and p Y (y ) of X and Y are called herein marginal density functions.
FXY (x , y ) = FX (x ) FY (y )
p XY (x, y ) = p X (x ) p Y (y )
These equations are necessary and sufficient conditions of independence.
R XY =
xyp XY ( x, y ) dxdy
CXY =
( x )( y )p ( x, y ) dxdy
XY
CXY = R XY X Y
If X = 0 or Y = 0 , then C XY = R XY . Moreover, if X = Y, then R XX = X2 , CXX = X2 .
The normalised covariance of X, Y, called also the coefficient of correlation, is defined as:
XY =
C XY
XY
p XY (x, y ) = p X (x ) p Y (y )
These variables are not correlated if:
R XY = X Y
C XY = XY = 0
If X, Y are independent, they are also not correlated. In fact:
R XY =
xyp XY ( x, y ) dxdy = xp X ( x ) dx yp Y ( y ) dy = X Y
The inverse statement is generally not true: if X, Y are not correlated, not necessarily they are also
independent (this occurs only if X, Y are normal random variables). Thus, the condition of
independence is stronger that the condition of not correlation.
The normalised covariance XY expresses the degree of correlation between X and Y. We already
noted that XY = 0 if X and Y are not correlated. It is easy to demonstrate that:
1 XY 1
It is possible to demonstrate that:
XY = +1 Y = aX + b, a > 0
XY = 1 Y = aX + b, a < 0
This equations is equivalent to the position:
XY = 1
X X
Y Y
=Y
=
X
X
Y
The above equations explain the difference between independence and not correlation. The
statistical dependence involves any functional link between X and Y. The correlation involves a
functional link of the linear type. Thus, the correlation is a particular case of the independence.
The following figure shows some typical examples of the statistical link between X, Y. If XY = +1
(a) X and Y are proportional; if XY = 1 (b) X and Y are inversely proportional. For intermediate
values of between 0 and 1 (c), (d) X and Y tend to be roughly proportional or inversely
proportional. The scattering is complete for XY = 0 ; it is worth noting that XY may be equal to
zero also in the presence of a strong functional link of not linear type (f).
1
2X Y 1 2XY
2 ( x ) 2 2 ( x ) ( y ) + 2 ( y ) 2
Y
X
X Y XY
X
y
X
y
exp
2
2
2
2 X Y (1 XY )
where X and Y are the mean values of X and Y, 2X and 2Y are the variances of X and Y, XY
is the coefficient of correlation.
10
The above equations is often represented by the curves provided by the intersection of the joint
density function with the planes p XY (x, y ) = K parallel to the plane x, y:
(x
+ y 2 2 XY xy
(1 )
2
XY
)=K
1 x 2 1
1 y y
x
exp
exp
2
2
2
2
11
RANDOM VECTORS
Definitions
A vector that lists n random variables is a n-variate random vector. The probabilistic representation
of the n-variate random vector X = {x1x 2 .. x n } implies the knowledge of the joint distribution of
all the random variables X j ( j = 1,...n ) (n-th order distribution). If X is normal, its complete
probabilistic representation involves the knowledge of the joint distribution of all the possible
couples of random variables X i , X j ( i, j = 1,...n ) composing the vector (2nd order distributions).
T
for j = 1, ...n
x1
x2
x1b
x1a
x2b
x 2a
...
x nb
x na
It follows that:
12
The joint density function of some of the random variables composing the random vector can be
derived from p X1X2 ... X n (x 1 , x 2 , ... x n ) integrating between - and + with respect to all the other
variables. For instance:
p X1X2 (x 1 , x 2 ) = ... ...p X1X2X3 ... X n (x 1 , x 2 , x 3 ... x n ) dx 3 ... dx n
+
The mean vector, called also the vector of the mean values, is defined as:
X = E [ X] = { X1 X 2 ... Xn }
Its components are the mean values of the random variables that compose the random vector X,
i.e. Xi = E [ X i ] ( i = 1,...n ) .
The correlation matrix is defined as:
RX = E X XT
R X1X1
R
X X
= 2 1
R X n X1
R X1X2
R X 2X 2
R X nX 2
R X1X n
.. R X2X n
.. R X n X n
..
The on-diagonal terms are the mean square values of each random variable ( R Xi Xi = 2Xi ) ; the offdiagonal terms are the correlations of all the possible couples of the random variables.
13
C X = E (X X )(X - X )
C X1X1
C
X X
= 2 1
C X nX1
C X1X2
C X 2X 2
C XnX2
.. C X1X n
.. C X2X n
.. C X n X n
The on-diagonal terms are the variances of each random variable ( CXi Xi = 2Xi ) ; the off-diagonal
terms are the covariances of all the couples of random variables. Expanding the above equations it
follows that:
R X = C X + X TX
R X and C X are symmetric matrices. It is possible to show that they are also semi-positive defined.
R X is diagonal if all the couples of different random variables X i , X j ( i j) are orthogonal, i.e.
R Xi X j = 0 (i,j, ij). C X is diagonal of all the couples of different random variables X i , X j (i j)
}T
be
normal distribution if its joint density function p X1 X 2 ... X n (x 1 x 2 ... x n ) has the form:
T
p X1 X2 ... Xn ( x1 , x 2 ,...x n ) =
( 2 )
n/2
CX
1/ 2
1
exp
2 C X
CX
jk
jk
(x
X j
)(x
Xk )
determinant of the matrix obtained by cancelling the j-th row and the k-th column of CX , multiplied
by ( 1)
j+ k
pX ( x ) =
). In matrix form:
( 2 )
n/2
CX
1/ 2
T
1
exp ( X X ) CX1 ( X X )
2
Thus, the knowledge of the first order statistical mean ( X ) and of the second order statistical mean
( CX )
14