Skip to content
Blog

Mean, median and standard deviation: the same dataset answers three different questions

Using small, verifiable datasets, we demonstrate the impact of outliers, the difference between population and sample standard deviation, and the limitations of estimates derived from class intervals.

DG Kalkulátor12 min read
Mean, median and standard deviation: the same dataset answers three different questions
BRRT / Pixabay

You measured five processing times: 2, 3, 3, 4 and 8 minutes. The arithmetic mean is 4 minutes, and the median is 3 minutes. The discrepancy between these two figures does not, in itself, indicate an error or a contradiction. The mean corresponds to the equal distribution of all times; the median indicates the middle of the sorted observations.

If you use these metrics for processing times, delivery times or repeated measurements, first define the question. Are you planning total capacity, describing a typical experience, or examining variability? The statistical calculator provides multiple metrics together so that your choice is not based on a single number.

The mean is linked to the sum

In the example, the total processing time is 2 + 3 + 3 + 4 + 8 = 20 minutes. There are five observations, so the mean is 20 / 5 = 4 minutes. If all five cases had taken exactly four minutes, the total time would still be twenty minutes.

The mean is therefore naturally linked to planning tasks where quantities are additive. You can recover the work time of the five actual tasks by multiplying the mean by the number of items. However, for new tasks, you must assume that the previous data adequately characterise the next period.

Weight the means of groups of different sizes by the number of items. The combined mean of ten cases averaging 4 minutes and two cases averaging 10 minutes is (10 × 4 + 2 × 10) / 12 = 5 minutes. The simple average of the two group means would be 7 minutes, as it would ignore the differing sample sizes.

To find the median, sort the data first

The middle, third element of the five sorted data points is 3. This is the median. At least half of the observations are less than or equal to this value, and at least half are greater than or equal to it. With repeated values, both statements can hold true even if multiple observations are exactly equal to the median.

For an even number of items, the usual numerical median is the average of the two middle data points. In the dataset 2, 3, 4, 8, this is (3 + 4) / 2 = 3.5. Thus, the median can be a value that was never measured directly.

The NIST summary on measures of position distinguishes the roles of the mean, median and other central values. The median is less sensitive to the magnitude of a single extreme observation. However, it does not, on its own, reveal the details of the entire distribution.

What changes if the eight-minute case becomes twenty-eight minutes?

Let us modify the example: 2, 3, 3, 4 and 28 minutes. The sum is 40, and the mean is 8 minutes. The median remains 3. The increase of a single data point by 20 minutes raised the mean of the five-item series by 20 / 5 = 4 minutes.

The long case may be a genuine, important event: a complex case, a downtime or a wait. Therefore, a specific reason is required to delete it. You can correct a typo based on the source; omitting a real observation simply because it worsens the mean would provide a misleading picture.

It may be useful to note that the mean of all cases is 8 minutes, the median is 3 minutes, and one case lasted 28 minutes. This allows the reader to see both the total load and the extremely long observation at once. If you identify a separate operational state, you can analyse the two groups separately with justification.

Calculating standard deviation on five data points

The mean of the original series 2, 3, 3, 4, 8 is 4. The deviations from the mean are −2, −1, −1, 0 and 4. Their squares are 4, 1, 1, 0 and 16; the sum is 22. The descriptive variance of the full five elements is 22 / 5 = 4.4 minutes squared. Its square root is approximately 2.098 minutes, which is the population standard deviation.

Due to squaring, the signs of the deviations do not cancel each other out. The square root brings back the original unit. Therefore, the standard deviation for data measured in minutes belongs in minutes, while the variance is in minutes squared.

If you estimate the standard deviation of a broader process from the five observations using the usual sample formula, the denominator of the variance is n − 1 = 4. Thus 22 / 4 = 5.5, and the sample standard deviation is approximately 2.345 minutes. The OpenStax chapter discussing standard deviation presents both denominators and the difference in their application.

The same mean, different variability

Compare the datasets 3, 4, 4, 4, 5 and 0, 1, 4, 7, 8. Both have a mean of 4 and a median of 4. The population standard deviation of the first is approximately 0.632, and that of the second is approximately 3.162. Thus, the central values match, while the standard deviation of the second dataset is five times that of the first.

If you want uniform service for appointment scheduling, this discrepancy may be important. Data close to the mean may require different buffer times than a highly variable process. For specific scheduling decisions, also examine the order of the data, the capacity and the causes of long cases.

Standard deviation alone does not make a distribution normal. The frequently cited proportions of approximately 68% within one standard deviation and approximately 95% within two standard deviations belong to the normal distribution. You cannot automatically apply these proportions to arbitrary datasets; even in small samples from a normal distribution, deviations can occur.

The mean and standard deviation do not indicate the loss of order

Let there be two of your own processing sequences recorded in chronological order: 1, 1, 1, 7, 7, 7 minutes, and 1, 7, 1, 7, 1, 7 minutes. Both contain the same values, so their mean is 4 minutes, their median is 4 minutes, and their population standard deviation is 3 minutes. Most descriptive metrics that ignore order will be identical.

In the first series, the three larger values follow each other from the fourth case onwards. From these six data points alone, we cannot know how long the higher level will persist. In the second series, every subsequent value alternated between the two levels. The mean of the absolute differences between consecutive values is (0 + 0 + 6 + 0 + 0)/5 = 1.2 minutes in the first series, and 6 minutes in the second. These differences are your own manual supplementary calculations; they answer a different question than standard deviation.

If you are looking for a change after modifying a setting, the chronological order of the first series is particularly significant. If alternating case types may cause the variability, you must review the group labels of the second series. Neither sample proves the cause on its own. Therefore, alongside the sorted value list, retain the original timestamps and the circumstances associated with the operation.

