Variance

advertisement
Variance-Dispersion
Tables of values and graphs of the p.m.f.’s
of the finite random variables, X and Y, are
given in the sheet Random Variables of the
file Variance.xls.
We need a parameter that measures the
spread or dispersion of the possible values.
We begin by computing the sum of the
deviations of the possible values from the
mean.
 X = E( X ) = mean of X= 
x
1
2
3
4
5
Sum
X  3
f X (x)
x  f X (x )
0.2
0.2
0.2
0.2
0.2
1
0.2
0.4
0.6
0.8
1.0

x fX ( x )
x  X
-2
-1
0
1
2
0
Since the sum of the deviations of the
possible values from the mean is useless as a
measure of dispersion, we compute the sum
of the squares of the deviations of the
possible values from the mean.
x
1
2
3
4
5
Sum
f X (x)
x  f X (x )
0.2
0.2
0.2
0.2
0.2
1
0.2
0.4
0.6
0.8
1.0

x  X
-2
-1
0
1
2
0
( x   X )2
4
1
0
1
4
10
However, this measure does not take into
account the relative probabilities of the
possible values. Therefore, we compute the
weighted sum of the squares of the
deviations of the possible values from the
mean, where the weight of each term is
given by the corresponding probability.
x
1
2
3
4
5
Sum
f X (x) x  f X (x )
0.2
0.2
0.2
0.2
0.2
1
0.2
0.4
0.6
0.8
1.0

x  X
-2
-1
0
1
2
0
( x   X ) 2 ( x   X )2  f X ( x)
4
0.8
1
0.2
0
0.0
1
0.2
4
0.8
10
2
This weighted sum is called the variance of
X and is denoted by V ( X ) .
Similar computations show that V (Y ) is less
than V ( X ) .
Y = E( Y ) = mean of Y =  y  fY ( y)
y
fY ( y )
y  fY ( y )
y  Y
1.0
1.5
2.0
2.5
3.0
3.5
4.0
4.5
5.0
Sum
0.04
0.08
0.12
0.16
0.20
0.16
0.12
0.08
0.04
1
0.04
0.12
0.24
0.40
0.60
0.56
0.48
0.36
0.30

-2.00
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
2.00
0
( y  Y ) 2 ( y   Y ) 2  f Y ( y )
4.00
2.25
1.00
2.25
0.00
0.25
1.00
2.25
4.00
15
0.16
0.18
0.12
0.04
0.00
0.04
0.12
0.18
0.16
1.0
In general, the variance of any finite random
variable, X, is given by
V (X ) 
2
(
x


)
* f X ( x) .

X
all possible x
V ( X ) is one measure of dispersion.
However, the square root of V ( X ) is the
preferred measure of dispersion.
This square root is called the standard
deviation of X and is denoted by  X .
  X is measured in the same units as X
and  X .

 X is interpreted as the “typical
amount” by which an observation of X
will differ from  X .
 X  2  1.4142
Y  1  1
The p.m.f. of X, the number of Americans in
a sample of size four who own a cell phone
is given below.
x
f X (x)
0
1
2
3
4
0.04100625
0.20047500
0.36753750
0.29947500
0.09150625
Find V ( X ) and  X .
 X = E( X ) = mean of X = 
x
0
1
2
3
4
Sum
f X (x)
x  f X (x )
x  X
0.04100625
0.20047500
0.36753750
0.29947500
0.09150625
1
0.000000
0.200475
0.735075
0.898425
0.366025

-2.2
-1.2
-0.2
0.8
1.8
-1.0
V ( X )  0.99
 X  0.99  0.995
x fX ( x )
( x   X ) 2 ( x   X )2  f X ( x)
4.84
1.44
0.04
0.64
3.24
10.2
0.19847025
0.28868400
0.01470150
0.19166400
0.29648025
0.99
X is a binomial random variable with
parameters n=4 and p=0.55.
If X is a binomial random variable with
parameters n and p, then
V ( X )  n * p * (1  p) , and
 X  n * p * (1  p) .
V ( X )  4 * 0.55 * (1  0.55)  0.99
 X  4 * 0.55 * (1  0.55)  0.995
