ApiaryActiveLive
Try: pause · settings · learn · wipe
← Community / Reading Room
TS
applied-measurement · 25 min read

The Spread Grows with the Rain Total

!Small garden rain samplers arranged from dry ground to a wet corner after a passing shower. (generated illustration)

Small garden rain samplers arranged from dry ground to a wet corner after a passing shower. (generated illustration)
Small garden rain samplers arranged from dry ground to a wet corner after a passing shower. (generated illustration)
Invented absolute residuals at four fitted levels (illustrative; data table below)
Invented absolute residuals at four fitted levels (illustrative; data table below)
CategoryValue (millimeters)
Fit 20.2
Fit 50.7
Fit 101.5
Fit 204

Illustrative only, not taken from a source dataset. Single constructed residual per level illustrates the question, not proof of unequal variance.

On a dry week, two collectors at the same garden agree closely. When the first modest shower arrives, they differ by an amount you could almost assign to the marks on the glass. During the next long storm, one registers substantially more water than the other. The difference is bigger in millimeters, but does that mean something broke? Or did a process that was always variable simply have more opportunity to differ? You can begin to answer those questions by comparing how wide the errors are at different expected rain totals. The important thing is to look at the spread without losing sight of the center.

The case in this article is a fictional calibration and monitoring problem. It is not a rainfall dataset, a weather forecast or a specification for commercial instruments. Picture a set of simple gauges near a community garden and a better documented comparator that can be read over the same intervals. The garden team wants to understand whether its usual estimates get less precise at larger accumulation levels. A pattern in the readings might matter for reporting rainfall or for deciding when to check soil moisture after a storm. A single value printed as the uncertainty for the whole range could be too cautious for modest totals and too confident for big ones.

The problem has a name, heteroscedasticity: the conditional variance is not constant across the range of interest. It is a statement about a distribution, not a statement that every high reading is wrong. One large deviation at a high level does not establish it. Nor does seeing a fan automatically tell you that the hardware is responsible. A misdrawn average curve, changes in what was measured and clusters of observations from the same storm can all make the diagram look wrong. The first use of a residual graph is to tell you which of those questions deserves another look.

Write down what the gauges are supposed to measure

Start with the quantity and interval. A gauge can report depth accumulated during a particular period at a specified location. “After the storm” is not sufficiently precise if one collector was emptied before the storm was over and another was read on a fixed morning schedule. An extra hour of rainfall at one instrument belongs to a different observation interval. It is not a sign of increasing measurement variance about the same quantity. Choose a start and end convention, log the actual reset and reading times when possible, and flag departures from that convention.

Decide what role the comparator plays. A well maintained nearby gauge is not a perfect statement of what fell into each collector. True rainfall can differ across locations, and the better documented gauge still has a measurement process of its own. For an instrument comparison, co-location under suitable exposure can help separate instrument differences from location differences; for a garden map, variation across locations might be the actual subject. A model describing the garden gauge conditional on the comparator can be useful even if it cannot isolate the error of either one. Tell the reader which of those tasks the study took on.

Units and ranges are part of the definition, too. If a collector gives a volume and your spreadsheet converts it to depth, state which effective area is used. Do not quietly combine daily totals with sums over irregular gaps just because both columns say millimeters. A collector that overflows has not measured a high total with a small residual. It has given an incomplete observation that may at best indicate a lower bound, depending on how it overflowed. If a logger was offline, that blank is not evidence of zero rain. Give missing, capped, truly dry and usable observations different codes.

Put the instruments and protocol into each record. An old gauge swapped for a different model during the wettest month can make totals at the high end disproportionately come from the new instrument. A tilt, partial obstruction, movement of a branch or a different recording resolution can all create apparent groups. You do not need to collect every environmental variable under the sun. Gather the context that lets you trace a visible pattern to checkable differences in setup. If there is nothing but a number and a date, you may have to describe the pattern without diagnosing it.

Make the residual an interpretable number

Choose an initial mean model. It may be a straight line relating the collector reading to the comparator, with a slope and intercept fit using paired data. A different study might start with a scientific expectation that both agree on average at each level, in which case a difference plot around the identity relation is a useful starting point. Do not call a raw gauge-minus-comparator difference a fitted regression residual unless it really is the observed reading minus the result of a fitted model. Both are good diagnostics when they are labeled according to how they were made.

