Range
The range is the quickest way to answer a simple question about a dataset: “How far apart are the smallest and largest values?” It’s a one-number snapshot of spread that’s easy to compute and easy to explain.
What it is
Technically, the range is:
- Range = max(value) − min(value)
If exam scores run from 42 to 96, the range is 54 points. If house prices in a neighborhood go from $220k to $610k, the range is $390k. It tells you the full width of the data from end to end.
Why it can mislead
The range depends only on two data points—the minimum and maximum—so it’s extremely sensitive to outliers and measurement errors. One unusually high sale price (or a typo) can make the range look huge even if most homes cluster tightly together. That’s why the range is often paired with more robust spread measures like interquartile range (IQR) or standard deviation.
How it shows up in AI/ML
In machine learning workflows, “range” appears both as a descriptive statistic and as a practical tool:
- Data sanity checks: spotting impossible values (e.g., negative ages) by checking min/max.
- Feature scaling: min-max normalization rescales features using their min and max, effectively relying on the range.
- Model stability: if a feature’s range is enormous compared to others, gradient-based models can train poorly unless you scale.
In libraries like scikit-learn, MinMaxScaler uses this idea directly, while exploratory tools often report min, max, and range to quickly characterize features.
Range is a simple measure of dispersion defined as the difference between the maximum and minimum values in a dataset. It quickly summarizes overall spread but is highly sensitive to outliers and ignores how values are distributed between the extremes. In AI/ML, range helps with basic data profiling and feature scaling decisions (e.g., min–max normalization). Example: for values {2, 5, 9}, the range is 9 − 2 = 7.
Imagine you’re checking the weather for the week. If the coldest day is 10°C and the hottest day is 25°C, the spread of temperatures feels like 15°C. That spread is the range.
In statistics (and in AI/ML), the range is the simplest way to describe how spread out a set of numbers is: it’s the biggest value minus the smallest value. A small range means the numbers stay close together; a large range means they vary a lot. It’s quick to compute, but it can be heavily affected by one unusually high or low value.