Measures of position: arithmetic mean, mode and median

, محدث •0•0Comment iconComment iconComment iconComment icon

How to calculate the mean, mode and median for raw and grouped data, when to use each one, and what quartiles and percentiles are. With exercises.

Writer image

تمت الترجمة بواسطةEditorial

Writer image

تمت المراجعة بواسطةEditorial

تحرير المادة

Measures of position

What we have studied so far (frequency distributions) lets us describe, in general terms, the values a variable takes: we know where they are concentrated and how the frequency behaves.

However, to highlight the characteristic tendencies of each distribution, on its own or compared with others, we need measures expressed as numbers that summarize that tendency.

These measures are called the typical elements of the distribution:

  • measures of position;
  • measures of dispersion;
  • measures of skewness;
  • measures of kurtosis.

In this lesson we will study measures of position, which indicate where the distribution is located along the horizontal axis (the x-axis).

The main ones are the measures of central tendency:

  • arithmetic mean;
  • median;
  • mode.

Other measures of position are the quantiles (separatrices):

  • the median itself;
  • quartiles;
  • deciles;
  • percentiles.

Arithmetic mean

Mean of ungrouped data

The simple arithmetic mean is the sum of the values of the variable divided by the number of values:

\[ \bar{x} = \frac{\sum{x_i}}{n} \]

The mean may be a number different from every value in the series it represents. An example:

Cow A's milk production during one week was 10, 12, 13, 13, 15, 16 and 19 liters. What was the average production for the week?

\[ \bar{x} = \frac{10 + 12 + 13 + 13 + 15 + 16 + 19}{7} = \frac{98}{7} = 14 \]

The value 14 represents this data series, even though it does not appear in the original data. In this case, we say that the mean has no concrete existence.

Notice that the mean gives us a position for the data set: knowing that the mean is 14 liters a day, we expect days with production in that range, not days of 100 liters or negative production.

Deviation from the mean

We call deviation from the mean the difference between each element of a set of values and the arithmetic mean.

For each value in the data set:

\[ d_i = x_i - \bar{x} \]

In the previous example:

\[ d_1 = x_1 - \bar{x} = 10 - 14 = -4 \]

\[ d_2 = 12 - 14 = -2 \]

\[ d_3 = 13 - 14 = -1 \]

\[ d_4 = 13 - 14 = -1 \]

\[ d_5 = 15 - 14 = 1 \]

\[ d_6 = 16 - 14 = 2 \]

\[ d_7 = 19 - 14 = 5 \]

Properties of the mean

1st - The algebraic sum of the deviations from the mean is zero.

In the example:

\[ d_1 + d_2 + d_3 + d_4 + d_5 + d_6 + d_7 = -4 - 2 - 1 - 1 + 1 + 2 + 5 = 0 \]

2nd - If a constant c is added to (or subtracted from) all the values of a variable, the mean of the set increases (or decreases) by that constant.

\[ \frac{\sum{(x_i + c)}}{n} = \bar{x} + c \]

In the cow example, adding 5 to each value gives 15, 17, 18, 18, 20, 21, 24. The mean:

\[ \frac{15 + 17 + 18 + 18 + 20 + 21 + 24}{7} = \frac{133}{7} = 19 = 14 + 5 \]

3rd - If all the values of a variable are multiplied (or divided) by a constant c, the mean of the set is multiplied (or divided) by that constant.

\[ \frac{\sum{(x_i \cdot c)}}{n} = \bar{x} \cdot c \]

In the cow example, multiplying each value by 2 gives 20, 24, 26, 26, 30, 32, 38. The mean:

\[ \frac{20 + 24 + 26 + 26 + 30 + 32 + 38}{7} = \frac{196}{7} = 28 = 14 \cdot 2 \]

Mean of grouped data: without class intervals

The table below shows the distribution of 34 families with 4 children each, taking as the variable the number of male children:

No. of boysFrequency
02
16
210
312
44

Since the frequency is the number of times each value repeats, it works as a weighting factor, which leads us to the weighted arithmetic mean:

\[ \bar{x} = \frac{\sum{x_i \cdot f_i}}{\sum{f_i}} \]

For the table:

\[ \bar{x} = \frac{0 \cdot 2 + 1 \cdot 6 + 2 \cdot 10 + 3 \cdot 12 + 4 \cdot 4}{2 + 6 + 10 + 12 + 4} = \frac{78}{34} \approx 2.3 \]

The mean of 2.3 boys per family indicates that, in these families of 4 children, there are on average slightly more boys (2.3) than girls (1.7). Note that the mean does not tell us the most common case: the largest number of families (12) have 3 boys.

Mean of grouped data: with class intervals

In this case, by convention, all values within a class interval are taken to be equal to its midpoint.

Consider the height distribution from the previous lesson. Since heights were measured in whole centimeters, class 150 —| 155 (above 150 and up to 155) gathers heights from 151 to 155 cm, and its midpoint is 153:

Height (cm)FrequencyMidpoint
150 —| 1558153
155 —| 16011158
160 —| 16513163
165 —| 1701168

From there, we calculate as if there were no intervals, using the midpoint as the value of each class:

\[ \bar{x} = \frac{8 \cdot 153 + 11 \cdot 158 + 13 \cdot 163 + 1 \cdot 168}{8 + 11 + 13 + 1} = \frac{5249}{33} \approx 159.06 \]

Because the midpoint convention is an approximation, the result is close to, but not equal to, the mean computed from the 33 original values (159.12 cm).

A salesperson earned commissions of $200, $250, $300, $350 and $400 over five months. If the company adds a fixed bonus of $50 per month and then doubles every amount, what will the new monthly mean be?

Loading icon

Answer: $700 — the original mean is 1500 / 5 = 300; adding 50 to every value takes the mean to 350 (property 2), and doubling every value takes it to 700 (property 3). Doubling before adding the bonus gives 650, but the question adds first.

In a class, 10 students scored 6, 5 scored 8 and 5 scored 10. What is the class's mean score?

Loading icon

Answer: 7.5 — it is a weighted mean: (10 × 6 + 5 × 8 + 5 × 10) / 20 = 150 / 20 = 7.5. The answer 8.0 is the simple mean of the three scores, (6 + 8 + 10) / 3, which ignores that the score 6 appears twice as often.

Mode

We call mode the value that occurs most frequently in a series of values.

For example, the modal salary of the employees of a factory is the most common salary, that is, the salary received by the largest number of employees.

Mode of ungrouped data

With ungrouped data, the mode is easy to spot: by definition, just look for the value that repeats most. Example: in the series 7, 8, 9, 10, 10, 10, 10, 11, 12, 13 and 15, the mode is 10.

In some cases there is no modal value (an amodal series), that is, no value appears more often than the others.

In other cases there may be two or more values of concentration: the series is then bimodal or multimodal.

Mode of grouped data

With data grouped without class intervals, the mode is immediate: just take the value of the variable with the highest frequency. In the family example, the mode is 3 boys (12 families).

With class intervals, the class with the highest frequency is called the modal class. By definition, the mode is a value within the limits of the modal class.

The simplest way to calculate the mode is to take the midpoint of the modal class, which is called the crude mode. In the height example, the modal class is 160 —| 165 (13 students) and the crude mode is 163 cm.

Mode curves

In the figure, from top to bottom: modal, non-modal and amodal curves; antimodal (U-shaped) and bimodal curves; trimodal curve.

Image content of the Website

Why use the mode instead of the mean

  • It is not affected by extreme values of the distribution, as long as those values are not the modal value;
  • It is used when we want a quick, approximate measure of position;
  • It is the only one of the three that works for nominal qualitative variables (the best-selling car color, for example);
  • It is widely used in economic and industrial statistics (the best-selling clothing size, the most common salary).

A shoe shop wants to decide which shoe size to buy in the largest quantity next month. Which measure of position of past sales best answers this question?

Loading icon