The average of two groups' standard deviations is not the standard deviation of the entire dataset

Suppose you recorded the processing times of two shifts separately. The first contains 3, 4 and 5 minutes, and the second contains 9, 10 and 11 minutes. Both groups have three items; their means are 4 and 10 minutes, respectively.

Relative to their own group means, the deviations in both series are −1, 0 and 1. The sum of squares is 2, and the denominator n − 1 is also 2, so the sample standard deviation of both groups is 1 minute. However, it does not follow that the sample standard deviation of all six observations is also one minute.

The combined mean is (3 + 4 + 5 + 9 + 10 + 11) / 6 = 7 minutes. Relative to this, the deviations are −4, −3, −2, 2, 3 and 4. The sum of their squares is 16 + 9 + 4 + 4 + 9 + 16 = 58. The combined sample standard deviation is:

s = √(58 / (6 − 1)) ≈ 3.406 minutes.

If you calculate only the descriptive, population standard deviation of these six observations, the denominator is 6, so √(58 / 6) ≈ 3.109 minutes. Neither is the average of the 1 minute group standard deviations.

The reason for the larger combined standard deviation is that the central values of the shifts also differ. Of the total sum of squares of 58, the variation around each group’s own mean contributes 2 + 2 = 4. The two group means are three minutes away from the common mean; this adds a further 3 × 3² + 3 × 3² = 54. The two parts sum to 4 + 54 = 58.

In the statistical calculator, first enter the two three-item series separately, then all six data points together. If you are looking for the cause of the difference between shifts, retain the group labels. The combined figure describes the variability of all cases but hides the fact that two groups with different central values lie behind it. This example demonstrates the presence of the discrepancy; it does not determine the cause on its own.

When only grouped data remains

Suppose you did not retain the individual times, only the groups: 4 cases between 0–10 minutes, 8 cases between 10–20, and 4 cases between 20–30. The class midpoints are 5, 15 and 25. The mean estimated using the midpoints is (4 × 5 + 8 × 15 + 4 × 25) / 16 = 15 minutes.

The grouped data statistical calculator makes such an estimate. The original values cannot be unambiguously reconstructed from the intervals. If the members of the 0–10 group were mostly near 9 minutes, the 5 minute midpoint reduces their contribution downwards.

In the guide on grouped means (in Hungarian), you can also examine the possible bounds of the original data's mean and what additional data is worth preserving for an accurate mean.

An open-ended group, such as 'over 30 minutes', has no known midpoint. Do not invent a representative value without your own justified upper bound. Also record the interpretation of the group boundaries so that a case of exactly 10 minutes falls into only one group.

Missing data differs from zero

If a processing time is not recorded, entering zero pulls the mean down and creates a new, false observation. Mark the missing value separately and state how many values you calculated from. Incorrect units also distort the results: recording 120 seconds as 120 minutes shifts the mean and can change the standard deviation. Meanwhile, the median may remain unchanged if the value recorded in two ways lies on the same side. A seemingly reassuring central value therefore does not replace checking input units.

For school grades, the grade average calculator handles differing assessment weights. For raw, equally weighted measurements, descriptive statistics are appropriate. Keep the sample size, unit and scope of data collection with every result. This ensures that a mean of 4 remains interpretable later, and when comparing with a new dataset, you can see whether you truly examined the same phenomenon.

Final knowledge check

Choose one answer for each question. Each correct answer earns 1 point; an incorrect answer, a skipped question or more than one selected answer earns 0 points. You can score 0–3 points in total. Read the solutions after answering.

1. In the dataset 2, 3, 3, 4, 8, you replace 8 with 28. What will be the mean and the median?

  • A) The mean is 4, the median is 3.
  • B) Both the mean and the median are 8.
  • C) The mean is 8, the median is 3.

2. The sample standard deviation of the groups 3, 4, 5 and 9, 10, 11 is separately 1. What is the sample standard deviation of the combined six data points?

  • A) Approximately 3.406.
  • B) Exactly 1.
  • C) Exactly 2.

3. The time series 1, 1, 1, 7, 7, 7 and 1, 7, 1, 7, 1, 7 have the same mean and standard deviation. What distinguishes them in the article's example?

  • A) The mean absolute change of adjacent values: 1.2 and 6.
  • B) The second dataset has a different arithmetic mean.
  • C) The common standard deviation proves that their temporal behaviour is also identical.

Solutions and scoring

1. C. The new sum is 40, so the mean is 40/5 = 8. The middle element of the sorted five data points remains 3. For revision: What changes if the eight-minute case becomes twenty-eight minutes?.

2. A. The total mean is 7, and the sum of squared deviations is 58. The sample variance is 58/(6−1) = 11.6, so the sample standard deviation is √11.6 ≈ 3.406. For revision: The average of two groups' standard deviations is not the standard deviation of the entire dataset.

3. A. The descriptive mean and standard deviation do not change with rearranging the order. However, the sum of consecutive differences is 6 and 30, which divided by five steps gives 1.2 and 6. For revision: The mean and standard deviation do not indicate the loss of order.

Each correct answer is worth 1 point; an incorrect or omitted answer is worth 0 points. The total score can be 0–3.

  • 0 points: work through the sections marked in the three solutions again, and write down the initial conditions of the examples.
  • 1 point: derive the correct answer for the two missed questions; separately note which condition or calculation step was omitted.
  • 2 points: return to the section linked to the single missed question, then verify the result again by changing one input.
  • 3 points: you correctly applied the three relationships in this task set. Try one of the article's checks with your own data, recording the conditions and units.

Translated and adapted from the Hungarian article: Hungarian original.