Descriptive statistics: reading distributions and testing hypotheses
Descriptive statistics summarizes a dataset in metrics and charts, such as the mean, the median, the spread, and frequencies. This page shows how to read a distribution, when the median tells you more than the mean, how to recognize a spurious relationship, and what a p-value says about a hypothesis.
What Descriptive Statistics Describes and Where It Ends
Descriptive statistics summarizes existing data in metrics and charts. It describes the data at hand and draws no conclusion about cases that were not measured.
The measures of location give the typical value. They include the mean, the median, which is the value in the middle of the sorted data, and the mode, which is the most frequent value. The measures of spread state how far apart the values lie. They include the range, which is the distance between the smallest and the largest value, the interquartile range, which is the width of the interval that contains the middle half of the values, and the standard deviation. The standard deviation states how far the values typically lie from the mean.
Two further steps build on descriptive statistics. Exploratory data analysis searches the same data for patterns, anomalies, and hypotheses. Inferential statistics tests a hypothesis and states how uncertain the result is.
To see how the three steps fit together in a project, read the page Exploratory Data Analysis (EDA) and Modeling (CRISP-DM phase 4).Reading a Distribution: Histogram, Box Plot, and Skew
A distribution shows how often each value of a variable occurs. A histogram divides the scale of the variable into classes of equal width and shows how many values fall into each class [1]. A box plot draws the median and the two quartiles as a box and marks values that lie far away as outliers [2]. A quarter of the values lie below the lower quartile, and another quarter lie above the upper quartile.
| Feature of the distribution | How to recognize it | What follows from it |
|---|---|---|
| Location | In the box plot, the median line marks the location. In the histogram, the tallest bar shows which values occur most often. | The location gives the typical value. |
| Spread | The spread appears as the width of the histogram and as the length of the box in the box plot. The box covers the middle 50 percent of the values [2]. | When the spread is large, state an interval in addition to the metric, for example from the lower to the upper quartile. |
| Skew | In a skewed distribution, the histogram has a long tail on one side. | The mean is pulled in the direction of the long tail [3]. The median is then the appropriate metric for the typical value. |
| Several peaks | The histogram shows two or more clusters of values. | Often two groups are mixed, for example two sites. Analyze the groups separately. |
| Outliers | In the box plot, they appear as individual points that lie more than 1.5 times the interquartile range away from the box [2]. | Find out whether the value is a recording error or a genuine special case before you remove it. |
The interquartile range is the difference between the upper and the lower quartile. A box plot does not show multiple peaks, so look at the histogram first when a variable is new to you.
The target variable of a model also has a distribution. When an outcome occurs only rarely, accuracy, the share of correct predictions, is misleading. In an invented example, 50 out of 1,000 orders lead to a complaint. A model that never predicts a complaint is right for 950 orders and thus reaches 95 percent correct predictions, yet it detects none of the 50 complaints. For a target variable like this, you therefore measure how many of the rare cases the model finds.
For the metrics that suit a target variable with rare cases, read the page Model Validation (CRISP-DM phase 5).Median vs. Mean: The Difference in a Worked Example with Delivery Times
The mean is the sum of all values divided by the number of values. The median is the value in the middle of the sorted data. Half of the values are smaller than the median, and the other half are larger [3]. The difference between the two metrics becomes visible as soon as a few very large values occur.
Worked example with twelve deliveries (Invented figures). A retailer measures the delivery time in days for twelve orders. In ascending order, the values are 2, 2, 3, 3, 3, 3, 3, 4, 4, 4, 14, and 27.
| Metric | All twelve deliveries | Without the two long deliveries |
|---|---|---|
| Sum of delivery times | 72 days | 31 days |
| Mean | 72 divided by 12 = 6.0 days | 31 divided by 10 = 3.1 days |
| Median | 3 days (mean of the sixth and seventh values) | 3 days (mean of the fifth and sixth values) |
| Mode | 3 days (measured five times) | 3 days (measured five times) |
| Range | 27 minus 2 = 25 days | 4 minus 2 = 2 days |
| Sample standard deviation | 7.3 days | 0.7 days |
The mean of 6.0 days does not describe a typical delivery, because ten of the twelve orders arrived after no more than 4 days. Extreme values distort the mean. They barely change the median, because it depends only on the rank order of the values [3].
The range and the standard deviation also react strongly to extreme values. With the two long deliveries, the standard deviation is 7.3 days. Without them, it is 0.7 days. It is calculated as the standard deviation of a sample, that is, with the number of values minus 1 as the divisor, because the twelve deliveries are only a subset of the retailer's deliveries.
The median is the appropriate metric for stating how long a typical delivery takes. If you are planning the costs of all deliveries, however, you need the mean, because the long cases are included in the sum.
In the example, the upper quartile is 4 days and the interquartile range is 1 day. A box plot therefore marks every delivery time above 5.5 days as an outlier, which here means the values 14 and 27.
Relationship or Spurious Correlation: Four Checks Before Inferring a Cause
A correlation measures how strongly two variables rise or fall together. It says nothing about cause and effect. A spurious correlation exists when the relationship between two variables is not due to a causal link between them but arises because both are related to a third variable that was not taken into account [4].
Look for a third variable
In an invented example, customers who receive the newsletter buy more often than customers who do not. If it is mainly regular customers who sign up, customer loyalty explains both variables.
Validating SHAP values: why feature importance does not prove causation
Settle the direction
High discounts can raise sales. Equally, the sales team may grant discounts precisely where sales are weak.
Look at groups separately
A relationship in the data as a whole can be absent or reversed within each individual group, for example per site or per product group.
Allow for chance
If you compare many variables with one another, you will find a few striking relationships even in purely random data.
An experiment in which chance decides who is affected by an action can settle whether the action works.
To see how features are built, checked, and selected before training, read the page Feature engineering: building features without data leakage.Testing a Hypothesis: Significance and the Limits of the p-Value
In a business context, a hypothesis is a testable supposition, for example that the delivery time has fallen since the change of shipping provider. It is tested by comparing two groups, here the deliveries before and after the change. A statistical hypothesis test answers the question of whether the observed difference is larger than chance alone would lead you to expect.
The test starts from the assumption that there is no difference. This assumption is called the null hypothesis. The p-value is the probability of obtaining a result at least as extreme as the one observed if the null hypothesis is true [5]. If the p-value is below a threshold set in advance, the result is called statistically significant. This threshold is the significance level, and it is often 0.05.
A p-value does not "measure the probability that the studied hypothesis is true." Nor does it "measure the size of an effect or the importance of a result" [6]. With a very large number of deliveries, even a difference that is irrelevant to the business can be significant. The American Statistical Association states that "scientific conclusions and business or policy decisions should not be based only on whether a p-value passes a specific threshold" [6].
A threshold of 0.05 means that in 5 percent of the cases in which there is in fact no difference, the test reports one anyway [5]. If you evaluate 20 comparisons with no actual difference, you should therefore expect one significant result on average. For this reason, an analysis should state how many comparisons were run, in line with the principle that "proper inference requires full reporting and transparency" [6].
A comparison over time has a further limit, because it is rare for only one thing to change between two periods. Seasonality or order volume can explain the difference just as well as the action you took. A more meaningful comparison is one with a group for which nothing changed in the same period.
A test is not worth the effort if the decision would be the same whatever the result.
To see how trend and seasonality are separated in a time series, read the page Time Series Analysis: Trend, Seasonality, and Forecast Range.How We Handle Descriptive Statistics in Projects
In our projects, exploratory data analysis is phase 4 of the data science process and comes before the first model. In that phase, we use the metrics of descriptive statistics.
Four questions for every dataset
Every exploratory data analysis we carry out answers the same four questions. They concern the distribution, the relationship, the outliers and gaps, and the hypothesis.
Exploratory data analysis: the four questions with examples (CRISP-DM phase 4)
A pattern counts as a hypothesis
We treat a pattern that stands out in exploratory data analysis as a hypothesis and not as proof. Validation on data the model has never seen determines whether the pattern is confirmed.
Model validation: testing on held-out data (CRISP-DM phase 5)
The assumption about the cause is stated openly
In one of our research articles, two analysts derived two opposite recommendations from the same delivery dataset. We therefore state the assumption about the cause openly before it is built into a model.
Sometimes a report is enough
Exploratory data analysis sometimes shows that no model is needed, for example when the metric is already enough for the decision. In that case, the phase ends with a report instead of a model.
Before the first model, we calculate the simplest conceivable prediction as a reference value, for example the mean or last year's value.
Frequently Asked Questions About Descriptive Statistics and Hypothesis Testing
What is descriptive statistics?
Descriptive statistics summarizes existing data in metrics and charts. These include the mean, the median, the spread, and frequencies, along with the histogram and the box plot. It describes only the data at hand. Whether a result applies to other cases is a question for inferential statistics, which examines it with a test.
What is the difference between median and mean?
The difference between median and mean lies in how they are calculated. The mean divides the sum of all values by the number of values, while the median is the value in the middle of the sorted data. A few very large values raise the mean and barely change the median.
How do you interpret a box plot?
You can interpret a box plot at three points. The line inside the box shows the median. The box extends from the lower to the upper quartile and covers the middle 50 percent of the values. Individual points outside it are outliers that lie more than 1.5 times the interquartile range away from the box.
What is a spurious correlation?
A spurious correlation is a relationship between two variables that does not rest on a causal link between them. Instead, both variables are related to a third variable that is missing from the analysis. An invented example is regular customers who subscribe to the newsletter more often and, independently of that, buy more often.
What does the p-value tell you?
The p-value tells you how probable a result at least as extreme as the one observed would be if there were in fact no difference. It is not the probability that the hypothesis is true. Nor does it measure how large or how important a difference is.
What does statistically significant mean?
Statistically significant means that the p-value is below a threshold set in advance, often below 0.05. A difference at least this large would then be expected only rarely if there were in fact none. Significance says nothing about the size of the difference or its business value. Both have to be assessed separately.
Further Pages on Analysis, Validation, and the Data Foundation
Exploratory Data Analysis (EDA): Four Questions and an Example (CRISP-DM phase 4)
Model Validation: Metrics and Checks (CRISP-DM phase 5)
Time Series Analysis: Trend, Seasonality, and Forecast Range
Sources
[1] NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.3.14, "Histogram." National Institute of Standards and Technology, DOI 10.18434/M32189. https://www.itl.nist.gov/div898/handbook/eda/section3/histogra.htm (accessed November 24, 2026)
[2] NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.3.7, "Box Plot." https://www.itl.nist.gov/div898/handbook/eda/section3/boxplot.htm (accessed November 24, 2026)
[3] NIST/SEMATECH e-Handbook of Statistical Methods, Section 1.3.5.1, "Measures of Location." https://www.itl.nist.gov/div898/handbook/eda/section3/eda351.htm (accessed November 24, 2026)
[4] Wirtz, M.: Scheinkorrelation. In: Dorsch Lexikon der Psychologie, Hogrefe (source in German). https://dorsch.hogrefe.com/stichwort/scheinkorrelation (accessed November 24, 2026)
[5] NIST/SEMATECH e-Handbook of Statistical Methods, Section 7.1.3.1, "Critical values and p values." https://www.itl.nist.gov/div898/handbook/prc/section1/prc131.htm (accessed November 24, 2026)
[6] Wasserstein, R. L., Lazar, N. A.: The ASA’s Statement on p-Values: Context, Process, and Purpose. The American Statistician 70 (2), 2016, pp. 129-133, DOI 10.1080/00031305.2016.1154108 (principles 2 to 5). The six principles appear in the same wording in the press release of the American Statistical Association of March 7, 2016, which is linked here. https://www.amstat.org/asa/files/pdfs/p-valuestatement.pdf (accessed November 24, 2026)
You can find more topics, from data sovereignty to operations, in the overview of all AI guides.If you have a question about this, just give us a call: +49 40 60940415.