The residual is observed response minus fitted response. If the fitted value is 10.0 millimeters and the measured response is 11.5 millimeters, the signed residual is positive 1.5 millimeters. If the measured response is 8.5 millimeters, it is negative 1.5 millimeters. Taking the absolute value makes these two cases match in size and discards the direction. The NIST/SEMATECH handbook's model validation section explains residuals and why an overall measure of fit such as a large R squared cannot tell you whether the model has captured the structure that matters to a particular application.

Plot signed residuals first. Put fitted response in millimeters on the horizontal axis and observed minus fitted depth on the vertical axis. Draw zero clearly and show individual observations. For a small pilot, labeling points by event or collector can be more useful than smoothing them. Look for a cloud centered near zero across the range, then examine whether the cloud is about as tall at the low end as it is at the high end. A narrow band that bends systematically above or below zero is not the same problem as a band that widens symmetrically around it.

Follow up by plotting the residuals against the actual measured predictors and in time order. Equal fitted means can come from different combinations of predictors; a plot of residuals against one combined fitted number can hide such differences. A run sequence can show changes after a new collector was installed, gaps after a maintenance round or a string of deviations with the same sign as a front moves through. NIST/SEMATECH's graphical techniques index lists scatter plots, diagnostic distributions, lag plots and run sequence plots that answer different questions. No single graphic replaces all the others.

Invented absolute residuals at four fitted levels

The bar chart and table show one constructed absolute residual at each of four fitted response levels. The bars are measured in millimeters. They are illustrative only, not rain measurements, not a dataset from NIST, not estimates of variance and not grounds for fitting a variance trend. One residual at a level cannot tell you the width of the distribution there.

Fitted levelFitted response (millimeters)Absolute residual (millimeters)
Fit 220.2
Fit 550.7
Fit 10101.5
Fit 20204.0

The four bar heights are 0.2, 0.7, 1.5 and 4.0 millimeters. The last bar is twenty times the first, but that arithmetic says nothing by itself about a ratio of standard deviations. You cannot even see whether the deviations were positive or negative. Dividing the heights by their fitted levels gives 10, 14, 15 and 20 percent for these particular invented points; that also fails to show whether the true process has constant relative error. The bars explain how to notice and articulate a question rather than answer it with a sample of four.

In a real analysis use a scatter plot rather than four bars, keeping all observations visible if possible. Where points pile up, transparency, labels, counts or a separate summary can keep a single stack from suggesting there was only one reading. Carefully chosen groups with visible sample sizes can be helpful when a larger set of observations spans the range. One band might contain totals between two and five millimeters and another may extend much further because storms at the high end are rare. Tell readers how bands were chosen. Bands selected after seeing the trend can make a pattern look more orderly than it is.

Summarize the center and spread separately. A median signed residual can show a shift in a band; a measure of spread about that center can show dispersion. If you calculate a median absolute residual around zero, it may grow because the center has drifted away from zero even if the deviations around the local center are no wider. If you compare the standard deviation within several bands, keep in mind that a steep mean shift within a band can inflate it. The diagnostics work together: plot the signed data and check the fitted curve before claiming that a rising absolute residual plot measures conditional spread.

Ask what else could make the cloud widen

A model can be systematically wrong without being very imprecise at any one level. Suppose a collector responds almost proportionally at low amounts but starts losing water under conditions that are common in high intensity events. A straight line may overpredict at one end and underpredict somewhere else. The squared or absolute deviations would look large where the curve is wrong. If the signed residuals form a smooth arc, investigate the shape of the average response rather than immediately downweighting the parts of the range where the current model fails. Downweighting could hide the physical transition you most need to understand.

Also look for a mixture. A gauge in an open area and a gauge next to shrubs can behave differently at the same comparator total. If the two collector populations separate as totals increase, the pooled residual cloud widens even if the separate clouds are fairly tight. Label instrument or site on the plot, then check whether each group covers enough of the range for a useful comparison. If one collector only appears at high levels, the record cannot separate its effect from level. That is a study design finding. It is not a reason to force a model to decide which explanation is true.