Answer: The mode — it is the best-selling size, exactly what the shop needs to restock most. The mean may give a size that does not even exist (8.4), and the median only splits sales in half; the range is not even a measure of position.

Median

The median is the value in the middle of a series of numbers arranged in order: the number of observations smaller than the median equals the number of observations larger than it.

Median of ungrouped data

Given the series 5, 13, 10, 2, 18, 15, 6, 16, 9, the first step is to sort the values: 2, 5, 6, 9, 10, 13, 15, 16, 18.

Then we take the central value, which has the same number of elements to its right and to its left. If the series has an odd number of data points, this is possible: in the example, the median is 10 (four values before and four after). If the series has an even number of data points, the median is the mean of the two central values.

For example, in the series 2, 6, 7, 10, 12, 13, 18, 21, the number of terms is even (8). The central terms are 10 and 12, and the median is (10 + 12) / 2 = 11.

Median of grouped data: without class intervals

With grouped data, we compute half the sum of the frequencies (n/2) and look for the first cumulative frequency that exceeds that value. The median is the value of the variable corresponding to that cumulative frequency.

No. of boysFrequencyCumulative frequency
022
168
21018
31230
4434

\[ \frac{n}{2} = \frac{34}{2} = 17 \]

The first cumulative frequency greater than 17 is 18, in the third row, which corresponds to the value 2. So the median is 2. (Check: with 34 values, the median is the mean of the 17th and 18th values, and both equal 2.)

Watch out for the special case: if some cumulative frequency is exactly equal to n/2, the median is the mean of the value in that row and the value in the next row. For example, if the cumulative frequency of the value 2 were exactly 17, the median would be (2 + 3) / 2 = 2.5.

Median of grouped data: with class intervals

Height (cm)FrequencyCumulative frequency
150 —| 15588
155 —| 1601119
160 —| 1651332
165 —| 170133

Since the sum of the frequencies is 33, the reference position is n/2 = 16.5. The first cumulative frequency above 16.5 is 19, in class 155 —| 160, which contains the 9th to the 19th terms. This is the median class.

Within the median class, we assume the values are spread uniformly and use a rule of three: the class has 11 elements and there are already 8 before it; 16.5 − 8 = 8.5 elements are still needed to reach the median. The formula is:

\[ Md = l + \frac{\frac{n}{2} - F_{prev}}{f_{Md}} \cdot h \]

Where:

l = lower limit of the median class;

Fprev = cumulative frequency of the class before the median class;

fMd = frequency of the median class;

h = width of the median class.

Since the heights are whole numbers, class 155 —| 160 runs from 156 to 160 cm, and its true lower limit is 155.5 (halfway between 155 and 156), with width 5:

\[ Md = 155.5 + \frac{16.5 - 8}{11} \cdot 5 = 155.5 + 3.86 \approx 159.36 \]

With the 33 original values, the exact median is 160 cm (the 17th value in order); the calculation with classes gives an approximation.

Why use the median and not the mean

  • When we want the point that splits the distribution into two equal parts;
  • When there are extreme values that distort the mean, as with salaries, house prices and income;
  • When the distribution is skewed.

In a symmetric distribution, mean, median and mode coincide. In a skewed distribution, the mean is pulled toward the long tail, and the median lies between the mode and the mean (in the figure: moda = mode, mediana = median, média = mean):

Image content of the Website

The comic strip below plays on this: a single extreme value (the guy who eats 40 spiders a day) pulls the mean up, while the median stays at zero. (The story that we swallow 8 spiders a year in our sleep is itself a myth.)

How many spiders, on average, do people eat per year?
How many spiders, on average, do people eat per year?

