1  Measuring and Describing Data

Author

Mallory L. Barnes

Modified

September 17, 2026

To call in statisticians after the experiment is done may be no more than asking them to perform a post-mortem examination: They may be able to say what the experiment died of.

Sir Ronald Fisher

1.1 The Role of Statistics in Environmental Science

Environmental questions are usually questions about change. Is this stream warming? Did the restoration work? They are hard to answer because the systems never sit still to begin with. Streams warm and cool over a single day, and vegetation may look the same for years and then suddenly recover. Something is always changing, so finding a real effect means separating it from the change that would have happened anyway.

That’s what statistics is for. It gives you a way to say how much of what you observed is the thing you were looking for vs. how much is ordinary variation, and how confident you should be in telling the two apart. Most environmental claims you will read or make rest on that distinction, whether or not anyone says so out loud.

1.1.1 Why Numbers Matter

Common sense is useful, but it is prone to bias. When we already believe something to be true, we are more likely to interpret new evidence as supporting it, even if it does not. This tendency can lead us astray.

For example, if you’re convinced that industrial farming is the main driver of bee declines, you might see every new drop in bee abundance as confirmation of that belief. Maybe you’re right, but maybe disease or weather are stronger contributors. Statistics gives us tools to test these ideas systematically. It helps us separate patterns from noise, avoid being misled by our own expectations, and draw conclusions that are more likely to hold up under scrutiny. It’s not magic, but it makes our conclusions far more reliable.

Sheer volume is the other reason numbers matter. Satellites measure surface temperature, field stations log rainfall, and sensors track air quality, so a single study can generate thousands of rows. On top of that, river flow changes by the hour and human activity layers on more variability still. Statistics is how we compress all of that into something we can reason about.

It would be reasonable to ask why you need to learn this yourself rather than handing the analysis to someone who already knows it. Three reasons:

  1. Design and analysis go together. A good study starts long before you run a statistical test. If you want to study how fertilizer affects crop yields, your sampling plan and your analysis are inseparable. Poor design, like measuring only in unusually wet fields, can’t be rescued by sophisticated analysis.

  2. Understanding the Science: Scientific papers on climate change, biodiversity, or pollution are built on statistical results. To interpret them, you need to know what the numbers mean.

  3. Practicality: Hiring a specialist for every question isn’t realistic. A working knowledge of statistics makes you more self-sufficient, whether you end up working as a scientist, an environmental manager, or a decision-maker who has to evaluate someone else’s analysis.

“We are drowning in information, but we are starved for knowledge”

Various authors, original probably John Naisbitt

Finally, none of this is only for researchers, or only for environmental science. Weather forecasts, air quality alerts, and wildlife population trends are all communicated through numbers, and so are the statistical claims that turn up in news coverage and policy debates. Once you can recognize the difference between a correlation and a cause, or spot a claim resting on a sample too small to support it, you start noticing those moves everywhere. Statistics lets you tell whether the numbers support the claim being made, or whether someone is stretching them.

1.2 Introduction to measurements

Every dataset begins with measurement: assigning numbers, labels, or categories to aspects of the world so they can be recorded and analyzed. Science often deals with broad ideas that need to be pinned down before they can be studied. For example, soil health or forest change are meaningful, but vague. To analyze them, we have to decide exactly what we mean and how to capture it. That process is called operationalization: turning a general concept into something measurable.

Let’s clarify how operationalization fits with three related terms:

  • Operationalization: the step where you define exactly how a broad idea will be captured with a measure
  • Measure: the tool or method used to make observations
  • Variable: the actual values you record once the measure is applied. Variables are the actual data that end up in our dataset.

Example:

  • Concept of interest: Soil health
    • Operationalization: concentration of organic carbon in the top 30 cm
    • Measure: laboratory analysis of soil samples
    • Variable: recorded carbon concentration values for each plot

Soil health is the idea we care about, but you cannot go outside and measure an idea. Organic carbon is a defensible stand-in, since healthy soils generally store more of it, but soil health also involves compaction, pH, microbial activity, and how well the soil holds water. So the first decision is which facet of soil health will stand in for the whole:

Which facet?:

  • ☑ organic carbon

Choosing carbon means the other facets go unmeasured. And the choice is not finished, it has only narrowed. How deep will you sample? Thirty centimeters is conventional, but 10 cm or a full meter would give different answers:

Sampling depth? :

  • ☑ 30 cm

There are a dozen more, and each one is a place where another reasonable person might go the other way:

  • Which carbon counts? ☑ organic ☐ carbonate minerals ☐ total
  • How many cores per plot? ☐ 1 ☐ 3 ☑ 6 ☐ 9
  • Where in the plot? ☐ wherever is easiest ☑ stratified random ☐ along a fixed transect
  • When in the season? ☐ spring ☑ after harvest ☐ same calendar date each year

Every checked box narrows what “soil health” now means in your dataset, and every unchecked box is a part of soil health your data can no longer speak to. Another researcher could work down the same list, check different boxes, report a different number, and both of you would be right, because you measured different things and gave them the same name.

Operationalization is rarely straightforward, and there is no single correct way to do it. The best choice depends on the question you are asking and how the data will be used. In many fields, scientists have developed common practices, but every project still requires case-by-case judgment. Even so, some principles of good operationalization apply across studies: be precise about what you mean, how you will measure it, and what values are possible.

1.3 Scales of measurement

As the previous section indicates, the outcome of a measurement is called a variable. Not all variables are the same type, and knowing the type matters because it determines which statistical tools make sense. The four classic scales are nominal, ordinal, interval, and ratio (Stevens 1946).

1.3.1 Nominal scale

A nominal scale variable (also referred to as a categorical variable) is one in which the values are just names. They do not have an inherent order, and it makes no sense to average them.

Example: land cover class. A pixel on a satellite map might be classified as forest, grassland, wetland, or urban. None of those is “greater” than another, they cannot be put in a meaningful order, and there is no such thing as an average land cover.

It is worth being precise about why, because the arithmetic itself does not fail. Map classes are drawn in colors, and colors have numeric codes, so a computer will happily average forest, grassland, wetland, and urban and hand you a result. Figure 1.1 shows what comes back.

Four colored map tiles labeled forest, grassland, wetland, and urban. An arrow points to a fifth, muddy sage-green tile labeled average, annotated as corresponding to no land cover class.
Figure 1.1: Averaging the color codes of four land cover classes returns a color, but not a land cover class. Nothing on the map is that color.

You get a color back. Nothing on the map is that color, and more importantly there is no class it could represent, because there’s no midpoint between water and urban. That is what makes a variable nominal: the values are labels, not quantities, so arithmetic on them runs perfectly well and tells you nothing. Land cover is unusual in even having numbers attached that could be averaged, and only because someone chose colors for a map. Most nominal variables, like species identity or watershed name, have nothing there to average in the first place.

1.3.2 Ordinal scale

Ordinal scale variables have a meaningful order, but the spacing between values is not defined mathematically. You can rank the values, but you can’t assume equal steps between them, nor calculate a meaningful average.

Example: finishing position in a competition. First place comes before second, and second before third, but the ranks themselves tell you nothing about how far apart the competitors actually were.

An Olympic weightlifting meet makes this concrete, because the thing being ranked is a weight, so we can see both scales at once. Figure 1.2 shows a podium alongside the weights the three athletes actually lifted.

A three-step podium with athletes holding bronze, silver, and gold medals, the steps evenly spaced. Dotted guides drop from each athlete to a horizontal kilogram scale below, where third place sits at 71 kg and second and third sit close together at 100 and 102 kg. Brackets label the gaps as 29 kg apart and 2 kg apart.
Figure 1.2: The same three athletes shown two ways. On the podium the steps are one place apart and one place apart again. On the scale below, the weights they lifted are 29 kg and 2 kg apart.

On the podium, second place looks exactly as far from first as it does from third. On the scale below, second place is nearly tied with first and nowhere near third. That is the cost of ranking: it keeps the order and throws away the distances. Notice also that a single event gives us both kinds of variable. The finishing place is ordinal, the weight lifted is ratio, and only one of them can be averaged.

1.3.3 Interval scale

Interval variables have equal intervals between values, so differences are meaningful. However, zero is arbitrary, so multiplication and division are not valid.

Example: temperature in degrees Celsius.

A difference of 3\(^\circ\) means the same regardless of whether it is 7 → 10 or 15 → 18. But 0\(^\circ\)C does not mean “no temperature.” That zero is defined by the freezing point of water, which is a useful convention rather than a fact about heat. So you can say today is 3\(^\circ\) warmer than yesterday, but you cannot say 20\(^\circ\)C is “twice as hot” as 10\(^\circ\)C.

