Chapter 2

Table of contents

  1. Numerical Description of Data
  2. Comparison of Dispersion Measures
  3. Exercises

1. Numerical Description of Data

1.1 Measures of Central Tendency (Position)

Measures of central tendency provide a single value that represents the typical or middle value of a dataset. These measures help in understanding the center of the data distribution 1.

1.2 Arithmetic Mean

The arithmetic mean, commonly known as the average, is calculated by summing all values in a dataset and dividing by the total number of values. It is best suited for data that are additive, such as heights, ages, or temperatures 1.

  • Raw Data: For NN values x1,x2,…,xNx_1, x_2, \dots, x_N, the mean xˉ\bar{x} is ∑i=1NxiN\frac{\sum_{i=1}^{N} x_i}{N}.
  • Frequency Data: If a value xix_i appears nin_i times, and N=∑i=1kniN = \sum_{i=1}^{k} n_i, the mean is xˉ=∑i=1knixiN\bar{x} = \frac{\sum_{i=1}^{k} n_i x_i}{N} 1.
  • Grouped Data (Classes): For data grouped into classes, the midpoint mi=ai+bi2m_i = \frac{a_i + b_i}{2} of each class is used. The mean is xˉ=∑i=1knimiN\bar{x} = \frac{\sum_{i=1}^{k} n_i m_i}{N} 2.

Example 2.2. Arithmetic Mean - Raw Data Data: 2, 4, 6, 8 (N = 4). xˉ=2+4+6+84=204=5\bar{x} = \frac{2+4+6+8}{4} = \frac{20}{4} = 5 2.

Example 2.3. Arithmetic Mean - Frequency Data

Value (xix_i)Frequency (nin_i)nixin_i x_i
122
224
3618
414
Total1026

xˉ=2610=2.6\bar{x} = \frac{26}{10} = 2.6 2.

Example 2.4. Arithmetic Mean - Grouped Data

