Download Sample Variance

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts
no text concepts found
Transcript
2.3.
Measures of Dispersion (Variation):
The variation or dispersion in a set of values refers to how spread
out the values are from each other.
·
·
The variation is small when the values are close together.
There is no variation if the values are the same.
Larger variation
Smaller variation
·
Same
Center
Smaller variation
Larger variation
Some measures of dispersion:
Range – Variance – Standard deviation
Coefficient of variation
Range:
Range is the difference between the largest (Max) and smallest (Min)
values.
Range = Max  Min
Example:
Find the range for the sample values: 26, 25, 35, 27, 29, 29.
Solution:
Range = 35  25 = 10
(unit)
Note:
The range is not useful as a measure of the variation since it only
takes into account two of the values. (it is not good)
Variance:
The variance is a measure that uses the mean as a point of reference
·
The variance is small when all values are close to the mean.
·
The variance is large when all values are spread out from the mean
Squared deviations from the mean:
X1
X2
x
(X1 
x
)2 (X2 
x
)2
(Xn 
x
Xn
)2
(1)
Population variance:
Let X 1 , X 2 ,  , X N be the population values.
The population variance is defined by:
N
2


X


2
2
2

i






X



X





X


2
N
 2  i 1
 1
N
(unit)2
N
N
where  
 Xi
i 1
is the population mean.
N
Notes:
2
·
is a parameter because it is obtained from the population
values (it is unknown in general).
· 2  0
(2) Sample Variance:
Letx1 , x 2 ,  , x n be the sample values.
The sample variance is defined by:
 xi
n
S 
2
x
i 1
 x

2
1
n 1
x
  x
2

2
2

 x    xN  x
n 1

2
(unit)2
n
Where x 
 xi
i 1
n
is the sample mean
Notes:
·
S2 is a statistic because it is obtained from the sample values (it
is known).
2
2
·
S is used to approximate (estimate)
.
2
· S 0
Example:
We want to compute the sample variance of the following sample
values: 10, 21, 33, 53, 54.
Solution:
n=5
5
 xi
10  21  33  53  54 171
x


 34.2
5
5
5
i 1
 x  x 
n
S 
2
i 1
5
2
i
n 1
(unit)

2


x

34
.
2
 i
i 1
5 1
2
2
2
2
2










10

34
.
2

21

34
.
2

33

34
.
2

53

34
.
2

54

34
.
2
S2 
4
1506.8

 376.7 (unit) 2
4
Another method:
xi
x
xi
10
21
33
53
54
5
 xi
i

x 
 34.2 
-24.2
-13.2
-1.2
18.8
19.8
 171
i 1
S 
2
x
i 1
 nx
n 1
x 
xi
 34.2
2
* Simple
* More accurate
2
585.64
174.24
1.44
353.44
392.04
2
i 1
2
i

i
 xi  x   0  xi  x
5
Calculating Formula for S2:
n
x
5
2
 1506 .8
x

 xi
i 1
5
171
 34.2
5
1506 .8
S 
4
 376.7
2
Note:
To calculate S2 we need:
·
n = sample size
·  x i  The sum of the values
·  xi2  The sum of the squared values
For the above example:
xi
10
21
xi2
100
441
33
53
54
 xi
 171
1089 2809 2916  x i2  7355
7355  534.2
1506 .8
2
(unit)2
S 

 376.7
5 1
4
Standard Deviation:
·
The standard deviation is another measure of variation.
·
It is the square root of the variance.
2
(1) Population standard deviation is:    2
(2) Sample standard deviation is:
S  S2
(unit)
(unit)
Example:
For the previous example, the sample standard deviation is
S  S 2  376.7  19.41
(unit)
Coefficient of Variation (C.V.):
· The variance and the standard deviation are useful as measures
of variation of the values of a single variable for a single
population (or sample).
· If we want to compare the variation of two variables we cannot
use the variance or the standard deviation because:
1. The variables might have different units.
2. The variables might have different means.
· We need a measure of the relative variation that will not depend
on either the units or on how large the values are. This measure is the
coefficient of variation (C.V.) which is defined by:
S
C.V  *100%
x
1st
data set
2nd data set
(free of unit or unit less)
Mean
St.dev.
C.V.
x1
S1
S1
C.V1  100 %
x1
x2
S2
S2
C.V2  100 %
x2
· The relative variability in the 1st data set is larger than the relative
variability in the 2nd data set if C.V1> C.V2 (and vice versa).
Example:
1st data set:
x 1  66 kg,
 C.V1 
2nd data set:
4.5
* 100%  6.8%
66
x 2  36 kg,
 C.V2 
S 2  4.5 kg
S 2  4.5 kg
4.5
* 100%  12.5%
36
Since C.V1  C.V2 , the relative variability in the 2nd data set is larger
than the relative variability in the 1st data set.
Notes: (Some properties of x , S, and S2:
Sample values are : x1 , x 2 ,  , x n
a and b are constants
Sample Data
Sample
mean
Sample
st.dev.
Sample
Variance
S
ax1 , ax 2 ,  , ax n
x
ax
aS
S2
a2S 2
x1  b, ,, xn  b
xb
S
S2
aS
a2S 2
x1 , x 2 ,  , x n
ax1  b,  , ax n  b a x  b
Absolute value:
a 
a
a
if a  0
if a  0
Example:
(1)
(2)
(3)
Data (1)
(2)
Sample
Sample
mean
Sample
St..dev.
Sample
Variance
C. V.
1,3,5
3
2
4
66.7%
-2, -6, -10
11, 13, 15
8, 4, 0
-6
13
4
4
2
4
16
4
16
66.7%
15.4%
100%
 2 x1 ,2 x2 ,2 x3
(a = 2)
x1  10 , x 2  10 , x 3  10
(b = 10)
(3)  2x1  10 ,  2x 2  10 ,  2x 3  10
(a = 2, b = 10)
Can C. V. exceed 100%?
Data: 10,1,1,0
Mean=3
Variance=22
STDEV=4.6904
C. V.=156.3%
Related documents