Another example: calendar years. The ten years from 1990 to 2000 are the same length as the ten years from 2010 to 2020, so differences work fine. But year 0 is a convention we agreed on, not the beginning of time, and other calendars put their zero somewhere else and are equally correct. That is why the year 2000 is not “twice as late” as the year 1000.

1.3.4 Ratio scale

Ratio scale variables have all the properties of interval variables, plus a true zero, meaning zero really does indicate none of the thing. That is what makes multiplication and division valid.

Example: age in years. Zero means no age at all, and someone who is 20 really is twice as old as someone who is 10. Differences (20 - 10 = 10 years) and ratios (20 ÷ 10 = 2) are both meaningful.

Temperature makes an unusually clean comparison here, because the same physical quantity can be recorded on either kind of scale depending on where you put the zero. Figure 1.3 shows both.

Two vertical temperature scales side by side spanning the same physical range. On the Celsius scale, zero sits near the top with a shaded region of negative temperatures extending far below it. On the Kelvin scale, zero sits at the very bottom, with an arrow noting that nothing colder exists.
Figure 1.3: The same physical range of temperatures on two scales. These are both covering identical ground in terms of heat content; only the placement of zero differs. Celsius anchors its zero to the freezing point of water, Kelvin to the absence of thermal energy.

The consequence is easy to check. Going from 10\(^\circ\)C to 20\(^\circ\)C doubles the Celsius number, so it is tempting to call it twice as hot. On the Kelvin scale those same two temperatures are 283 K and 293 K, an increase of about 3.5%. The physical change is small. The doubling was an artifact of where Celsius happens to put its zero. Kelvin has a true zero, so its ratios do hold: 200 K really does carry twice the thermal energy of 100 K.

can rank can subtract/add can multiply/divide example
nominal land cover class
ordinal x finishing place
interval x x temperature (°C)
ratio x x x age

1.3.5 Continuous versus discrete variables

Another useful distinction is whether a variable can take on values in between others.

  • A continuous variable can, in principle, take on any value within a range. For example, consider height. If you are 72 inches tall and your friend Cameron is 71 inches tall, Alan could be 71.4 inches and David 71.49 inches. Because we can always imagine a new value in between two others, height is continuous.

  • A discrete variable is, in effect, a variable that isn’t continuous. Discrete variables have separate, distinct values with nothing in between. Nominal variables are always discrete: there is no land cover class that falls “between” wetland and urban in the same way that 71.4 falls between 71 and 72. Ordinal variables are also discrete: although second place falls between first and third, nothing can logically fall between first and second.

Interval and ratio variables can be either. Height (a ratio variable) is continuous. But the number of people living in a household (a ratio variable) is discrete: you cannot have 4.2 people. Temperature in degrees Celsius (an interval variable) is also continuous. But the year you started college (an interval variable) is discrete: there is no year between 2022 and 2023.

The table below shows how the scales of measurement relate to this distinction. Cells with an “x” mark what is possible.

continuous discrete
nominal x
ordinal x
interval x x
ratio x x

1.3.6 A note on real data

These categories are guides, not hard rules. For example, survey responses on a 1–5 “strongly disagree” to “strongly agree” scale are technically ordinal, but researchers often treat them as “quasi-interval” because the spacing is assumed to be roughly equal.

1.4 The role of variables: predictors and outcomes

One last piece of terminology before we leave variables behind. In most studies we have many variables, but when we analyze them, we usually split them into two roles: the thing we’re trying to explain and the thing doing the explaining. To keep it straight, we use \(Y\) for the variable being explained, and a \(X_1\), \(X_2\), etc. for the variables used to explain it.

Traditionally, \(X\) is called the independent variable (IV) and \(Y\) is the dependent variable (DV). The logic is that if there’s a relationship, \(Y\) depends on \(X\). These terms can be clunky and confusing because: (a) IVs are rarely actually “independent of everything else” and (b) if there’s no relationship, then the DV doesn’t actually “depend” on the IV at all.

Two alternative vocabularies are often clearer. In experiments, IVs are manipulations and DVs are measurements. When we are using \(X\) to predict \(Y\) rather than manipulating anything, the pair is predictor and outcome.

