girgit.org

Statistics

Mean deviation for a frequency table

The big ideaWhen a value repeats, a frequency table counts it once and records how often it occurs, so in the mean deviation each distance \( |x_i - a| \) is multiplied by its frequency \( f_i \) and the total is divided by \( N = \sum f_i \).

In simple words

If ten children in a class wear the same shoe size, you don't write that size ten times. You write it once and put "10" next to it. When you count steps from the middle, those ten children all take the same number of steps, so you count that number ten times. Then you share the total among all the children.

Grouped data

Data can be grouped in two ways:

  • (a) a discrete frequency distribution: separate values \( x_1, x_2, \ldots, x_n \) occurring \( f_1, f_2, \ldots, f_n \) times (shoe sizes, family sizes, goals in a match);
  • (b) a continuous frequency distribution: values sorted into class intervals such as 10–20, 20–30 (heights, marks, travel times). That one comes on the next two pages.

The frequency \( f_i \) is how many times \( x_i \) occurs, and \( N = \sum_{i=1}^{n} f_i \) is the total number of observations.

Mean deviation about the mean

First find the mean of the distribution:

\[ \bar{x} = \frac{\sum_{i=1}^{n} f_i x_i}{\sum_{i=1}^{n} f_i} = \frac{1}{N}\sum_{i=1}^{n} f_i x_i \]

Here \( \sum f_i x_i \) adds each value times how often it occurs. Then find each \( |x_i - \bar{x}| \), weight it by \( f_i \), and average over all \( N \) observations:

\[ \text{M.D.}(\bar{x}) = \frac{1}{N}\sum_{i=1}^{n} f_i\,|x_i - \bar{x}| \]

Worked example 1: shoe sizes

The shoe sizes of 40 students are below. Find the mean deviation about the mean.

Size \( x_i \)\( f_i \)\( f_i x_i \)\( |x_i - \bar{x}| \)\( f_i |x_i - \bar{x}| \)
53152.57.5
67421.510.5
710700.55.0
811880.55.5
95451.57.5
104402.510.0
Total4030046
  1. \( N = 40 \), \( \sum f_i x_i = 300 \), so \( \bar{x} = \frac{300}{40} = 7.5 \). Now fill the last two columns.
  2. \( \sum f_i |x_i - \bar{x}| = 46 \).
  3. M.D.\( (\bar{x}) = \frac{46}{40} = 1.15 \).

Try it: change how many students wear each size and watch every term of the sum move.

Mean deviation about the median

To find the median of a discrete distribution, the values must be in ascending order. Add a column of cumulative frequency (c.f.), the running total of the frequencies. The median is the value whose c.f. is equal to or just greater than \( \frac{N}{2} \): that value sits in the middle of the data. Then

\[ \text{M.D.}(\text{M}) = \frac{1}{N}\sum_{i=1}^{n} f_i\,|x_i - \text{M}| \]

Worked example 2: days absent

The number of days 40 students were absent in a term is given below. Find the mean deviation about the median.

Days \( x_i \)\( f_i \)c.f.\( |x_i - \text{M}| \)\( f_i |x_i - \text{M}| \)
166212
21016110
382400
452915
543328
8437520
12340927
Total4082
  1. \( N = 40 \) is even, so the median is the mean of the 20th and 21st observations.
  2. Read down the c.f. column: 16 is too small, 24 is the first c.f. at least 20. So the 17th to 24th observations are all 3, which includes both the 20th and 21st. M \( = \frac{3 + 3}{2} = 3 \).
  3. Fill the last two columns; their total is 82.
  4. M.D.(M) \( = \frac{82}{40} = 2.05 \).

The mean here is \( \frac{158}{40} = 3.95 \), pulled up by the three students with 12 days away. The median, 3, stays with the crowd.

Try it: line all 40 students up and walk along the queue to the middle.

Don't mix these up

  • Divide by \( N = \sum f_i \), the number of observations, not by \( n \), the number of different values (40, not 6 or 7).
  • Multiply each \( |x_i - a| \) by its own \( f_i \) before adding. Adding the \( |x_i - a| \) alone treats every value as if it occurred once.

Try it. Find the mean deviation about the mean: \( x_i \): 2, 4, 6, 8, 10 with \( f_i \): 3, 5, 9, 5, 3.

Answer
\( N = 25 \), \( \sum f_i x_i = 6 + 20 + 54 + 40 + 30 = 150 \), \( \bar{x} = 6 \). \( |x_i - 6| \): 4, 2, 0, 2, 4. \( \sum f_i|x_i - 6| = 12 + 10 + 0 + 10 + 12 = 44 \). M.D. \( = \frac{44}{25} = 1.76 \).

Words to know

Frequency \( f_i \)
How many times the value \( x_i \) occurs.
N
\( \sum f_i \), the total number of observations.
Discrete frequency distribution
A table of separate values with their frequencies.
Continuous frequency distribution
A table of class intervals, with no gaps, and their frequencies.
Cumulative frequency (c.f.)
The running total of the frequencies down the table.

Values \( x \): 1, 2, 3, 4 occur with frequencies 5, 3, 4, 8. What is the median?

  1. 2.5
  2. 3
  3. 4

In a frequency table, \( \sum f_i |x_i - \bar{x}| = 60 \), there are 6 distinct values and \( N = 30 \). What is M.D.\( (\bar{x}) \)?

  1. 10
  2. 2
  3. 60