Descriptive Statistics

This micro-learning path introduces professionals to the core concepts of descriptive statistics, enabling them to summarize, organize, and present data effectively. It covers key measures of central tendency, variability, and distribution, alongside essential visualization techniques for data exploration and communication.

8 free lessons available

Start here

Mean (Average)

When you need a single number to represent the "typical" value in a dataset, the mean is often the first measure that comes to mind. It's the most common way to calculate an average, providing a quick summary of where the center of your data lies. From calculating average test scores to understanding the typical salary in a company, the mean offers a straightforward, intuitive snapshot. However, its simplicity also hides a crucial sensitivity to extreme values that every data professional must understand.

The Arithmetic Mean: Your Everyday Average

The arithmetic mean is calculated by summing all the values in a dataset and then dividing by the total number of values. This method distributes the total quantity equally among all observations, giving you a sense of what each observation would be if they were all the same. It's the most widely used measure of central tendency because it's simple to compute and intuitively understandable. For example, if you want to know the average daily temperature over a week, you'd use the arithmetic mean.

📐 Arithmetic Mean Formula

The arithmetic mean (denoted as xˉ\bar{x} for a sample or μ\mu for a population) is calculated as:

xˉ=∑i=1nxin\bar{x} = \frac{\sum_{i=1}^{n} x_i}{n}

Where:
- xix_i represents each individual value in the dataset.
- ∑xi\sum x_i is the sum of all values.
- nn is the total number of values in the dataset.

pythonCalculating Arithmetic Mean in Python
Check Your Understanding
If a new data point of 147.14 is added to the website_visitors list, how would the arithmetic mean change?

Understanding the Weighted Mean

Sometimes, not all data points contribute equally to the overall average. In such cases, a weighted mean is more appropriate. This calculation assigns a specific weight to each value, reflecting its relative importance or frequency. Common applications include calculating a student's GPA (where courses have different credit hours) or determining the average price of a stock portfolio (where different stocks have varying numbers of shares). The weighted mean provides a more accurate representation when certain values hold more influence.

📐 Weighted Mean Formula

The weighted mean is calculated as:

xˉw=∑i=1n(xi⋅wi)∑i=1nwi\bar{x}_w = \frac{\sum_{i=1}^{n} (x_i \cdot w_i)}{\sum_{i=1}^{n} w_i}

Where:
- xix_i is the value of each data point.
- wiw_i is the weight assigned to each data point.
- ∑(xi⋅wi)\sum (x_i \cdot w_i) is the sum of each value multiplied by its weight.
- ∑wi\sum w_i is the sum of all weights.

pythonCalculating a Student's Weighted GPA

The Mean's Sensitivity to Outliers

A critical characteristic of the arithmetic mean is its sensitivity to outliers. An outlier is an extreme value that lies far away from most other values in a dataset. Because the mean incorporates every single data point into its calculation, even one unusually high or low value can significantly pull the mean in that direction. This makes the mean a less robust measure of central tendency for skewed distributions or datasets with extreme anomalies, as it might not accurately represent the "typical" value for the majority of the data.

pythonImpact of an Outlier on Average Salary
Check Your Understanding
Given the mean's sensitivity, when might the median be a more appropriate measure of central tendency than the mean?

Beyond Arithmetic: Geometric Mean

While the arithmetic mean is suitable for additive relationships, the geometric mean is essential for multiplicative relationships, such as calculating average growth rates or rates of change. It's particularly useful when dealing with percentages, ratios, or values that compound over time. For instance, if you're averaging investment returns over several years, using the arithmetic mean can overestimate the actual average growth, whereas the geometric mean provides a more accurate picture of the compound annual growth rate.

📐 Geometric Mean Formula

The geometric mean is calculated as the nn-th root of the product of nn values:

GM=x1⋅x2⋅…⋅xnn=(∏i=1nxi)1nGM = \sqrt[n]{x_1 \cdot x_2 \cdot \ldots \cdot x_n} = (\prod_{i=1}^{n} x_i)^{\frac{1}{n}}

Where:
- xix_i are the individual values (must be positive).
- nn is the total number of values.
- ∏\prod denotes the product of the values.

pythonCalculating Average Annual Investment Growth

Harmonic Mean: Averaging Rates

The harmonic mean is the reciprocal of the arithmetic mean of the reciprocals of the values. This might sound complex, but it's specifically designed for averaging rates, ratios, or speeds, especially when the quantities being averaged are expressed in terms of units per something else (e.g., miles per hour, tasks per minute). It gives more weight to smaller values, which is crucial in scenarios like calculating average speed over a fixed distance where varying speeds are involved. Using an arithmetic mean in such cases can lead to an incorrect average.

📐 Harmonic Mean Formula

The harmonic mean is calculated as:

HM=n∑i=1n1xiHM = \frac{n}{\sum_{i=1}^{n} \frac{1}{x_i}}

Where:
- nn is the total number of values.
- xix_i are the individual values (must be positive).
- ∑1xi\sum \frac{1}{x_i} is the sum of the reciprocals of the values.

pythonCalculating Average Speed for a Round Trip
Try It Yourself
Consider the salaries_no_outlier data from the outlier example. Add a new salary of 2.5K to this list. Calculate the new mean and observe how it changes compared to the original mean.
python

When to Use the Mean (and When Not To)

Choosing the correct measure of central tendency is a critical decision in data analysis. The mean is ideal for datasets that are symmetrically distributed and do not contain significant outliers, as it incorporates all data points and provides a robust estimate of the true center. However, when data is skewed (like income distributions) or contains extreme values, the mean can be misleading. In such scenarios, the median (the middle value) or the mode (the most frequent value) often provide a more representative picture of the typical observation. Understanding these distinctions prevents misinterpretation of your data.

Mean vs. Median vs. Mode
CharacteristicMeanMedianMode
DefinitionSum of values / countMiddle value when orderedMost frequent value
Sensitivity to OutliersHighly sensitiveNot sensitiveNot sensitive
Best Use CaseSymmetric, interval/ratio dataSkewed data, ordinal dataCategorical data, identifying peaks
Data TypeInterval, RatioOrdinal, Interval, RatioNominal, Ordinal, Interval, Ratio
UniquenessAlways uniqueAlways unique (or average of two)Can have multiple modes
A comparison of the three primary measures of central tendency and their appropriate use cases.
Key Takeaways
  • The arithmetic mean is the sum of all values divided by their count, providing a simple average for additive relationships.

  • The mean is highly sensitive to outliers; a single extreme value can significantly skew its representation of the data's center.

  • The weighted mean accounts for varying importance or frequency of data points, crucial for calculations like GPA or portfolio averages.

  • The geometric mean is best for averaging growth rates or multiplicative factors, providing a more accurate compound average.

  • The harmonic mean is specifically designed for averaging rates or speeds, giving more weight to smaller values and preventing overestimation.

  • Choose the mean when data is symmetric and free of extreme outliers; otherwise, consider the median or mode for a more robust central measure.

Try it yourself

Distribution Explorer

Drag the parameters and watch the shape, mean, and spread respond. Sweep the plot to read off the probability of landing at or below a point.

Open the lab

Open this lesson on its own page →

Ready to keep this from fading?

Bitelrn turns lessons like this into a full course — quizzes, a knowledge map, and spaced review.

Get started free