Forelas 01
Forelas 01
RANDOM VARIABLES
1
DISCRETE-TIME RANDOM PROCESS
The characteristics of deterministic and random signals can, in general, be summarized as follows:
• A deterministic signal can be described by a mathematical expression and reproduced exactly with
repeated measurements; it is related to one signal.
• A random signal that is associated with a set of (digital) signals is not repeatable and predictable; thus it
may only be described probabilistically or in terms of average behaves of the signal set.
2
Note that random signals can be either unwanted noise signals as in the above example or desired signals like
speech signals, ultrasonic signals, light signals, etc.
3
RANDOM VARIABLES
4
We shall say that the statistics of a random variable x are known if we can determine the probability
distribution function or the probability density function.
A random variable x can also be characterized by ensemble averages, e.g., mean and variance.
Mean (or mean value, or expected value):
For a discrete random variable x that assumes a value of α k with probability Pr{x = α k } , the mean
(expected value) is defined as
E{x} = m x = α k Pr{x = α k } (6)
k
For a continuous random variable x, this expectation may be written in terms of the probability density
function f x (α ) as
∞
E{x} = m x = αf x (α )dα (7)
−∞
Variance:
For a discrete random variable x that assumes a value of α k with probability Pr{x = α k } , the variance is
defined as
{
Var{x} = σ x2 = E [x − E{x}] =
2
} [α k − E{x}]2 Pr{x = α k } (10a)
k
5
For a continuous random variable x with given probability density function f x (α ) , the variance is defined as
{
Var{x} = σ x2 = E [x − E{x}] =
2
} ∞
−∞
[α − E{x}]2 f x (α )dα (10b)
which is the mean-square value of the random variable y = x − E{x} . The variance may be expressed
{ 2
} { }
Var{x} = E [x − E {x}] = E x 2 − (E{x})
2
(11)
The square root of the variance, σ x , is called the standard deviation.
For a complex random variable, the variance is
σ z2 = E{[z − E{z}][z * − E{z*}]} = E z − E{z} { 2
} (12)
The variance represents the average squared deviation of the random variable from the mean.
(ii) For the continuous random variable x having the uniform distribution, the expected value is
c 1 c b+c
E ( x) = αf x (α )dα = αdα = (14)
b c−b b 2
For (b, c)=(0, 1), E(x)=0.5; for (b, c)=(0, 2), E(x)=1; for (b, c)=(-1, 2), E(x)=0.5.
(ii) For the random variable x with the uniform distribution, the variance is
c
1 c
( c − b) 2
Var( x) = (α − m x ) 2 f x (α )dα = (α − m x ) 2 dα = (15b)
b c−b b 12
For (b, c)=(0, 1), Var(x)=0.083; for (b, c)=(0, 2), Var(x)=0.333; for (b, c)=(-1,2), Var(x)=0.75. This shows
that the broader the value range taken by x the larger the variance.
Example 7. (i) What is the mean value of the mean value of a random variable? That is E{m x } =? (ii) What
is the mean value of the variance of a random variable? That is E{σ x2 } =?
Answer: E{m x } = m x , and E{σ x2 } = σ x2 .
This example shows that the mean and the variance (that is the mean of x − E{x} ) of a random variable are
deterministic. Note that the mean of a random variable is the mean of a complete set (ensemble) of all the
elementary events in the sample space.
Moments:
The quantities moments are of interest in the study of a random variable because they cover more general
ensemble descriptions of a random variable. The moments are defined in different types: moments, central
moments, absolute moments.
6
The nth moment of a random variable is defined by
∞
E{x n } = α n f x (α )dα (16)
−∞
which is the expected value of x n . The first order moment, obviously, is the mean value m x .
The mean-square value is E{x 2 } , the second moment, that is an important statistical average and often used
as a measure for the quality of an estimate.
The nth central moment of a random variable is defined by
∞
E{( x − m x ) n } = (α − m x ) n f x (α )dα (17)
−∞
which is the expected value of ( x − m x ) n . The variance σ x2 is the second central moment.
The nth absolute moment and absolute central moment of a random variable are defined, respectively, as
E{| x | n } and E{| x − m x | n } (18)
Note that for a complex variable z, the second central moment E{( z − m z ) } is different form the second
2
When a problem is involved with two or more random variables, it is necessary to study the statistical
dependencies (or relations) that may exist between the random variables. The statistical dependencies can be
joint distribution and density functions, and correlation and covariance.
Joint moments:
Like in the case of a single random variable, the statistical dependencies can also be described by ensemble
averages. The joint moments are just used for this purpose. The correlation and covariance of two random
variables are the two joints most often used in this course.
The joint moment of the random variables x and y is defined by
E { x k y *l } (22)
where y * is the conjugate of y.
7
The joint central moment of the random variables x and y is defined by
E{( x − m x ) k ( y − m y ) *l } (23)
that is the second order joint central moment. The correlation and covariance are used to statistically
characterize the relationship between two random variables, and they play an important role in studying
signal modeling, spectrum estimation, and Wiener filters.
Correlation coefficient:
The correlation coefficient, a normalized covariance,
c r − m x m *y
ρ xy = xy = xy (26)
σ xσ y σ xσ y
An interesting property of the correlation coefficient is that
ρ xy ≤ 1 , or c xy ≤ σ xσ y (27)
Note that statistically independent variables are always uncorrelated, but the converse is not true in general.
A useful property of uncorrelated random variables is the following
Var{x + y} = Var{x} + Var{y} (30)
{[ ][
since Var{x + y} = E x + y − m x − m y x + y − m x − m y ] }= Var{x} + c
*
xy ( )
+ c xy
*
+ Var{ y} .
Two random variables x and y are orthogonal if their correlation is zero, E{xy*} = 0 or rxy = 0 .
Prediction and estimation are two general classes of problems encountered in statistical investigations.
In the prediction case, the probabilistic model (e.g., a certain distribution, or density, function) of the
problem is assumed to be known, and predictions are made concerning future observations. For example, in
8
the experiment of flipping a coin, we know the probabilities of showing heads and tails and we wish to
predict the number of occurrences of showing heads.
In the estimation case, a sequence of observed values of a random variable are know, and a parameter (of a
model) is estimated from the observed values; or the problem concerned is an estimation of a random
variable y in terms of an observation of another random variable x (this problem generally arises when y
cannot be directly measured or observed so a related random variable is measured and used to estimate y).
The goal of the estimation is to find the best estimate of y in terms of the known.
For example, we have observed N values of a random variable, and wish to estimate its mean value. Here we
focus ourselves on the estimation issue.
The sample mean m̂ x and the sample variance σˆ x2 are the estimates of the mean m x and the variance σ x2 of
the random variable x, respectively. Note that the estimates (e.g., m̂ x and σˆ x2 ) themselves are random
variables because every estimate is a function of observations.
The estimates themselves are random variables. Therefore, in classifying the effectiveness of a particular
estimator, it is important to characterize its statistical properties. The statistical properties of interest include
the bias and the variance.
The bias is the difference between the expected value of the estimate, θˆN , and the actual value, θ , and it
is denoted by B,
B = θ − E θˆN { } (33)
where the estimate θ N is a function of N random variables (or N observations of a random variable).
ˆ
N { }
The estimate θˆ is said to be unbiased if B=0 or E θˆ = θ .
N
In general, it is desirable that an estimator is either unbiased or asymptotically unbiased. However, the bias is
not the only statistical measure of importance.
Consistency means that an estimate is said to be consistent if it converges, in some sense, to the true value
of the parameter. Mathematically, an estimate is consistent if the variance of the estimate goes to zero,
N →∞
{ }
lim Var θˆN = lim E θˆN − E{θˆN }
N →∞
2
=0 (34)
9
Example 9. The bias and consistency of the sample mean (Example 3.2.3 on p. 74)
Let x be a random variable with a mean m x and variance σ x2 . Given N uncorrelated observations of x that
1 N
are denoted by x n , the sample mean mˆ x = x n has the expected value
N n =1
N N
E{mˆ x } = E {x n } =
1 1
mx = mx (35)
N N
n =1 n =1
which goes to zero as N → ∞ . Therefore, the sample mean is an unbiased and consistent estimator.
∂ξ
∂b
=E
∂
∂b
( y − ax − b) 2 = E{2( y − ax − b)(−1)} = −2 m y + am x + b = 0[ ] (40)
10
(ii) The orthogonality principle: E{( y − yˆ ) x} = E {ex} = 0 (where e = y − yˆ is called estimation error that is a
random variable, and E{ex} is just the correlation between e and x, namely, E{ex} = rex ), which follows
from ∂ξ ∂a = E{2( y − ax − b)(− x)} = − 2 E{( y − yˆ ) x} = 0 . This principle states that for the optimum
linear predictor the estimation error will be orthogonal to the data x because of E{ex} = rex =0. It is
fundamental in mean-square estimation problems.
Uniform and Gaussian random variables are two types of important random variables in probability
theory. Gaussian random variables are also called normal random variables. The random processes that are
made up of a sequence of such random variables play an important role in statistical signal processing.
11
Some useful MATLAB functions
Some MATLAB functions useful for studying random variables are given below. Use help to look at the
detailed descriptions of the functions.
12