role of the variable classical name in experiments in prediction
“to be explained” (\(Y\)) dependent variable (DV) measurement outcome
“to do the explaining” (\(X\)) independent variable (IV) manipulation predictor
NoteNote: Which terms this course uses

You should recognize all three pairs, since all three appear in the literature. This book uses IV and DV when comparing groups (\(t\)-tests, ANOVA) and predictor and outcome for regression, where nothing is manipulated and “independent variable” would mislead. A later chapter switching vocabulary is following the convention of the method, not introducing a new idea.

1.5 Experimental and non-experimental research

A central distinction in research is between experimental and non-experimental studies. What matters here is the degree of control the researcher has.

In experimental research, the researcher deliberately manipulates something (the predictor/IV) and measures its effect on outcomes (the outcome/DV). The goal is to isolate causal effects. To avoid the problem of “something else” influencing the outcome, researchers try to hold other factors constant. In practice, it’s almost impossible to identify everything that might matter, much less keep it constant. The standard solution is randomization. Randomization doesn’t eliminate confounds, but it makes them less likely to systematically bias results.

For instance, suppose we wanted to know if smoking causes lung cancer. Observing smokers and non-smokers can only get us so far, because those groups differ in many ways besides smoking, like occupation, income, and diet. A true experiment would require randomly assigning people to smoke or not. You can see how that would be deeply unethical. The same problem comes up in medicine: we know surprisingly little about how certain drugs or exposures affect pregnant people, precisely because we cannot ethically assign them to risky conditions.

In environmental science the limitation is usually not ethics but feasibility. There is no control planet to set aside as a baseline, and nobody can dial precipitation or temperature up and down. So the field leans heavily on non-experimental research, which mostly takes three forms.

Quasi-experiments compare conditions the researcher did not create. You cannot control what a factory discharges into a river, but you can compare reaches above and below the outfall and use statistical tools to account for the confounding variables you could not hold constant.

Time series follow one system over a long stretch, which matters because many environmental processes unfold across years or decades. Tracking global temperature or sea level takes years of consistent measurement, and statistics is what separates the trend from the natural year-to-year noise.

Case studies go deep on a single event or place: the aftermath of a wildfire, the ecology of a threatened habitat, the consequences of a policy. One case is tied to its context, but a well-designed one can still expose a mechanism that will generalize elsewhere. A drought in one forest can reveal how water potential and transpiration respond to stress, which helps anticipate what other forests will do.

1.6 From measurement to description

The first half of this chapter was about what data are: how a broad concept gets operationalized into a variable, what scale that variable is on, and what kind of study produced it. The rest of the chapter is about what to do with a dataset once you have one.

Far better an approximate answer to the right question, which is often vague, than an exact answer to the wrong question, which can always be made precise.
John W. Tukey

Statistics often begins with the problem of too much data. Rainfall at hundreds of stations, thousands of tree measurements in a forest survey, millions of satellite pixels: looking at the raw numbers tells you almost nothing. We need tools to summarize and visualize, and those tools are descriptive statistics.

There is more than one useful way to describe a dataset, and which one you reach for depends on the pattern you are trying to reveal.

1.7 Looking at the data

From here on we work with a real dataset, so the tools have something concrete to act on.

R ships with airquality, a record of daily air quality measurements taken in New York from May through September of 1973. Each row is one day, with ozone concentration (parts per billion), solar radiation, wind speed, and maximum temperature.

Table 1.1: The first six days of the airquality dataset.
Ozone Solar.R Wind Temp Month Day
41 190 7.4 67 5 1
36 118 8.0 72 5 2
12 149 12.6 74 5 3
18 313 11.5 62 5 4
NA NA 14.3 56 5 5
28 NA 14.9 66 5 6

Look at the NA entries. Ozone and solar radiation were not recorded every day, and real environmental datasets almost always have gaps like this. That has an immediate practical consequence:

mean(airquality$Ozone)
#> [1] NA

R returns NA rather than a number, because it has no way of knowing what the missing days would have been. You have to tell it explicitly to set those days aside:

mean(airquality$Ozone, na.rm = TRUE)
#> [1] 42.12931

That na.rm = TRUE will follow you through the rest of the course.

1.7.1 Scatter of raw values