Shared storms create dependence. Five nearby gauges are five instruments but may experience much of the same storm. It may also be possible for several daily readings to come from the same multiday event. If the storm is unusual, all five deviations could point in the same direction. Treating each as an independent test of variance exaggerates how much evidence the group supplies. Record storm identifiers where appropriate, and evaluate checks and held-out performance with that grouping in mind. A single storm with several gauges does not give the same kind of evidence as separate independent storms at similar levels.

Rounding around the dry end may make data look falsely tidy. A gauge that reports fixed increments can produce rows of identical numbers or alternating steps rather than a smooth narrow cloud. A trace is not always a true zero, and a transformed plot that excludes zeros can make the wet cases look more regular simply by deleting this feature. Do not use jittered display points as input for calculations. If visual jitter helps show overlaps, label it as display only, or show counts on each row instead. Compare the measurement resolutions and ask how a one-increment error would look at different totals.

Check endpoints manually. A high fitted observation with large residual might be an interval mismatch, an arithmetic conversion or a plausible first example of a rare event. If it was entered in the wrong units, correct it when the original can establish the right value. If it is a genuine observation with a legitimate marked condition such as an overflow, preserve that condition and use a model or summary that handles it. If no explanation can be found, run a transparent sensitivity comparison rather than discarding it merely because it is awkward. The observation with the greatest power to reveal a problem can also have great power to distort a fit.

Design the next round to answer the uncertainty question

If the first plot suggests wider spread for heavy rain, ask how many genuinely separate events your upper range contains. Many hours recorded within one storm may occupy that end without providing a second occasion to see whether the same deviations recur. If more data are needed, decide whether the question concerns gauge repeatability, event-to-event comparability or the garden's true spatial variation. Repeating an instrument test under a fixed load can help with the first question, but does not reproduce the wind, intensity or exposure of natural storms. More field records may be required for the second or third.

Group repeat measurements with a purpose. Side-by-side instruments read over the same period can help show differences between them under similar rain. Changing their positions in a documented sequence can help reveal effects of siting if done safely and without compromising an event. Repeated readings of an unchanged water level tell you something about reading precision, not variability in catch. Lumping these operations together under the heading repeats would combine different processes. Design each record to answer the question it can support, and keep the others as checks.

When high totals are rare, make the limited range visible instead of interpolating a convincing-looking band into empty territory. Report the distribution of levels and the number of distinct events observed at each part of it. It may be reasonable to state that the data support a model up to a certain level and that no calibrated predictive interval is available beyond it. A future heavy storm becomes a test rather than a situation in which the dashboard silently assumes it has learned the answer. If you really need an operational choice above the observed range, a conservative fallback and practical inspection can be more honest than numerical extrapolation with narrow bounds.

Set success criteria before the second round. One criterion might be that recorded high-level residuals are centered and that a wider predictive band achieves acceptable coverage on separate storms, without using a constant band that overwhelms mild totals. Another might simply be that comments associated with the largest discrepancies no longer point to reset time confusion. Tie the criterion to what the team controls and what it needs. It is easy to improve a report card by changing the error score after seeing the revised fit; that does not necessarily improve any decision the report was intended to support.

Choose a remedy that matches the job

The first option is to keep a defensible mean fit and improve how you express its uncertainty. Unequal conditional variance by itself does not necessarily bias ordinary least-squares coefficient estimates when the mean model and conditional mean assumptions are correct. The usual constant-variance standard errors, however, may be inappropriate. Heteroscedasticity-consistent standard errors can help with inference about coefficients under their applicable conditions; they do not automatically produce useful ranges for a future observation at every level. They also do not by themselves account for repeated observations within a storm. Keep the inferential target clear before choosing a correction.

Prediction is a separate job. A narrow interval for the estimated average around ten millimeters does not mean an actual individual reading there will be close to the average. A future reading can vary both because the mean curve is estimated and because a fresh outcome has real conditional scatter. If the objective is a forecast band, estimate and validate the spread of individual outcomes where the forecast will be used. If observations come from shared storms, performance on portions of one held-out storm will differ from performance on a truly new event. Choose the holdout to match the use you claim.

If errors look roughly proportional to the mean over strictly positive values, a logarithmic response can be worth trying. A difference on that scale compares ratios: a measured positive response of eleven versus a positive prediction of ten has the same log ratio as twenty-two versus twenty. That may be closer to how the deviations arise in the process. It does not mean that all positive data should be logged. Near zero, a small additive reading effect may dominate; exactly zero cannot be logged. Adding a constant changes the problem and the results, especially at the low end. Do not call that a harmless computational tweak or choose a constant simply because it makes residuals look tidy.

