10 Standard Deviations and Variances

10 Standard Deviations and Variances

10 Standard deviations and variances

Standard deviations and variances of data.

If we have some measurements x1, x2, ... , xn then their average

=

is a measure of where their "center" is. The standard deviation and variance give us measures of how spread out the data is. The variance, s2, is the average of the squares of the differences of the data values from the average except most people divide by n-1 instead of n, i.e.

(1)s2 = (xj - )2

Dividing by n – 1 instead of n makes simpler certain formulas that involve variances and standard deviations. The standard deviation, s, is the square root of the variance, i.e.

The standard deviation, s, is the square root of the variance, i.e.

(2)s =

Example 1. A certain community is doing a study of the times between fires in their community. In a certain period they measure the following times (in hours) between successive fires t1= 1.3, t2= 0.5, t3= 1.6, t4= 9.3, and t5= 7.3. Find the average, variance and standard deviation of these five measurements.

Solution.

= = = 4

s2 =

= =

= = 16.07

s = 4.00874

There is an alternative formula for the variance that is sometimes useful for computational purposes.

Proposition 1. Let s2 be given by (1). Then

(3)s2 = (xj)2 – ()2

Proof. s2 = (xj - )2 = [(xj)2 – 2xj + ()2] = [(xj)2 – 2xj + ()2] =

[(xj)2 – 2n()2 + n()2] = (xj)2 – ()2. //

Example 1 (continued). Use the alternative formula (3) to compute the variance of the data in Example 1.

s2 = - (4)2 = - 20

= - 20 = 36.07 – 20 = 16.07.

Remark. The mean absolute deviation about the mean, , is another possible measure of how spread out the data is. It is defined by

(4) = | xj - |

Example 1 (continued). For the data in Example 1, the mean absolute deviation about the mean is

 = =

= = = 3.44

The mean absolute deviation is less than the standard deviation. More precisely, we have the following.

Proposition 2. If  is defined by (4) and  by (2) then

(5)  

Proof. We write | xj - | = | xj - |  1 and apply the Cauchy-Schwarz inequality

ujvj  ½ ½

This gives

| xj - |  ½ = ½ = 

Dividing both sides by n gives (5). //

Standard deviations and variances of random variables.

If X is a random variable, then its mean or expected value is

(6) = E(X) =

The Law of Large Numbers connects the mean of a random variable with the average of data.

Theorem (Law of Large Numbers). SupposeX1,X2, …, Xn, … is a sequence of independent random variables all having the same probability mass or density function and  is the common mean of all the Xj. Let

n =

be the "average" of X1, X2, …, Xn and E be the set of outcomes a in the sample space S such that n(a)  as n. Then Pr{E} = 1.

So if the data consists of a set of independent samples with the same distribution and n is large then the average of the data should be close to the mean of the underlying probability distribution.

There is a similar connection between the variance and standard deviation of data and the corresponding variance and standard deviation of a random variable.

If X is a random variable, then the variance of X is

(7)2 = E( (X – )2 ) =

The standard deviation, , is the square root of the variance, i.e.

(8) =

As in the case of data, there is an alternative formula for the variance.

Proposition 2. Let 2 be given by (5). Then

(9)2 = E(X2) - 2 = - 2

Proof. 2 = E( (X – )2 ) = E(X2 – 2X + 2) = E(X2) – E(2X) + E(2) = E(X2) – 2E(X) + 2 = E(X2)22+ 2 = E(X2) - 2. //

Example 3. Suppose in Example 1 we model the times between fires by an exponential random variable with rate  = ¼ fires per hour. Find the theoretical variance and standard deviation of such a random variable.

Solution. We have seen previously that for an exponential random variable T with rate  has mean  = 1/. The density function is equal to e-t for t > 0 and zero for t < 0. Therefore E(T2) = t2e-tdt. If one integrates by parts twice then one obtains E(T2) = 2/2. So 2 = E(T2) - 2= 2/2- 1/2= 1/2and  = 1/. In our example this means 2 = 16 and  = 4.

As indicated above, the Law of Large Numbers provides the connection between the average of data and the mean of a random variable. In a similar fashion it provides the connection between the variance and standard deviation of data and the variance and standard deviation of a random variable. Suppose we model a collection of data x1, …, xn be a sequence of independent random variables X1, X2, …, Xn all with the same probability mass or density function. Then n= is a model for the average of x1, …, xn. The Law of Large Numbers says n as n with probability one where  is the mean of the probability distribution for all the Xj. In a similar fashion Sn2=(Xj - n)2 is a model for the variance of x1, …, xn and Sn = is a model for the standard deviation of x1, …, xn. The Law of Large numbers implies Sn2 approaches the variance 2 of the probability distribution for all the Xj with probability one and Sn approaches the standard deviation  of the probability distribution.

10 - 1