Plot every value. Before summarizing anything, it is worth simply looking at all of it.

Scatter plot with day number on the horizontal axis and daily maximum temperature on the vertical axis. Temperatures rise from the high 50s and 60s in May to the 80s and 90s in midsummer, then fall again by September.
Figure 1.4: Daily maximum temperature at a New York station, May through September 1973.

Figure 1.4 shows all 153 daily temperatures at once, with day number across the bottom and that day’s maximum temperature up the side. Already this tells us more than a table of 153 numbers would: there is a clear seasonal arc, cooler in May, warmest through July and August, cooling again by September.

But notice what the plot does not answer well. If you want to know whether most days were warm or cool, you end up squinting at a cloud of dots, because the seasonal ordering gets in the way. For that we need a different view, a histogram.

1.7.2 Histograms

A histogram summarizes data by grouping values into bins rather than showing each point separately. It throws away the day-to-day ordering on purpose, and in exchange it shows you the shape of the data.

Histogram of daily maximum temperatures. Bars rise toward a peak around 80 degrees, with fewer days in the high 50s and low 60s and fewer above 90.
Figure 1.5: A histogram of the same daily temperatures.

Each bar counts the days falling in a temperature range, and the pattern is now easy to read: most days land in the 70s and 80s, with a tail of cooler days near 56°F and relatively few above 90°F.

Bin width is a choice you make. Wide bins look smooth but hide detail. Narrow bins show more variation but can dissolve into noise. Figure 1.6 compares the same temperatures at four bin widths.

Four histograms of daily maximum temperature using 5, 10, 20, and 50 bins. The five-bin version is blocky, the fifty-bin version is jagged and sparse, and the middle two show the shape most clearly.
Figure 1.6: Four histograms of the same temperature data using different numbers of bins.

All four show the same general shape, but the extremes are unhelpful. Five bins is so coarse that the peak becomes one wide block. Fifty spreads 153 days so thinly that the bars jump around at random. The middle two are the ones you would actually use. The shape a histogram shows you is real, but only if you pick a sensible bin width.

1.8 Important Ideas: Distribution, Central Tendency, and Variation

Three terms will keep coming up: distribution, central tendency, and variation. Their everyday meanings aren’t far from the statistical ones.

  • Distribution: how values are spread across their range. A histogram is one way of showing a distribution. The shape of the distribution tells us where values are concentrated, where they’re rare, and how far the extremes reach. Later we’ll see that distributions don’t just describe data, we also use them to generate theoretical data, which is the basis for sampling distributions and tools like t-tests.

  • Central tendency is about sameness: where values cluster. In the temperature histogram, most days sit in the high 70s and low 80s, so we say the data have a central tendency around 80°F. Central tendency doesn’t mean “everything is the same”, just that many values gather in a common area. Some datasets even have more than one cluster, and therefore more than one central tendency.

  • Variance is about differentness: how spread out the values are. If every day had been 78°F, variance would be zero. Instead the days run from 56°F to 97°F, so there is real variance to describe. In practice, variance is a family of measures we use to quantify differences, and we’ll introduce those next.

1.9 Measures of Central Tendency (Sameness)

Plots and histograms show where values fall, but lack precision. We can summarize data with a single number representing its “center.” These measures of central tendency show what values are generally like.

1.9.1 Mode

The mode is the most frequently occurring value: count how often each value appears, and whichever wins is the mode. In 1 1 1 2 3 4 5 6 the mode is 1, since it appears three times.

Ties are allowed. In 1 1 1 2 2 2 3 4 5 6 both 1 and 2 appear three times, so the data have two modes.

The mode does not always land where you would call the center. In 1 1 2 3 4 5 6 7 8 9 the mode is 1, but nearly every value is larger. It is most useful when a dataset has genuinely repeating values, and like any tool it needs to suit the data you have.

1.9.2 Median

The median is the exact middle of the data once they are ordered from smallest to largest. For example:

1 5 4 3 6 7 9

Before we can compute the median, we need to order the numbers from smallest to largest. Ordered:

1 3 4 5 6 7 9

The median is 5, with three numbers on each side.

With an even count there is no single middle value, so the median is the midpoint of the two central numbers. In 1 2 3 4 5 6 that is halfway between 3 and 4, or 3.5.