When fitting a model on a log scale, check it on that scale and judge the results on the original scale relevant to decisions. Exponentiating the expected log response does not generally give the arithmetic mean response. Depending on the distributional assumptions it may be interpretable as a typical multiplicative value or a conditional median, but calling it the expected millimeters requires further work. A model-based or empirically estimated retransformation adjustment may be suitable; the adjustment depends on how the residual distribution varies. Report which quantity you back-transform. A forecast of a typical event is not interchangeable with a forecast meant to sum up total expected rainfall over many events.

The other common option is weighted least squares. The handbook's weighted regression discussion explains why observations with different error variances can receive different weights when estimating the mean. In the basic independent-errors setting with a correct variance model, weights proportional to the inverse variance give more influence to more precise observations. If conditional standard deviations are believed to be one and two millimeters at two levels, the associated variances are one and four millimeters squared. A weight ratio of four to one, not two to one, follows from the inverse-variance construction. These are separate hypothetical standard deviations, not the four individual residuals in the chart.

Do not set each weight to the inverse square of that one point's residual. Near-zero observed residuals could receive overwhelming influence, even if those readings happen to agree by luck. It also turns a noisy, fitted outcome into a claim about the precision of that individual point. Estimate the variance structure from replicates, good external instrument information or a sufficiently supported model of variation. Note how the uncertainty in that estimate can affect the result. The handbook warns in particular that weights estimated from very small replicated samples can perform poorly. Compare important conclusions to unweighted results and inspect where the weighted fit changed.

Choose how the models will compete

Imagine the team has fitted three sensible candidates: an ordinary mean curve followed by a separate estimate of conditional spread, a log response model for positive wet measurements, and a weighted original-scale curve. None should win simply because its in-sample diagnostic picture has the smoothest shape. Decide which observations can be held aside without splitting one weather event into nearly identical training and test records. Run the models on the same test cases, where their domains overlap, and compare the outputs for the actual decision. If one cannot handle dry readings by design, its apparent gains on wet cases cannot be advertised as a win on the entire calendar.

Choose measures that state their unit and what behavior they reward. Mean absolute prediction error on the original scale describes the typical absolute size of a deviation in a way an operator can connect to millimeters. A root mean square error makes large misses count more, making it useful when particularly bad misses deserve extra weight, but a result dominated by one extreme event could be unstable. A percentage score can become unreasonably large or undefined near zero. You do not need all three. Explain which situations matter and use a small set of measures to check whether the preferred model actually improves them.

For intervals, count how often a new reading falls between the limits and examine the width of those limits. A nearly infinite band will cover everything and remain almost useless; an implausibly narrow band can look better on a screen while repeatedly failing the decision. Divide coverage into scientifically useful ranges if there are enough events, and show the counts as well as percentages. Small counts matter here: coverage of four out of five is not quantified nearly as well as coverage of forty out of fifty, even though both numbers say eighty percent. Keep coverage conditional on the test conditions you documented rather than suggesting a universal probability.

Look at a few decisions, not just at numeric aggregates. Suppose the gardener has a branching rule for inspecting drier beds after a modest shower. A smaller average error during very large events may leave that rule unchanged, whereas a model that reduces false certainty around the modest-shower threshold is valuable. Conversely, if the project is a gauge quality dashboard intended to flag extremes, consistent misses at the high end matter even when the overall average is satisfactory. Write down a scenario in which selecting the wrong model changes an action. This exposes cases in which an elegant fit improves the wrong part of the range.

Reusing the holdout repeatedly turns it into another design input. If the first event held aside leads you to change the curve, choose a transformation and decide which predictors to include, describe that event as part of development. Then evaluate the selected procedure on another, genuinely independent event or set of events if available. With limited data, a grouped resampling approach may be helpful, provided all model and weight selection happens within the fitting partitions. Do not treat every resampled prediction as an independent field result. In a small pilot it may be better to report candidly that several candidate approaches remain plausible than to declare a winner based on negligible differences.

Understand what a set of weights is actually saying

