Range: Statistical Range vs. Image vs. Codomain
For a function, “range” usually means the image of the whole domain (the set of outputs that occur), but some texts use it for the codomain. In statistics, the range of data is a number: the largest value minus the smallest.
Definitions
Missing definition: range_statistics
Think of a function as a machine that turns inputs into outputs. The range of the function is the set of all of the outputs that the function produces.
Consider a function $f$ and all of the inputs in its domain. The range of $f$ is the set of all of outputs that are produced by one or more of the inputs in the domain of $f$.
Worked examples
-
Value:
$f(\reals) = [0, \infty)$
This is the same rule as $x \mapsto x^2$ on $\reals$, but with the smaller codomain $[0, \infty)$, which equals the range. -
Value:
$f(\reals) = [0, \infty)$
The range of $f$ is $[0, \infty)$, because squares of real numbers are exactly the nonnegative numbers.
Consider a function, and the set of values that its outputs are allowed to be (its codomain). In some texts, the range of the function is that set, rather than the outputs that actually occur.
Consider a function $f : X \to Y$. In some texts, especially older ones, the range of $f$ is the set $Y$, its codomain.
Worked examples
-
Value:
$\reals$
In the sense of the codomain, the range of $f$ is $\reals$, the set where outputs are allowed to land.
Examples
Each cell is the range of the function or data in that row, in the ___ sense.
| Example | range_statistics | range (image) | range (codomain) | Why |
|---|---|---|---|---|
| $f(x) = x^2$ on $\reals$ | – | $f(\reals) = [0, \infty)$ | $\reals$ | The squaring function, as a function $f : \reals \to \reals$. |
| The data $2, 5, 9$ | $7$ | – | – | range_statistics: The range of the data is the largest value minus the smallest, $9 - 2 = 7$.
|
Avoiding the ambiguity
This dictionary uses “range” for the set of outputs that occur, the image $f(X)$ of the whole domain $X$. “Image” is used for the image $f(A)$ of a set $A$ of inputs, which can be smaller than the range. For the set where outputs are allowed to land, say “codomain,” not “range.”