
| Category | Value (count) |
|---|---|
| A | -3 |
| B | 0 |
| C | 2 |
| D | 5 |
| E | 6 |
Illustrative calculation, not observations from the linked source. Differences for matched sites, not interchangeable sorted rows.
You can ruin a before-and-after comparison without changing a single observed number. Take five garden plots. Count the same thing at each plot under a stated rule before a change and again afterward. One plot drops by three counts, another stays the same, and the others rise by two, five, and six. Sort the two measurement columns independently and subtract each new row from the corresponding row in the other column. In the worked example here, all five lines will now rise by two. The two column averages still agree with the originals. An automated check that only compares totals could easily bless the wrong result.
Summary. Pair observations by the unit actually measured, not by where they happen to appear in a file or how high their values rank. Compute after minus before only after confirming what makes a pair. Show the distribution of signed differences and keep valid zeros separate from missing matches. When the same complete pairs receive equal weight, the mean of the within-pair changes equals the after mean minus the before mean. That identity cannot recover which sites changed or how spread out those changes were. The five plot records and every chart value in this article are illustrative, not field observations.
Decide what a pair means while you can still check it
Start with a concrete question: how did a specified count differ between two scheduled rounds at each of five existing plots? In this example, a plot is the unit of pairing. We do not pair the third-highest count from one round with the third-highest count from the other. We pair the measurement made on plot C before with the measurement made on plot C after. In a calibration exercise, the pair might be two readings on the same object, one from each instrument. The recurring object, not the reading rank, carries the link.
The NIST/SEMATECH Engineering Statistics Handbook explains the principle in its section on paired observations. Observations are paired when there is a natural correspondence between the first and second measurements. Its examples include using two measuring devices on the same products and observing the same objects before and after a process. The paired analysis works with the resulting differences. The garden example below is original teaching arithmetic that applies this idea; it is not extracted from NIST experiments or supplied as a general field protocol.
An identifier should represent the comparison unit consistently through the two rounds. For a garden, label a plot in the map and visit record, not according to today's queue position. If two teams are surveying different gardens, their local plot labels may repeat. A garden identifier combined with the local plot label can distinguish Garden East plot A from Garden West plot A. If rotations or repeated treatment cycles are part of the study, the matching key may also need a round-pair or cycle identifier. The point is to specify what makes observations comparable rather than packing unrelated strings into a unique row label.
A persistent name is necessary but not sufficient. If someone moves the stake for plot C to another bed between rounds, values with the same label may refer to different geographic units. A footprint record or an unambiguous physical description helps decide whether the unit is still the same. Suppose the before watch covered a ten-metre border, but after a closure the observer looked only at two metres accessible from one end. Whether that counts as the same outcome depends on the planned definition. It may be a valid pair for a narrower analysis if the corresponding before section can also be recovered. It should not become a whole-border comparison merely because the worksheet still says plot C.
Sometimes matched units are not literally identical objects. A design can match sites on preselected characteristics, for example pairing two sites of similar exposure before allocating different monitoring conditions. That correspondence is created by the design and must have evidence independent of the outcome under study. Pairing by the observed post-treatment outcome would create a substantially different comparison. If matching is done algorithmically using background variables, record those variables, the rule, and when the match was set. Pairing is an evidential decision, not a consequence of getting two tables to have the same number of rows.
Divide the work into observation and comparison. Preserve the original records with their identifiers, dates, periods, measurement rules, and statuses. Then build a comparison table with a single row per intended matched unit that points to the relevant underlying records. Keeping them separate helps resolve errors without rewriting field history. The pairing table can say why a unit was excluded or labeled partial without turning an observation that happened into an observation that never happened.
Reconstruct the chart from real pairs in the fictional ledger
The chart titled “Change at five paired hypothetical plots” uses after minus before as its sign convention. A value to the negative side of zero means the second count was smaller; it does not say that a change was good or bad. Zero means the two recorded values were equal for that completed pair. The chart measures signed count differences, not percentages, actual bee abundance, probabilities, or results supplied by the source handbook.
| Plot | Before count | After count | Change: after minus before |
|---|---|---|---|
| A | 15 | 12 | −3 |
| B | 10 | 10 | 0 |
| C | 9 | 11 | +2 |
| D | 8 | 13 | +5 |
| E | 11 | 17 | +6 |
The coordinates A through E are plot identities, not magnitude ranks. The before total is 53 and the after total is 63, which gives means of 10.6 and 12.6 over the five plots. The changes add to ten, so the mean paired change is two. The median of the paired changes is also two, but there is no rule requiring those two statistics to coincide. Three plots gain, one is unchanged, and one declines. The lowest change is minus three and the largest is plus six, a span of nine counts. A useful caption can report those categories so that the positive headline average does not erase plot A.
The row for plot A reads as follows: in this invented measurement, plot A recorded fifteen before and twelve after; subtracting fifteen from twelve gives minus three counts. Four other comparisons have different outcomes. Nothing in the arithmetic identifies why a plot declined or whether the decline was against the editor's goal. If the goal is to reduce a nuisance count, a negative change might even be favorable. Specify that interpretation alongside any classification and avoid labeling the positive sides of an exploratory graph as “success” unless success was independently defined.
For a technical check, keep every pair and subtract full-precision eligible values before rounding the resulting difference for display, unless the measurement was intrinsically discrete. Rounding both endpoints can obscure a small difference or change whether it appears to be a tie. In this example the values are integers, so the zero is exact for the recorded scale. If a sensor rounds both readings to the same degree, an apparent zero means no difference at the recorded resolution rather than infinite precision. The interpretation belongs in the methods, not in a guess made from the size of a bar.
Spot checks become faster when the figure and table carry the same data. A reader should be able to choose plot D and find eight before, thirteen after, and a change of five without relying on contrast or identifying two colors. The graph has a meaningful zero line. A zero-height bar is not an error; an explicit value label or table cell communicates that it was observed. A missing endpoint should not appear as a bar with zero height. Its separate status should remain visible even if the final numerical chart covers only complete pairs.
See what the incorrect sort preserves
Sort the before values in increasing order and set their identities aside: eight, nine, ten, eleven, fifteen. Sort the after values independently: ten, eleven, twelve, thirteen, seventeen. Every corresponding position differs by two. That says something true about these lists: each ranked after value exceeds the equally ranked before value by two. But it does not say anything about the within-plot change without additional evidence. The first line is plot D before and plot B after. They are different places. The fifth before line is A and the fifth after line is E. The high end of a ranking cannot tell you that E started there.
Among these pairings, the line beginning at plot C's before value of nine happens to end at plot C's after value of eleven. That lucky match does not validate the other four. A reproducible comparison should not depend on accidental rank stability. If a data cleaner happens to discover that several positions agree after sorting, check the identities across all rows rather than declaring that the sorting strategy was harmless. A partially preserved connection is one of the harder errors to notice in visual inspection because some values look entirely plausible.
A side-by-side display of the independently sorted columns can serve a legitimate purpose: comparing the distributions without making any claim of identity. For example, a plot of matched quantiles can show shifts in the overall marginal distributions. Its axis or labels should make the rank-based comparison explicit, and it should not be titled “change at five paired plots.” You can publish that figure alongside the paired plot if readers might want both perspectives. The datasets answer different questions even though they use the same ten numbers. Preserve both by making the matching view and the rank-based view separate products built from the same untouched observations.
Why did the average remain right? With equal weight and the same set of complete pairs, sum the after values and subtract the sum of the before values. Rearrangement within either list cannot change its sum. The sum of the pairwise changes on valid pairs equals that difference of sums, so dividing by the number of pairs produces the same numerical result. But that argument knows nothing about the spread or direction at each plot. It works for legitimate matches and for all permutations of them. The equality of two means is a useful arithmetic check; it is not a linkage check.
The agreement also should not be extended to filters or weighted calculations. If one period has values from an extra unpaired site and the other does not, the marginal means do not describe the same complete set. A mean restricted to matched sites can differ from the overall after mean minus the overall before mean. With fixed unequal pair weights, the change of means and mean of changes agree only when both margins and changes use the same eligible pairs and weights under the same normalization. Sorting endpoints independently while weights stay tied to the original site can change even the headline result.
Why spread, correlation, and individual signs change
The original changes are minus three, zero, two, five, and six. Their mean is two. Distances from that mean are minus five, minus two, zero, three, and four. Their squared deviations sum to fifty-four. Dividing by four, one less than the number of pairs, gives a sample variance of 13.5 squared count units. The sample standard deviation is about 3.67 counts. The false rank differences all equal two, giving sample variance and sample standard deviation of zero. Same average, utterly different information about whether outcomes vary by plot.
One identity explains the discrepancy. With the same pairs, the sample variance of after-minus-before differences equals the sample variance of the after column plus that of the before column minus twice their sample covariance, using the same usual divisor for all quantities. Covariance here measures whether values above or below their own period mean tend to be paired together. Sorting both columns in the same direction usually pairs comparatively large values with large values instead of preserving the original relation. In this special example it builds a perfectly aligned shifted sequence. The two marginal variances stay fixed, but the covariance becomes the common marginal variance, leaving zero variance in the differences.
The measure of variation used in a paired mean comparison comes from differences when the design and assumptions call for that analysis. The NIST paired-observation section calculates the mean and sample standard deviation of those differences and uses the latter divided by the square root of the number of pairs in the paired t statistic. Under the correct fictional rows that denominator is about 1.64 counts. Under the incorrectly sorted rows it is zero. That does not make the fabricated result conclusive. It makes the usual formula unusable with those inputs and gives a strong reason to check the linkage. A real, correctly paired zero-variance sample is possible; it too needs appropriate handling rather than a claim of infinite certainty.
Even before considering any inferential method, the simple signs give different operational guidance. A team might want to look again at any plot with a decline, keep one known stable site for comparison, or group very large moves for a data quality review. The falsely sorted version routes no plots to follow-up for declines or ties, even though one of each is present in the real comparison. It also understates the two largest gains. A data review based only on whether the grand average exceeded a target cannot recover those lost decisions.
This is not a universal argument that any independently sorted data have zero spread in their rank differences. The result is exact here because the sorted after values happen to equal the sorted before values plus a constant. Other data can produce quieter or noisier false contrasts, different medians and different signs. Some datasets have many ties, and multiple rank-to-rank assignments can then look equally reasonable even within a sorted block. None of these possible variations supplies the missing identity information. An analyst should not infer observation linkage from a pleasant correlation.
Keep traceable joins and test them
Construct a minimal ledger where a record carries a stable unit identifier, a period or assigned role, the outcome and its unit, and a data quality status. When multiple visits legitimately contribute to the same comparison side, record the aggregation rule and a reference to the source visits. Decide which date groups can be paired before seeing the outcomes. In a worksheet, it is possible to use a lookup keyed by unit and leave the stored raw visit table alone. In a database, a join on an explicit field or composite key achieves the same structural goal. Sorting for visual clarity becomes harmless when every row remains whole or when the lookup still uses the identifiers.
Do not replace a linkage audit with a row-count audit. Suppose there are five before and five after rows, but the after export contains the same plot C twice and no plot E. Both file lengths are correct, but one of the intended matches is impossible and another ambiguous. Count candidate records by each key on each side and flag keys that are expected to be unique but are not. Then list identities found on both sides, only before, or only after. If one side legitimately contains multiple rows per unit, perform the known aggregation or choose the specified visit before joining. A one-to-many join followed by a mean can give sites with duplicate rows more influence than planned.
Keys require a normalization policy. A plot marked “A” in one file and “a” in another may represent the same unit or two different units, depending on how the field labels were assigned. Spaces, punctuation, and leading zeros can matter. A team sometimes changes all labels to the same case or numeric format to repair a mismatch; that is safe only if it knows which distinctions should survive. Keep the originals, preserve a mapping, and check that the normalized keys did not collapse different sites. If nobody can verify the correspondence, leave the candidate unresolved rather than choosing the most convenient fit.
Audit both measurement identity and pair identity. Two sheets might share the same plot names but differ in whether observers counted individuals, repeat flower contacts, or minutes of activity. Pairing by plot as planned does not repair an outcome mismatch. Confirm that units and denominators agree or that a reproducible transformation is appropriate. If a watch was partly obstructed or ended early, decide using the recorded eligibility criteria. When a valid paired outcome cannot be formed, record its missing or noncomparable status and retain the original measurements where appropriate. It is possible for the spatial pairing to be correct and the numerical difference to remain undefinable.
Build a few deliberate tests. Shuffling the before and after input rows independently should leave the joined result unchanged when identifiers remain attached. Add a duplicate key and confirm that the calculation flags the problem rather than retaining whichever match the tool finds first. Drop an after row and check that it stays unmatched without being assigned a number. Swap the period labels in a copy and check that every signed difference reverses, including the zero staying zero. These are tests of your pipeline, not of the underlying ecology. Run them on the toy data before trying to debug a sensitive or high-stakes project file.
Distinguish a tie, a missing endpoint, and an incompatible endpoint
At plot B, both recorded counts are ten. The signed difference is zero, and the pair belongs in the complete-pair table. If B had an after count of zero and a before count of ten, the difference would be minus ten. A zero observation and a zero change are both real but different. If B has no after entry because the observer could not reach the site, there is no paired difference. Do not set the missing endpoint to zero and call it a decline. Do not set the difference to zero and call it stability. Both shortcuts invent information and can distort the mean and signs.
A planned dataset might also include five sites before, five sites after, and only four in common. Suppose the before roster is A through E but the later roster is A through D plus a new plot F. The analysis can summarize the four complete shared plots, describing E as lost to follow-up and F as new. It can separately report that the two cross-sectional rosters each contain five sites. F does not replace E in the paired computation, whether it is in an adjacent flower bed or has the same count as E. If the intent changes to comparing two cross-sections, say so instead of making the extra site look like a complete pair.
Try that four-plot case with the fictional values. Retain A through D and exclude E's endpoints from the matched calculation. Their differences are minus three, zero, two, and five, summing to four; the complete-case average is one. Now add an after value of twenty at F and keep E's before value of eleven in the separate marginal views. The five-site before mean stays 10.6; the five-site after mean becomes 13.2 because its sum is sixty-six. The margin contrast is 2.6, different from the matched average of one. The discrepancy is not an arithmetic failure. The two summaries use different populations of records.
That change is important when pairing failure relates to the outcome. If plots with severe disturbance become inaccessible, surviving pairs can selectively describe intact sites. If records tend to be absent whenever a sensor overloads, complete rows may overrepresent the quiet range. A matched-only analysis can still be a legitimate description of complete, compatible pairs; it is not automatically a fair estimate for every original site. Report missingness by reason and stage when feasible, and do not imply that an advanced adjustment solves unavailable information merely because it fills cells on a screen. Select methods according to design, assumptions and the practical consequences of bias.
Pairing removes some differences in level, not every reason for change
A plot's existing shade pattern, area, or fixed relationship to a footpath can affect counts on both dates. Comparing each plot with itself can keep many such persistent differences from dominating the comparison. It does not remove conditions that changed between the dates, such as weather, flowering, foot traffic, observer experience, or recording protocol. A paired value describes a change under the chosen observation rule. To interpret it as caused by a treatment, the study needs a design and supporting evidence for that question. A before-and-after sequence alone does not distinguish treatment from the passage of time.
Imagine the five counts were made at the same marked plots, but before counts were taken by one beginner and after counts by an experienced recorder better at identifying small movements. Correct matching protects the evidence about which plots were measured. It does not establish equal observation technique. Check whether the outcome definition and viewing conditions were comparable and record an observer or method change. If the team alternates trained observers or repeats a common calibration watch, that further evidence can help diagnose differences. Those design features must actually happen; they cannot be credited as advantages of pairing in their absence.
Reported change can also be affected by why the plots entered the study. A team interested only in sites that had exceptionally low counts on one particular day might see many counts rise on a repeat even without a successful intervention. The initial selection may have favored temporarily low values. Persistently low sites, unusually low observation days, and ordinary counts measured imperfectly can be mixed in that group. Where practical, prespecify selection and use repeated baselines or a comparable design that can address this problem. A data table can honestly explain that the five plots were selected for their initial values instead of presenting them as an unbiased view of all sites.
Replication decisions matter as well. Some plots may share a site, water source, management decision, or measurement equipment. If five plot differences come from one garden and the meaningful treatment was assigned to the entire garden at once, you do not have five independently assigned gardens. A descriptive paired table is still useful, but an inference treating clustered plot differences as independent can be misleading. Look for the actual unit that was sampled or assigned and for shared circumstances. A second project could display five plot identities and include site as a higher-level label to keep this matter visible rather than pooling the hierarchy away.
The NIST example of two devices on the same object is instructive in one other way. Pairing the object can control obvious between-object variation. If one device is always used first and readings drift over time, apparent device differences can still reflect order. A planned design might counterbalance order or otherwise measure drift when practically appropriate. That setup is not available in every scientific setting: some processes permanently change an object, and before naturally precedes after. Distinguish the properties of your design from the mathematical advantage of computing differences in pairs.
Give readers both an average and a way to see what it hides
An honest small-data report can show a table and a plain description without invoking an elaborate model. For this example, say that five fictional matched plots had a mean after-minus-before change of two counts, with changes between minus three and plus six, three gains, one tie, and one decrease. Add the midpoint or median of two if it helps. These are different details of the same distribution, not different study findings. If a chart only shows the count-scale differences, put the centered baseline and units in surrounding text and let the table supply exact numbers.
A paired slope display, with each plot joined across the before and after positions, can make direction and identity especially visible. Draw one line per valid pair and label it or provide a separate text mapping. It can be helpful to choose a simple rule for drawing lines when they overlap, rather than making one difficult-to-see trajectory look missing. An exposed point with no observed second endpoint can appear in a separately labeled unpaired panel or as a distinct point state, not a line dropping to the chart origin. Readers who use the table rather than the image should have the same ability to identify plot B as tied and plot A as down.
Plotting before on the horizontal axis and after on the vertical axis asks another direct question. The equality reference is the diagonal only if both coordinates are on compatible scales. Points above that line show increases under the chosen convention; below it show decreases. Large or small absolute counts then remain visible alongside the sign of change. When ties or overlapping values obscure points, add labels and consult their raw rows, not a jittered diagram alone. If adding small visual displacements for legibility, do not confuse that rendering choice with recorded measurement changes.
Be careful when displaying changes next to their baseline values. The baseline appears in both the axis and the arithmetic of change, so the plot may show patterns partly because of shared measurement terms. It can guide a method check without proving that highly active sites necessarily lose more or that quieter ones are more responsive. Comparing a repeated baseline or using a suitable design may clarify such questions. An editorial caption that says “exploratory relation of baseline to observed change” is more defensible than a confident mechanism implied by a fitted line on five dots.
Ask what another person will decide on the basis of the display. If they will follow up sites that declined, preserve which sites they were. If they will judge operational consistency, show the individual spread rather than a single positive mean. If they will assess measurement error, save exact endpoint readings and compare their technique, units, and resolution. If the data are too sensitive to attach plot identities publicly, use stable anonymous labels or report a distribution with transparent grouping and no reidentification details. Private field notes need not appear in a public report for the paired analysis to be verifiable by authorized people.
Commit the comparison to a repeatable checklist
Before collection, write the unit of pairing, measurement definition, sign convention, intended roster and period assignment. Decide how changes in access, target definition, or observer technique will be handled. If repeated visits enter each side, determine whether they are averaged, summed, or selected for a triggered reason, and name the denominator in the result. These decisions should be easier to retrieve than the last screenshot someone pasted into a document. Without an explicit contract, a well-meaning cleaner may fix inconsistencies by overwriting evidence of them.
After collection, preserve the original order and records, report unmatched or duplicate identities, reconcile legitimate name changes, and apply measurement eligibility. Derive signed differences only for eligible complete pairs. In a numerical check, compute the mean of differences alongside the difference of complete-case means, but inspect identifiers separately. Reconstruct at least one negative, one zero, and one positive outcome when the set contains them. Those simple checks catch mistakes in sign and status that an aggregate checksum of outcomes would miss. Keep an auditable account of filters and reference values for a future correction.
During reporting, caption the figure with the sign, sample of complete pairs, and units. Include counts of unmatched and excluded pairs if they matter to scope. Avoid conflating observations with medical, ecological, or maintenance benefits unless those were the measured outcomes under suitable designs. Keep a separate chart or table for marginal distributions if desired, and label it with its own denominator. It is perfectly possible to publish both a distribution shift and legitimate within-unit changes; the important thing is to keep them distinguishable.
A final quick rehearsal is to ask someone to find the history of a single plotted mark. They should be able to trace plus five to the same plot before and after, find the corresponding eligible records, and reproduce the sign. Ask them why plot B is not missing. Ask how a new plot F would be represented without pairing it to E. If the page supports those answers, the pairing has survived the last stage of document editing. If they can reproduce only the average, the review has not established that the headline graph is a paired comparison.
Frequently asked questions
May I sort the table at all?
Yes. Sort entire matched rows by plot ID, before count, change, or another useful key. You can also sort the underlying before and after files independently if each record keeps its identifier attached and you subsequently join by that identifier. The error is sorting values by themselves and then using their row positions as if they carried the original relationship. For a rank-based visualization, explicitly describe ranked values rather than identifiable units.
Why does a basic average check not catch the mistake?
On the same complete sets with equal weights, permutations do not affect either period total. Therefore they cannot change the sum of their row differences even when most supposed matches are wrong. A row-level check needs to know the identifiers or another independently documented correspondence. A sign distribution, spread statistic, or paired plot may reveal a suspicious result, but none by itself can reconstruct a lost link. The arithmetic must be attached to the design.
Can I subtract the before median from the after median?
Yes, if you want the difference of marginal medians. It is not in general the median of paired differences. For a short example, let the same three units have before values of two, five, and nine, and after values of seven, six, and four, in the same unit order. The marginal medians are five and six, yielding a difference of one. The paired differences are five, one, and minus five, also giving one in that particular choice. If the same after values instead appear in unit order as four, seven, and six, the marginal difference remains one, but the paired changes are two, two, and minus three, giving median two. Marginal medians cannot determine what happened within the units.
What should I do when old labels have been lost?
Look for independent correspondence such as a stable visit identifier stored in a backup, a plot registry or field map, or dated notes that identify both observation and unit. Record what recovered linkage is supported and which items remain unresolved. Matching solely because an old value is similar to a later one imposes a desired result. If no legitimate linkage can be established, report a marginal comparison with appropriate scope, or leave the paired question unanswered. A reconstructable record of noncomparable data is a legitimate outcome.
Does an unchanged pair mean conditions did not change?
It means both recorded outcomes were equal under their measurement scale. Variation in circumstances can offset, and coarse readings can conceal differences smaller than their resolution. An unchanged row is still evidence and belongs in a complete set. It does not require that the observer, conditions, or biological state were identical. A missed after visit, by contrast, cannot make the same statement and must stay separated.
Do the five chart values establish a treatment effect?
No. They were invented to show how matching and signed changes work. A real before-and-after summary can establish what was observed in the stated measurement design. Claims about cause, wider populations, or future performance need supporting design and uncertainty analysis. A paired test, where appropriate, is a statement about the analysis of paired differences under assumptions, not a rescue for improperly matched or incompletely documented data.
Bibliography
- NIST/SEMATECH Engineering Statistics Handbook, PDF edition. Official handbook supporting the definition of paired comparisons and the use of differences as data.
- NIST/SEMATECH Engineering Statistics Handbook, section 7.3.1.1, Analysis of paired observations. Direct official reference for natural pairing, before-and-after examples, and the mean, spread, and paired t statistic of differences.
The plot roster, endpoint counts, calculations, graphs, and field scenarios are schematic examples, not data from these references.