Two weight schemes can sound equally scientific while answering different questions. Inverse-variance weights are a model of the information each observation contributes to estimation. A scheme that intentionally gives more influence to very wet events because they are costly to mispredict expresses an operational preference. The second can be reasonable for a particular prediction task, but it should not be described as an inverse-variance calculation or given the same interpretation for fitted coefficient uncertainty. Write the rule that defines the weights and why it was chosen. If the record contains design or sampling weights for another reason, keep those distinctions visible as well.

Where the supposed variance changes smoothly, a set of separate estimates from tiny, arbitrary groups can be unstable. A smooth variance function anchors neighboring levels to a common relationship but imposes its own shape. Storm exposure may change abruptly rather than smoothly, so such a function can bridge across a failure mode as though it were ordinary variation. Look back at the field notes, check within groups and compare predictions near any suspected boundary. If an estimate collapses toward zero because the instrument has a coarse display around dry conditions, consider the rounding process explicitly rather than letting that estimate give dry points virtually unlimited influence.

In the weighted fit, the unscaled residuals tell you how many millimeters each observation missed by. A residual multiplied by the square root of its modeled weight expresses the miss on the scale of the assumed precision, up to a common factor. Plotting that scaled residual can help diagnose whether the variance model has made the remaining spread more comparable. The raw plot still matters. A four millimeter discrepancy is four millimeters in the garden, even if it is common at the high end and not unusually large under the model. A one-panel report that shows scaled differences only can conceal the practical magnitude of the larger misses.

Remember that a point's leverage also affects the residual from a fitted line. An observation at an extreme predictor level may help pull the fitted relationship toward itself, making its in-sample residual look modest precisely because it had a great deal of influence. A smoother fit is not a promise that the far end will predict well. Review how much the coefficients or predictions change when an event is held out and note when very little evidence defines the extreme. Do not interpret that sensitivity as a mandate to remove the event. It is a reason to temper claims about how well the relationship is known there.

Decide how a dry interval enters the story

A dry period deserves its own place in the field register. If both instruments report zero, there is little to learn about how their positive readings agree, yet the record may be central to measuring false wet detections. If one instrument reports a trace, you may be looking at resolution, local exposure or a reading interval mismatch rather than at an error that scales with the total. The definitions behind those codes can become more important than any proposed transformation. Check that the same rule applies to all seasons and to replacement instruments.

For a task that needs to predict a mix of dry and wet outcomes, you might separate whether any measurable accumulation is expected from how much is expected given positive accumulation. This does not make every zero artificial or imply that one particular statistical model should be used. It lets the two pieces of the decision have different evidence. If the comparator is already an observation of the event, your task may instead be to correct a reading, not to forecast weather at all. In that case the wet/dry split could simply be a diagnostic showing where rounding limits resolution. Avoid attaching more sophistication than the data and task need.

At a meaningful threshold, write the two kinds of uncertainty separately. One is uncertainty about whether a true positive amount was present. The other concerns the amount once the collection indicates a measurable positive level. A log fit on positive data can address aspects of the second without addressing the first. Report how many records were retained and why the others were removed from that analysis. A small note about zeros near the chart will prevent another reader from trusting a wet-case result to classify all days.

Isolate what this collection system cannot see

A comparator reported to tenths of a millimeter is still only a comparator. If its error is appreciable and it is the explanatory variable, treating its reading as the exact rainfall can change the apparent slope of the relationship and distort how residuals look near the limits. Fitting the garden reading against the comparator is not generally equivalent to fitting the comparator against the garden reading and algebraically reversing the equation. The response direction belongs in the model description. If the aim is to estimate a calibration against an unknown true value, consider whether additional reference or replication information can identify the two measurement processes before assigning variance to one instrument.

A second limitation appears when you aggregate. If the model fits hourly accumulations, you cannot obtain a daily uncertainty by multiplying the hourly standard deviation by the count of hours. Nor can you always add hourly variances and take their square root. Dependence within a storm can link the deviations, and daily sums also handle zeros and gaps differently. A daily model may avoid some of the assumptions needed to build the total from individual hours, but it will answer a daily question, not catch errors in onset times or peak intensity. Select an interval that matches the decision before deciding which loss of detail is acceptable.

