Discrete Mathematics for Computer Science

(Romina) #1
Variance, Standard Deviation, and the Law of Averages 531

informally as the Law of Averages. The theorem says that under the right circumstances,
the values of the average of random variables computed from one run of an experiment
to another will cluster around the same number; the expected value of their average. The
circumstances under which the Law of Averages holds involve the notion of independent
random variables, which are also introduced in this section.

8.9.1 Variance and Standard Deviation

To measure how much the actual values of a random variable cluster around its expectation,
we define the variance and the standard deviation of a random variable. These measure-
ments of clustering are very important in practice.
Definition 1. Let X be a random variable defined on the sample space 0Ž. The variance
Var(X) of a random variable X is defined as

Var(X) = E (X(()- _)2).p(,)

where it = E (X).

Definition 2. The standard deviation or of a random variable X is defined as

r= Var(X)


Example 1. Suppose we flip two fair coins and list a pair (i, j) for each possible outcome
where i = I if the coin ends up heads and i = 0 if it ends up tails. Define j similarly
for the second coin. The four ordered pairs determine a sample space S2. Use the uniform
probability density function on 02. Define a random variable X on 02 that counts the number

of l's in an element of 02. Determine the variance and the standard deviation of X.

Solution. First, compute px for each value of X: px(O) = 1/4, px(I) = 1/2, and

px(^2 ) = 1/4. Therefore, E(X) = 1. Now,
11

4 2
with standard deviation 1/ /2.^0

Theorem 1. (Properties of Variance) Let X be a random variable defined on sample
space S2 endowed with a probability density p, and let i = E(X). Then:

(a) Var(X) = E((X - g)^2 ) = E(X^2 ) _/_2.

(b) Var(kX) = k^2 Var(X) for real numbers k.

Warning. In general, E(Y^2 ) : E^2 (y), and Var(Xi + X 2 ) A Var(XI) + Var(X 2 ).

Proof.

(a) Computing the expectation of the random variable (X - A)^2 gives

E((X - I)2) = Z[(X - )^2 (f.o) .p(fto)] = L(X(0)) _- /)2). p(o)

which by definition is Var(X).
Free download pdf