The median holds still when extreme values do not. Consider 1 2 3 4 4 4 5 6 6 6 7 7 1000. Most values are modest and one is wildly out of line, yet the median is still 5, sitting right where the bulk of the data is. That value of 1000 is an outlier, a value much farther out than the rest. Outliers can drag the mean a long way while leaving the median untouched, and how to handle them is a question we return to later in the course.

1.9.3 Mean

The mean, also called the average, is the sum of a set of numbers divided by how many numbers there are.

\[Mean = \bar{x} = \frac{\sum_{i=1}^{n} x_{i}}{n}\]

The \(\sum\) symbol is sigma, and it means “sum these up.” The \(x_{i}\) are the individual numbers, \(i\) runs from the first to the last, \(n\) is how many there are, and \(\bar{x}\) is the mean. In plainer terms, it is the sum of your numbers divided by the count of your numbers.

For the five numbers 3, 7, 9, 2, and 6, that gives

\[\bar{x} = \frac{3+7+9+2+6}{5} = \frac{27}{5} = 5.4\]

Whether the mean is a good summary, as with the mode, depends on the data.

1.9.4 What does the mean mean?

Knowing how to calculate a mean is not the same as knowing what it represents. The formula divides a sum by a count, but what does that operation actually do?

Think about plain division. When we compute \(\frac{12}{3} = 4\), we are splitting 12 into three equal parts of 4 each. Division equalizes the numerator into identical pieces.

The same logic applies to the mean. Suppose you add up every daily temperature across the whole summer into one large total. If that total were redistributed equally across all the days, each day would get the same value. That value is the mean. Individual days were originally warmer or cooler, but the mean is the balance point created by spreading the total evenly.

This is why the mean is more than just arithmetic. It is the only single value that can replace every observation and still leave the total unchanged.

1.9.5 The weighted mean

One variation is worth having now, because it returns later in the course. When you average across groups that aren’t the same size, a plain average of the group means gives the wrong answer.

Suppose you’re monitoring vegetation recovery at three restored wetland sites. Each site was surveyed with a different number of plots:

Site Mean vegetation cover (%) Plots (\(n\))
A 46 12
B 58 14
C 73 30

What is the average cover across all three sites? The tempting move is to average the three site means:

\[\frac{46 + 58 + 73}{3} = 59\]

That answer treats a 12-plot site and a 30-plot site as equally informative, when Site C rests on more than twice as many observations as Site A. The weighted mean fixes this by letting each value count in proportion to a weight \(w_i\):

\[\bar{x}_W = \frac{\sum_{i} w_i x_i}{\sum_{i} w_i} = \frac{\text{weighted sum}}{\text{total weight}}\]

When the values being averaged are group means, the natural weight is each group’s sample size, so \(w_j = n_j\):

\[\bar{x}_W = \frac{\sum_j n_j \bar{x}_j}{\sum_j n_j} = \frac{(46)(12)+(58)(14)+(73)(30)}{12+14+30} = \frac{3554}{56} = 63.5\]

The weighted answer, 63.5, sits well above the unweighted 59, pulled toward Site C because that is where most of the actual data live.

You have already met this idea outside of statistics. A course grade works the same way: an exam worth 60% and a quiz worth 20% don’t get averaged evenly. Same formula, with percentages as the weights instead of sample sizes.

The same logic applies any time you combine group averages that rest on different amounts of data. Whenever you see an average of averages, it is worth asking whether the groups behind it were the same size.

1.9.6 Comparing the mean, median, and mode

So far we have three summaries of the “middle” of a dataset. It is worth seeing what happens when they disagree, because the disagreement itself is informative.

Temperature was a well-behaved variable: its mean (77.9°F) and median (79°F) sit almost on top of each other, which is what you expect when a distribution is roughly symmetric. Ozone is a different story.

Histogram of daily ozone concentration. Most days fall below 50 parts per billion, with a long thin tail extending past 150. Three thick vertical lines mark the mode at 23 ppb in green, the median at 31.5 ppb in blue, and the mean at 42.1 ppb in red, in that left-to-right order.
Figure 1.7: Daily ozone concentration with all three measures of central tendency marked. They fall in the order mode, median, mean, which is the standard signature of a right-skewed distribution.