The salaries of the five employees of a small company are $2,000, $2,200, $2,500, $2,800 and $30,000 (the owner's). Which measure best represents the typical salary, and what is its value?

Loading icon

Answer: The median, $2,500 — with the values in order, the middle one is 2,500. The mean is 39,500 / 5 = $7,900, pulled up by the owner's salary, and represents nobody. There is no mode, since no value repeats.

Other measures of position

Like the median, which is based on the position of values in the ordered series, there are quartiles, deciles and percentiles, which, together with the median, are called quantiles (in Portuguese textbooks, separatrizes).

Instead of splitting the ordered series into two halves, they split it into four parts (quartiles), ten parts (deciles) or a hundred parts (percentiles). The first quartile (Q1) has 25% of the values below it; the second quartile is the median itself; and the third quartile (Q3) has 75% below it.

Quartiles are widely used to compare distributions, for example stock returns, salaries or delivery times, in the box plot: the box goes from Q1 to Q3 and holds the middle 50% of the data, and the whiskers show how far the lowest and highest values reach.

Image content of the Website

In a competitive exam, a candidate scored at the 90th percentile. What does that mean?

Loading icon

Answer: About 90% of the candidates scored less than or equal to her — a percentile describes position relative to the others, not the percentage of correct answers. She is in the top 10%, whatever her score was.

Exercises

1) Determine the deviations from the mean of the following data: 6; 8; 5; 12; 11; 7.4; 15; 7.2. What is the sum of the deviations?

2) Consider the data sets:

a) 3.5; 2.6; 5.9; 5.2; 8.6

b) 20.9; 7.2; 12.7; 20; 15.7

c) 51.6; 48.7; 50.3; 49.5; 48.9

d) 15; 18; 20; 13; 10; 16; 14

Calculate, for each one:

I. the mean;

II. the median;

III. the mode.

3) Choose the correct option. The cumulative frequency curve is used to calculate:

a) the law of chance;

b) the mean;

c) the median;

d) the mode;

e) the standard deviation.

4) Choose the correct option. A symmetric curve is characterized by the following attribute:

a) It is skewed to the left.

b) The mode is greater than the median and the mean.

c) The mode, the median and the mean are equal.

d) The standard deviation is greater than the median and the mode.

e) The deciles are equivalent to the mean.

5) Calculate the arithmetic mean, the mode and the median of the following distribution:

GradesFrequency
0 |— 25
2 |— 48
4 |— 614
6 |— 810
8 |—| 107

6) Calculate the arithmetic mean, the mode and the median of the following distribution:

Heights (cm)Frequency
150 |— 1585
158 |— 16612
166 |— 17418
174 |— 18227
182 |— 1908

7) Calculate the arithmetic mean, the mode and the median of the following distribution:

Salaries (R$, Brazilian reais)Frequency
500 |— 70018
700 |— 90031
900 |— 1,10015
1,100 |— 1,3003
1,300 |— 1,5001
1,500 |— 1,7001
1,700 |— 1,9001

8) Calculate the arithmetic mean, the mode and the median of the following distribution:

Weights (kg)Frequency
145 |— 15110
151 |— 1579
157 |— 1638
163 |— 1696
169 |— 1753
175 |— 1813
181 |— 1871

9) Calculate the arithmetic mean, the mode and the median of the following distribution:

Customer ratingFrequency
23
47
612
88
104

Answer key

1) The mean is 71.6 / 8 = 8.95; the deviations are −2.95; −0.95; −3.95; 3.05; 2.05; −1.55; 6.05; −1.75. The sum of the deviations is zero (and always will be, by the 1st property of the mean).

2) a) x̄ = 5.16; Md = 5.2; no mode

b) x̄ = 15.3; Md = 15.7; no mode

c) x̄ = 49.8; Md = 49.5; no mode

d) x̄ ≈ 15.1; Md = 15; no mode

3) c

4) c

5) x̄ ≈ 5.3; Md ≈ 5.3; Mo (crude) = 5

6) x̄ = 172.4; Md = 174; Mo (crude) = 178

7) x̄ ≈ 843; Md ≈ 810; Mo (crude) = 800

8) x̄ = 159.4; Md ≈ 157.8; Mo (crude) = 148

9) x̄ ≈ 6.18; Md = 6; Mo = 6

ما رأيك في هذا المقال؟

0%
تقييم المستخدمين (0)

شارك هذا المقال!

المواضيع estatísticamoda