The number, X, of Americans in a sample of
size ten who own at least one credit card is a
binomial random variable with n  10 and
p  0.76 .
Find V ( X ) and  X .
V ( X )  n  p  (1  p )
 10  0.76  (1  0.76)
 1.824
 X  V (X )
 1.824
1.351
Recall that the formula for the expected
value of a continuous random variable is
similar to the formula for the expected value
for a finite random variable.
 x * f X ( x) if X is a finite
E( X ) 
all possible x
random variable, and

E( X ) 
 x * f X ( x) dx if X is a continuous
 
random variable.
The same similarity exists in the formulas
for the variance.
2
(
x


)
* f X ( x)

X
V (X ) 
all possible x
if X is a finite random variable, and

V (X ) 
2
(
x


)
* f X ( x) dx
X

 
if X is a continuous random variable.
Again  X  V (X ) .
The p.d.f. of X(exponential random
variable), the time in minutes between the
arrivals/departures of planes at the Phoenix
Sky Harbor airport, is given by
if x  0
0

f X ( x)   1  x
 e 1.2 if x  0.
1.2
Set up, but do not evaluate, an integral that
corresponds to V ( X ) .

V ( X )   ( x  1.2) 2 *
0
1 
e
1.2
x/1.2
dx
Use Integrating.xls to find V ( X ) .
 X  1.2
(show excel file-var-skyharbor-Integrating excel)
If X is an exponential random variable with
parameter  , then
E( X )  
V (X )   2
 X  .
The probability density function of a
continuous random variable, Y, is given by
1
 if 0  y  12
fY ( y )  12

0 elsewhere.
Use Integrating.xls to find E (Y ) .
Use Integrating.xls to find V (Y ) .
(show excel files- var e2-p1 and var e2-p2)
If X is a continuous uniform random
variable on
[ a, b] , then
ab
E( X ) 
2
2
(b  a )
V (X ) 
12
When the distribution of a random variable,
X, is unknown, the graph of the p.m.f. or
p.d.f. can be approximated by a histogram
of a random sample for X and the mean
of X can be estimated by the sample
mean.
Variance-Samples
Similarly, the variance of X can be estimated
by the sample variance, and the standard
deviation of X can be estimated by the
sample standard deviation.
The sample variance is given by
1 n
2
s 
(
x

x
)
,

i
n  1 i 1
2
and the sample standard deviation is given
by
s
s2 
1 n
2
(
x

x
)
.

i
n  1 i 1
A random sample for X is given below.
1, 4, 2, 5, 4, 2, 1, 5, 3, 2
Find s 2 and s.
Sum
x
1
4
2
5
4
2
1
5
3
2
29.0
x
2.9
( x  x)2
xx
-1.9
1.1
-0.9
2.1
1.1
-0.9
-1.9
2.1
0.1
-0.9
0
3.61
1.21
0.81
4.41
1.21
0.81
3.61
4.41
0.01
0.81
20.90
s2 
s  2.32  1.52
2.32
The sample mean of a sample of size n for a
1 n
random variable X is given by x   xi .
n i 1
Important
Since the value of this statistic varies from
sample to sample, x is a new random
variable.
We know that the expected value of the
sample mean is given by E ( x)   X .
The variance and standard deviation of the
sample mean are given by V ( x)  V ( X ) / n
and  x   X / n .
S
X 

Standardization Formula
Example
Let X be the exponential random variable with
parameter   4 . Recall that both the mean and
standard deviation of X are equal to 4. Let S be
the standardization of X. Compute P ( S  1) .
First express P ( S  1) in terms of a probability
for X, then use the formula for the probability
density function of X to finish the exercise.
Solution.
 X 4 
P ( S  1)  P
 1
 4

 P ( X  4  4)
 P( X  8)
 FX (8)
 1  e 8 / 4
 0.8647
Project Focus
Let R be the random variable that gives the
error in a signal from our class data.
Compute sample standard deviation, s, as an
assumed value for the standard deviation,
 R , of R.
(Show class auction data Excel file-variance
worksheet)
Download