Showing posts with label average. Show all posts
Showing posts with label average. Show all posts

Thursday, September 16, 2010

Mean

The mean is the average value in the dataset.

It is calculated by adding up the data values (x), then dividing by the number of items (n).

The mean of a sample is traditionally labelled x-bar. The mean of a population is labelled µ (mu).

sum(x)/n = x-bar

For example, find the mean of the following sample dataset:

10
12
1
16
10
11
13
6
15
6

sum(x) = 10+12+1+16+10+11+13+6+15+6 =100

n=10

x-bar = 100/10 = 10

The mean is 10.

It is also the "center" of the data - in the sense that the difference of each value from the mean will sum up to zero. This is because there are equal positive differences as there are negative.

Check this, using the above example:

10 - 10 = 0
12 - 10 = 2
1 - 10 = -9
16 - 10 = 6
10 - 10 = 0
11 - 10 = 1
13 - 10 = 3
6 - 10 = -4
15 - 10 = 5
6 - 10 = -4


0 + 2 + -9 + 6 + 0 + 1 + 3 + -4 + 5 + -4 = 0

The mean, median, and mode are all measures of central tendency. The skew can be determined by comparing these three measures.

Thursday, July 22, 2010

Variance

Variance represents how spread out the data are. It is the average of the squared differences from the mean.

The distances from the mean are calculated by subtracting each x from the mean. These distances are squared and then averaged to arrive at the variance.

Because the differences are squared, the result is in squared units - for example, if the measurements are "miles," then the variance is "miles^2". Therefore, the variance value does not intuitively describe the data. To overcome this, the square-root of the variance is taken. The square-root of variance is called standard deviation.

Here is an example data set:

miles driven (x): 43, 70, 27, 36
n = 4
mean = 44 miles

differences
43 - 44 = -1
70 - 44 = 26
27 -44 = -17
36 - 44 = -8

differences^2
(-1)^2 = 1
(26)^2 = 676
(-17)^2 = 289
(-8)^2 = 64

The average of the differences^2:
(1+676+289+64)/4 = 257.5

The variance is:
257.5 miles^2