Classnin_imim_inimin_i m_i
[10, 20[41560
[20, 30[625150
[30, 40[835280
[40, 50[24590
Total20—580

xˉ=58020=29\bar{x} = \frac{580}{20} = 29 2.

  • Properties of the Arithmetic Mean: 2.
  • It uses every value in the data.
  • It is sensitive to outliers.
  • The sum of deviations from the mean is always zero: ∑(x−xˉ)=0\sum (x - \bar{x}) = 0.

1.3 Weighted Mean

The weighted mean is used when certain values in a dataset are considered more important than others. Each value xix_i is multiplied by a weight wi>0w_i > 0, which reflects its significance 3.

  • Formula: The weighted mean is calculated as xˉw=∑i=1kwixi∑i=1kwi\bar{x}_w = \frac{\sum_{i=1}^{k} w_i x_i}{\sum_{i=1}^{k} w_i} 3.

Example 2.7. Weighted Mean - University Marks A student's marks and their credit coefficients are: Maths (14, 3), Physics (10, 2), English (16, 1). The weighted mean mark is (3×14)+(2×10)+(1×16)3+2+1=42+20+166=786=13\frac{(3 \times 14) + (2 \times 10) + (1 \times 16)}{3+2+1} = \frac{42 + 20 + 16}{6} = \frac{78}{6} = 13 3.

1.4 Geometric Mean

The geometric mean is appropriate for data that are multiplicative in nature, such as growth rates, ratios, or index numbers. All values in the dataset must be positive 3.

  • Formula: G=(∏i=1Nxi)1/NG = (\prod_{i=1}^{N} x_i)^{1/N} or G=x1⋅x2⋅⋯⋅xNNG = \sqrt[N]{x_1 \cdot x_2 \cdot \dots \cdot x_N} 4.
  • Frequency Data: G=(∏i=1kxini)1/NG = (\prod_{i=1}^{k} x_i^{n_i})^{1/N}.
  • Logarithmic Form: log⁡G=1N∑i=1Nlog⁡xi\log G = \frac{1}{N} \sum_{i=1}^{N} \log x_i 3.

Example 2.9. Geometric Mean - Growth Rates A population grows by 10%, then 20%, then 50% over three years. The multipliers are 1.10, 1.20, 1.50. G=(1.10×1.20×1.50)1/3=(1.98)1/3≈1.256G = (1.10 \times 1.20 \times 1.50)^{1/3} = (1.98)^{1/3} \approx 1.256. The average growth rate is approximately 25.6% per year 3.

Example 2.10. Geometric Mean - Investment An investment grows by +50% one year and -50% the next year. Multipliers: 1.50 and 0.50. G=(1.50×0.50)1/2=0.75≈0.866G = (1.50 \times 0.50)^{1/2} = \sqrt{0.75} \approx 0.866. The average yearly rate is -13.4% (a loss), not 0% 4.

1.5 Harmonic Mean

The harmonic mean is used for rates and speeds, such as km/h or price per unit. It gives more weight to smaller values 4.

  • Formula: H=N∑i=1N1xiH = \frac{N}{\sum_{i=1}^{N} \frac{1}{x_i}}.
  • Frequency Data: H=N∑i=1knixiH = \frac{N}{\sum_{i=1}^{k} \frac{n_i}{x_i}} 4.

Example 2.12. Harmonic Mean - Average Speed A car travels 100 km at 50 km/h, then 100 km at 100 km/h. H=2150+1100=20.02+0.01=20.03≈66.67H = \frac{2}{\frac{1}{50} + \frac{1}{100}} = \frac{2}{0.02 + 0.01} = \frac{2}{0.03} \approx 66.67 km/h. The arithmetic mean would be incorrect because the car spends more time at the slower speed 4.

  • Ordering of the Means: For positive data, the means satisfy H≤G≤xˉH \le G \le \bar{x} 4.

1.6 Comparison of the Four Means 4

MeanFormulaBest used for
Arithmetic\bar{x} = \frac{\sum x_i}{N}Everyday averages: heights, ages, grades.
Weighted\bar{x}_w = \frac{\sum w_i x_i}{\sum w_i}Averages with unequal importance (credits, prices).
GeometricG = (\prod x_i)^{1/N}Growth rates, ratios, index numbers.
HarmonicH = \frac{N}{\sum \frac{1}{x_i}}Rates and speeds (km/h, price per unit).

1.7 The Mode (Mo)

The mode is the value that appears most frequently in a dataset. It is the only measure of central tendency that can be used for qualitative data, such as colors or brands, and a dataset can have multiple modes or no mode 5.

  • Raw Data: The mode is the value with the highest count.
  • Grouped Data (Equal Widths): The mode is calculated using the formula Mo=a+h⋅d1d1+d2Mo = a + h \cdot \frac{d_1}{d_1 + d_2}, where aa is the lower limit of the modal class, hh is the class width, d1d_1 is the difference between the modal class frequency and the previous class frequency, and d2d_2 is the difference between the modal class frequency and the next class frequency.
  • Grouped Data (Unequal Widths): When class widths differ, frequency density (di=ni/hid_i = n_i / h_i) is used to identify the modal class (the class with the highest density). The formula for the mode remains the same, using densities instead of frequencies for d1d_1 and d2d_2 5.

Example 2.16. Mode - Raw Data (single mode) Data: 1, 2, 2, 3, 3, 3, 4, 5. The value 3 appears most often (3 times), so Mo=3Mo = 3 5.

Example 2.17. Mode - Raw Data (two modes) Data: 2, 2, 5, 5, 7, 8. Values 2 and 5 both appear twice. The data is bimodal: Mo1=2Mo_1 = 2, Mo2=5Mo_2 = 5 5.

Example 2.18. Mode - Raw Data (three modes) Data: 1, 1, 2, 2, 3, 3, 4, 5, 6. Values 1, 2, and 3 appear twice each. The data is trimodal: Mo1=1Mo_1 = 1, Mo2=2Mo_2 = 2, Mo3=3Mo_3 = 3 5.

Example 2.19. Mode - Raw Data (no mode) Data: 1, 2, 3, 4, 5. Every value appears once, so there is no mode 6.

Example 2.20. Mode - Raw Data (all frequencies equal) Data: 1, 1, 2, 2, 3, 3, 4, 4. Every value appears exactly twice. There is no mode 6.

Example 2.21. Mode - Qualitative Data Blood types of 20 patients: A, B, A, O, AB, A, O, A, B, O, O, A, B, A, AB, O, A, B, O, A.

Blood TypeFrequency
A8
B4
O6
AB2

The most frequent blood type is A, so Mo=AMo = A 6.

Example 2.22. Mode - Grouped Data (equal widths)

Classnin_ihih_iDensity
[0, 10[3100.3
[10, 20[8100.8
[20, 30[5100.5

The modal class is [10, 20[. a=10a = 10, h=10h = 10, d1=8−3=5d_1 = 8 - 3 = 5, d2=8−5=3d_2 = 8 - 5 = 3. Mo=10+10⋅55+3=10+10⋅58=10+6.25=16.25Mo = 10 + 10 \cdot \frac{5}{5+3} = 10 + 10 \cdot \frac{5}{8} = 10 + 6.25 = 16.25 6.

Example 2.24. Mode - Grouped Data (unequal widths, case 1)

Classnin_ihih_iDensity (did_i)
[0, 10[5100.5
[10, 20[14101.4
[20, 40[18200.9
[40, 50[3100.3

The modal class is [10, 20[ with the highest density (1.4). a=10a = 10, h=10h = 10, d1=1.4−0.5=0.9d_1 = 1.4 - 0.5 = 0.9, d2=1.4−0.9=0.5d_2 = 1.4 - 0.9 = 0.5. Mo=10+10⋅0.90.9+0.5=10+10⋅0.91.4≈10+6.43=16.43Mo = 10 + 10 \cdot \frac{0.9}{0.9 + 0.5} = 10 + 10 \cdot \frac{0.9}{1.4} \approx 10 + 6.43 = 16.43 6 7.

  • Finding the Mode from a Histogram: For equal class widths, identify the tallest bar. Draw lines connecting the top corners of the modal bar to the adjacent bars' top corners. The x-coordinate of their intersection is the mode. For unequal widths, use frequency density on the y-axis.
  • Key Points for Histogram Mode:.
  • Use frequency density for unequal widths.
  • The modal bar has the highest density, not necessarily the highest frequency.
  • The graphical method provides an approximation; the formula gives the exact value.
  • The mode is pulled towards the adjacent class with the higher frequency.
  • When to Use the Mode: Use the mode for the most frequent value or for qualitative data 8.

1.8 The Median (Me)

The median is the value that divides an ordered dataset into two equal halves, with 50% of the data below it and 50% above it. It is not affected by extreme values (outliers), making it robust 9.

  • Raw Data (Odd N): Sort the data. The median is the value at position N+12\frac{N+1}{2}.
  • Raw Data (Even N): Sort the data. The median is the average of the two middle values at positions N2\frac{N}{2} and N2+1\frac{N}{2} + 1 9.
  • Grouped Data: The median is calculated using the formula Me=a+h⋅N/2−Ni−1niMe = a + h \cdot \frac{N/2 - N_{i-1}}{n_i}, where [a,b[[a, b[ is the median class (the first class with cumulative frequency Ni≥N/2N_i \ge N/2), hh is the class width, Ni−1N_{i-1} is the cumulative frequency before the median class, and nin_i is the frequency of the median class 10.

Example 2.33. Median - Raw Data, Odd N Data: 7, 3, 9, 5, 11 (N = 5). Sorted: 3, 5, 7, 9, 11. Position = 5+12=3\frac{5+1}{2} = 3. Me=x(3)=7Me = x_{(3)} = 7 9.

Example 2.34. Median - Raw Data, Even N Data: 4, 8, 2, 6 (N = 4). Sorted: 2, 4, 6, 8. Positions = 42=2\frac{4}{2} = 2 and 42+1=3\frac{4}{2} + 1 = 3. Me=x(2)+x(3)2=4+62=5Me = \frac{x_{(2)} + x_{(3)}}{2} = \frac{4+6}{2} = 5 9.

Example 2.35. Median - Resistant to Outliers Dataset A = {2, 4, 6, 8, 10}: xˉA=6\bar{x}_A = 6, MeA=6Me_A = 6. Dataset B = {2, 4, 6, 8, 100}: xˉB=24\bar{x}_B = 24, MeB=6Me_B = 6.

The outlier 100 significantly changes the mean but not the median 9 10.

Example 2.36. Median - Grouped Data (equal widths)

Classnin_iNiN_i
[10, 20[44
[20, 30[610
[30, 40[818
[40, 50[220
[0, 10[33

N/2=10N/2 = 10. The median class is [20, 30[. a=20a = 20, h=10h = 10, Ni−1=4N_{i-1} = 4, ni=6n_i = 6. Me=20+10⋅10−46=20+10⋅66=20+10=30Me = 20 + 10 \cdot \frac{10 - 4}{6} = 20 + 10 \cdot \frac{6}{6} = 20 + 10 = 30 10.

Example 2.37. Median - Grouped Data (unequal widths)

Classnin_iNiN_ihih_i
[0, 10[5510
[10, 20[141910
[20, 40[183720
[40, 50[34010

N/2=20N/2 = 20. The median class is [20, 40[. a=20a = 20, h=20h = 20, Ni−1=19N_{i-1} = 19, ni=18n_i = 18. Me=20+20⋅20−1918=20+20⋅118≈20+1.11=21.11Me = 20 + 20 \cdot \frac{20 - 19}{18} = 20 + 20 \cdot \frac{1}{18} \approx 20 + 1.11 = 21.11 10.

1.9 Quartiles (Q1, Q2, Q3) and IQR

Quartiles divide an ordered dataset into four equal parts. Q1 is the value below which 25% of the data falls, Q2 is the median (50%), and Q3 is the value below which 75% of the data falls.

The Interquartile Range (IQR) measures the spread of the middle 50% of the data 11 13.

  • Raw Data: For k∈{1,2,3}k \in \{1, 2, 3\}, the position of QkQ_k is k(N+1)4\frac{k(N+1)}{4}. Interpolate if the position is not an integer 11.
  • Grouped Data: The formula is Qk=a+h⋅kN/4−Ni−1niQ_k = a + h \cdot \frac{kN/4 - N_{i-1}}{n_i}, where [a,b[[a, b[ is the class containing the kN/4kN/4-th individual, hh is the class width, Ni−1N_{i-1} is the cumulative frequency before that class, and nin_i is the frequency of that class 12.
  • Interquartile Range (IQR): IQR=Q3−Q1IQR = Q_3 - Q_1 13.

Example 2.41. Quartiles - Raw Data (position is integer) Data (sorted, N = 7): 2, 4, 5, 7, 9, 10, 12. Q1Q_1: position 1(7+1)4=2  ⟹  Q1=x(2)=4\frac{1(7+1)}{4} = 2 \implies Q_1 = x_{(2)} = 4. Q2Q_2: position 2(7+1)4=4  ⟹  Q2=x(4)=7\frac{2(7+1)}{4} = 4 \implies Q_2 = x_{(4)} = 7. Q3Q_3: position 3(7+1)4=6  ⟹  Q3=x(6)=10\frac{3(7+1)}{4} = 6 \implies Q_3 = x_{(6)} = 10 11.

Example 2.42. Quartiles - Raw Data (position is not integer) Data (sorted, N = 8): 1, 3, 4, 6, 8, 9, 11, 15. Q1Q_1: position 1(8+1)4=2.25\frac{1(8+1)}{4} = 2.25. Between x(2)=3x_{(2)}=3 and x(3)=4x_{(3)}=4. Q1=3+0.25⋅(4−3)=3.25Q_1 = 3 + 0.25 \cdot (4 - 3) = 3.25. Q2Q_2: position 2(8+1)4=4.5\frac{2(8+1)}{4} = 4.5. Between x(4)=6x_{(4)}=6 and x(5)=8x_{(5)}=8. Q2=6+0.5⋅(8−6)=7Q_2 = 6 + 0.5 \cdot (8 - 6) = 7. Q3Q_3: position 3(8+1)4=6.75\frac{3(8+1)}{4} = 6.75. Between x(6)=9x_{(6)}=9 and x(7)=11x_{(7)}=11. Q3=9+0.75⋅(11−9)=10.5Q_3 = 9 + 0.75 \cdot (11 - 9) = 10.5 11 12.

Example 2.43. Quartiles - Grouped Data (equal widths)

See the table in section 1.8.

N/4=5N/4 = 5. For Q1Q_1, the class is [10, 20[. a=10a = 10, h=10h = 10, Ni−1=3N_{i-1} = 3, ni=8n_i = 8. Q1=10+10⋅5−38=10+10⋅28=10+2.5=12.5Q_1 = 10 + 10 \cdot \frac{5 - 3}{8} = 10 + 10 \cdot \frac{2}{8} = 10 + 2.5 = 12.5. 3N/4=153N/4 = 15. For Q3Q_3, the class is [20, 30[. a=20a = 20, h=10h = 10, Ni−1=11N_{i-1} = 11, ni=6n_i = 6. Q3=20+10⋅15−116=20+10⋅46≈20+6.67=26.67Q_3 = 20 + 10 \cdot \frac{15 - 11}{6} = 20 + 10 \cdot \frac{4}{6} \approx 20 + 6.67 = 26.67 12.

Example 2.44. Quartiles - Grouped Data (unequal widths)

See the table in section 1.8.

N/4=10N/4 = 10. For Q1Q_1, the class is [1

2. Comparison of Dispersion Measures

2.1 Measures of dispersion 19

This section compares various statistical measures used to quantify the spread or dispersion of data. These measures help understand how data points are distributed around the central tendency.

  • Range (R): This is the simplest measure of dispersion, calculated as the difference between the maximum and minimum values in a dataset.
  • It is highly sensitive to outliers, meaning extreme values can significantly affect its value.
  • Variance (σ2\sigma^2): This measure quantifies the average squared difference of each data point from the mean.
  • It uses all data points in its calculation.
  • The unit of variance is the square of the data's unit.
  • Standard Deviation (σ\sigma): This is the square root of the variance.
  • It is the most commonly used measure of dispersion.
  • Its unit is the same as the data's unit, making it easier to interpret than variance.
  • Mean Absolute Deviation (MAD): This is the average of the absolute differences between each data point and the mean.
  • It is relatively easy to interpret.
  • It is less frequently used in theoretical contexts compared to standard deviation.
  • Coefficient of Variation (CV): This is a unitless measure, calculated as the ratio of the standard deviation to the mean, often expressed as a percentage.
  • It is useful for comparing the dispersion of datasets with different scales or units.
MeasureFormulaProperties
Range (R)Xmax−XminX_{max} - X_{min}Very simple, but sensitive to outliers.
Variance (σ2\sigma^2)1N∑i=1N(xi−xˉ)2\frac{1}{N} \sum_{i=1}^{N} (x_i - \bar{x})^2Uses all data; unit is squared.
Standard Deviation (σ\sigma)σ2\sqrt{\sigma^2}Same unit as data; most used measure.
MAD1N∑i=1N∣xi−xˉ∣\frac{1}{N} \sum_{i=1}^{N} \vert x_i - \bar{x}\vert Easy to interpret; less used in theory.
CVσxˉ×100%\frac{\sigma}{\bar{x}} \times 100\%Unitless; compares datasets of different scales.

3. Exercises

3.1 Exercise 6: Statistical measures for salary data

This exercise requires calculating various statistical measures for a given dataset of salaries. The data is presented in a frequency table with salary ranges, counts (nin_i), and class widths (hih_i).

  • Dataset: Salaries in thousands of DA.
  • Frequency Table:
  • [10, 15[: ni=6n_i=6, hi=5h_i=5
  • [15, 20[: ni=10n_i=10, hi=5h_i=5
  • [20, 30[: ni=18n_i=18, hi=10h_i=10
  • [30, 50[: ni=12n_i=12, hi=20h_i=20
  • [50, 60[: ni=4n_i=4, hi=10h_i=10
  • Total observations: 50

The tasks are to compute:

  • The mode using frequency densities.
  • The median.
  • The first quartile (Q1), third quartile (Q3), and interquartile range (IQR).
  • The mean, variance, and standard deviation.
  • The coefficient of variation.
  • Draw a histogram and estimate the mode graphically 20.

3.2 Exercise 7: Mode from histogram

This exercise involves determining the mode of a dataset from its histogram, using both densities and an exact formula. The data represents 40 values distributed across different classes.

  • Dataset: 40 values.
  • Histogram Data:
  • Class [0, 10[: ni=5n_i=5, hi=10h_i=10, di=0.5d_i=0.5
  • Class [10, 20[: ni=14n_i=14, hi=10h_i=10, di=1.4d_i=1.4
  • Class [20, 40[: ni=18n_i=18, hi=20h_i=20, di=0.9d_i=0.9
  • Class [40, 50[: ni=3n_i=3, hi=10h_i=10, di=0.3d_i=0.3

The tasks are to:

  • Identify the modal class using densities.
  • Compute the mode exactly using the provided formula.
  • Sketch the histogram and verify the answer graphically 20.

© 2026 Maeve. All rights reserved. This content is protected by copyright.

See also