For a useful extra graphic, try a plot of paired readings against one another with the line of equal readings identified. Show the fitted curve if there is one and label the instruments on both axes. The distance from the equal-readings line has a different meaning from the residual about the fitted curve. For example, tight observations clustered along a line with a slope far from one would show predictable disagreement rather than close raw agreement. A residual plot can look reassuring in that situation because the fit has adjusted for the discrepancy. Use the paired plot to retain the agreement question alongside the uncertainty question.

Prepare a decision note for next season

The most valuable output of the analysis may be a one-page note rather than one equation. Put the quantity and interval at the top. Identify the stations, the date range, missing or capped records, and the model used for the comparison. Include the signed residual plot, a visual or tabular summary of variability, and the count of distinct storms at the range extremes. If a new count includes several instruments seeing the same event, allow the reader to distinguish events from instrument readings. This note makes it possible to look at next year's graph without relying on memory about where last year's values came from.

State what the first development cycle actually supported. A careful conclusion could say that absolute errors appeared wider at higher fitted values in the development records, that the low range was affected by display resolution, and that only a few independent large storms were available. Follow this with a specific test, such as repeating paired observations under consistent intervals and comparing the upper predictive limits on separate events. That combination is useful before there is statistical certainty. It tells the garden team where to focus the next observations without promising a universal improvement from a transformation.

As a final check, imagine a volunteer following the interpretation without knowing any of the terminology. Would they know when to enter a blank instead of zero? Would they understand that a future reading can fall farther from the mean during a large storm without being automatically defective? Would a consistently negative string of deviations trigger an investigation rather than get waved away as bigger variance? If a report cannot support those distinctions, simplify its labels. Use technical terms in explanations, but the operational instructions can remain concrete about what to record and when to stop trusting a number.

When the mechanism is uncertain, assign a practical next check before trying to improve the software. If the high end contains one event from an instrument with an unknown exposure, collect a comparable event with the setup documented. If a long storm splits around midnight in one file but not the other, fix the pairing logic and rerun the plots. If the cloud still fans out with a good center and reliable context, compare defensible variance treatments. Those actions are not interchangeable: a better interval cannot repair wrong timestamps, and a correctly aligned clock will not make a naturally variable measurement process constant.

The lesson is not that high rain is unmeasurable or that every wide cloud calls for weights. It is that the trust you place in a measurement may change with its level, and that you can test where and how it changes. Keep direction before absolute value, dates before pooling, and the relevant scale before choosing a model. Make observations where the record is thin and retain the reasons things went missing. Then the next person looking at a heavy rain reading will know whether it warrants a maintenance check, a wider range, or simply an honest note that the garden has not measured enough storms like this one yet.

Sources and illustration note

All toy values were created for the article and are not sourced rain measurements. If generated, the hero art is an imagined arrangement of garden collectors and not evidence of a field installation or experiment.

Frequently asked
What is The Spread Grows with the Rain Total about?
!Small garden rain samplers arranged from dry ground to a wet corner after a passing shower. (generated illustration)
What should you know about write down what the gauges are supposed to measure?
Start with the quantity and interval. A gauge can report depth accumulated during a particular period at a specified location. “After the storm” is not sufficiently precise if one collector was emptied before the storm was over and another was read on a fixed morning schedule. An extra hour of rainfall at one…
What should you know about make the residual an interpretable number?
Choose an initial mean model. It may be a straight line relating the collector reading to the comparator, with a slope and intercept fit using paired data. A different study might start with a scientific expectation that both agree on average at each level, in which case a difference plot around the identity relation…
What should you know about invented absolute residuals at four fitted levels?
The bar chart and table show one constructed absolute residual at each of four fitted response levels. The bars are measured in millimeters. They are illustrative only, not rain measurements, not a dataset from NIST, not estimates of variance and not grounds for fitting a variance trend. One residual at a level…
What should you know about ask what else could make the cloud widen?
A model can be systematically wrong without being very imprecise at any one level. Suppose a collector responds almost proportionally at low amounts but starts losing water under conditions that are common in high intensity events. A straight line may overpredict at one end and underpredict somewhere else. The…
References & sources
  1. Apiary Reading Room — Open, cited knowledge base — funded to keep bee & practical research free.
From the Apiary Reading Room. Opinion & editorial — not financial advice. We don't overclaim.
More from the Reading Room