All three land in different places, and the order they fall in is not an accident. For a right-skewed distribution you will nearly always find mode < median < mean, which is exactly what Figure 1.7 shows: the mode at 23 ppb, the median at 31.5 ppb, and the mean at 42.1 ppb.

They differ because each one is sensitive to something different.

  • The mean uses every value, so it feels the full weight of those bad-air days out past 150 ppb. Add one extreme day and the mean moves.
  • The median only cares about which value sits in the middle. Those same extreme days push it over by one position at most, so it stays down where the bulk of the days actually are.
  • The mode ignores position entirely and reports whichever value occurred most often. It answers a genuinely different question: not “what is the center” but “what happened most”.

Neither the mean nor the median is wrong here. They answer different questions. If you want to know what a typical day looked like, the median is the better guide. If you care about the total ozone burden across the summer, the mean is the number that relates to that total.

CautionWarning: When the mode gets fragile

Ozone is a continuous measurement, so exact repeats are largely an accident of rounding. The value 23 ppb occurs 6 times out of 116 days, barely more often than several neighbors. Round differently and the mode moves. It is at its best for categorical variables, where “most common land cover class” is exactly the question, and for values that genuinely repeat.

1.10 Measures of Variation (Differentness)

Central tendency tells us what values have in common. Measures of variation tell us how they differ. Any dataset with more than one value will show some variation, and summarizing that spread is as important as finding the center.

1.10.1 The Range

Consider these 10 ordered numbers:

1 3 4 5 5 6 7 8 9 24

The smallest is 1, the largest is 24. Together they define the range. The range quickly shows the boundaries of the data and can flag possible outliers. For instance, if you expected values between 1 and 7 but found one at 340,500, you’d know something unusual happened and might investigate.

The range is a blunt instrument: it uses only two numbers and ignores everything in between, so a single unusual value moves it a long way. What we actually want is a measure built from every observation, one that says how far a typical value sits from the center.

That measure is the variance, and its square root the standard deviation. We build both in the next chapter, because the same machinery that describes how one variable varies turns out to describe how two variables vary together, which is exactly what correlation measures. Building it once, where it does both jobs, beats building it twice.

1.11 Remember to look at your data

Descriptive statistics are useful, but they are also compressed summaries. They reduce a dataset to a few numbers, which means they always lose detail. That’s fine if the summary captures the important features, but sometimes it doesn’t.

TipTip: Always pair a summary with a plot

Compute the descriptive statistics, then plot the data, and check that the two tell the same story.

We just did this with ozone: the gap between the mean and the median said “skewed,” and the histogram confirmed it.

When the numbers and the graph disagree, believe the graph. A summary can only report what it was designed to measure, while a plot shows you everything, including whatever you failed to anticipate. The next chapter makes this concrete with a famous set of four datasets that share nearly every summary statistic and look nothing alike.

1.12 Chapter Summary

Why it matters. Every analysis later in this course assumes you already have numbers that mean something and a sense of what they look like. This chapter covers both halves of that: where data come from, and how to describe them once you have them.

Core ideas

On measurement and study design:

  • Why statistics matters. It will not answer every scientific question, but it provides a disciplined way to separate signal from bias, and to avoid being fooled by aggregated data, as Simpson’s paradox shows.

  • Operationalization and measurement. Turning a broad concept like soil health into something recordable is a decision you have to make and justify, not something the data hands you.

  • Scales of measurement. Nominal, ordinal, interval, and ratio, plus the continuous-versus-discrete distinction. These determine which statistical tools are available to you, which is why we return to them all semester.

  • Predictors and outcomes. The roles variables play in an analysis, and the several vocabularies used to describe them.

  • Experimental and non-experimental research. Environmental science rarely permits full experimental control, so the field leans on quasi-experiments, long-term time series, and case studies.

On describing data:

  • Plot first. Scatter plots and histograms show the shape of a distribution, and bin width is a choice that changes what you see.

  • Central tendency. The mode, median, and mean each summarize the “middle” differently, and they diverge when data are skewed.

  • The weighted mean. When you average across groups of unequal size, weight each value by its own \(n\). A plain average of group means silently treats a small group as being as informative as a large one.

  • Variation. The range gives a first, blunt sense of spread. The measures built from every observation, the variance and the standard deviation, arrive in the next chapter alongside correlation, since they share the same machinery.

  • Always look at the graph. A summary reports only what it was built to measure, so pair every one with a plot.