Aller au contenu

Leçon 21 · Trust and Accuracy

Checking Your Numbers

Catch errors before readers do with reconciliation to a source, row count and duplicate checks, sanity tests, peer review, a release checklist and correction notes.

One wrong number can make readers doubt every number you send. You cannot remove all risk, but a routine set of checks catches many errors early. The key idea is to verify results by a different route from the one that produced them.

Reconciliation

To reconcile is to compare your total with an independent figure and explain any difference. Possible references include the source system's own screen, a finance ledger, an earlier published report or a simple count written separately.

Rules for reconciliation:

  • Compare the same period, population and definition.
  • Decide the tolerance in advance. Counts often should match exactly. Timing or currency differences may justify a small, documented tolerance.
  • Explain differences with a bridge: start at one figure and list each reason until you reach the other.
SQL A reconciliation bridge in SQL

Press Run (or Ctrl + Enter) to see the result here.

The first four lines add up to the last: 775 minus 40, plus 20, minus 18 equals 737. Each line points to a concrete cause to investigate: order 4 is missing, order 6 is extra and order 3 has swapped digits. This bridge assumes that each order ID appears once per table, so check that first.

Structural checks

Check What it can reveal
Row count against expectation Missing or doubled loads
Unique keys Duplicate records
Required fields not empty Broken sources
Values in allowed ranges Unit errors, bad entries
Date range of data Wrong period or stale data
Categories against a known list New or misspelled values
Parts add to total Filters or joins that drop rows
Python A reusable set of data checks

Press Run (or Ctrl + Enter) to see the result here.

Program input · what you'd type while the program runs

Type the answers before you press Run, one per line. Each time the program reads a line (with input()), it gets the next line from this box.

A flagged value is not automatically wrong. A 9,500 order may be real. The check asks a person to look. Do not delete unusual values just because they are unusual.

Sanity checks

Ask whether the result makes sense:

  • Is the magnitude plausible compared with earlier periods?
  • Can a part be larger than its whole? Can a share exceed 100%?
  • Does a quick estimate agree, such as orders times typical order value?
  • Do related measures move consistently?
  • Does a change match any known event, such as a holiday or a system change?

A surprising result is a reason to investigate, not to assume that it is wrong or right. Check data problems before you announce a business explanation.

Spot checks

Trace a few records from the source to the final number. Include ordinary cases and edge cases: the first and last moment of the period, a refund, a missing field and the largest value. This finds logic errors that totals can hide, because two errors may cancel.

Peer review

Ask another person to review before release. Give them the question, the definitions, the query and the output, and ask them to try to break it. A good review asks:

  1. Does the query match the written definition?
  2. Are the joins at the right grain?
  3. Are filters and date boundaries correct?
  4. Do totals reconcile?
  5. Do the words match the numbers?

If no colleague is available, put the work aside, then review it later from the checklist.

Tests and version control

For automated reports, keep small test inputs with known answers, and run the tests whenever the code changes. Keep queries and code in version control so you can see what changed when a figure moves.

Corrections

When a published number is wrong:

  1. Confirm the error and its size.
  2. Tell the owner and affected readers promptly.
  3. Publish a corrected version with a short note: what was wrong, the old and new values and the date.
  4. Check whether any decision relied on the wrong figure.
  5. Fix the cause and add a check that would have caught it.
TEXT
Correction, 2 Dec 2026 (version 2)
Late delivery rate for week 48 was shown as 6.8%; it is 6.4%.
Cause: a manual copy error in the summary. Detail tables were
correct. We added an automated summary-to-data check.

How much checking is enough?

Checking takes time, so match the effort to the risk. Consider who relies on the figure, what they might decide, how hard a mistake would be to reverse and how much the logic changed since the last release.

Situation Sensible level of checking
Routine run, no changes Automated checks and a quick look
Changed query or definition Add reconciliation, tracing and peer review
New report All checks, plus a trial period beside existing figures
External or high-stakes figure All checks, formal approval and kept evidence

These levels are a starting point, not a standard. Your organization or a regulator may require more.

Keep evidence of what you checked: the reference figure, the difference, who reviewed the work and when. A short log is enough for many internal reports. It helps you answer questions months later and shows which checks are often skipped.

After an error, ask why the process let it through, not only who typed what. Then improve one step. A checklist that grows from real incidents is usually more useful than a long one copied from elsewhere.

Automate the checks that never need judgment, such as unique keys and period coverage, so that people can spend their attention on the questions that do. Review the automated rules from time to time, because limits that fitted last year may now be too loose or too strict.

Never overwrite a published figure silently. Readers who saved the old value will find the difference later and may stop trusting the whole report.

Check your understanding

Quick check · 4 questions

of 4 answered You scored / 4 · perfect!

  1. 1. What does it mean to reconcile a report total?

    Reconciliation uses a separate reference. Repeating the same logic repeats the same mistake.
  2. 2. A check flags an unusually large order. What should happen?

    Unusual is not the same as wrong.
  3. 3. Why trace a few individual records even when totals match?

    Matching totals can hide wrong inclusions and exclusions.
  4. 4. What is the right way to fix a published error?

    Open corrections preserve trust and let readers revisit decisions.

Summary

  • Verify by an independent route and reconcile with a stated tolerance.
  • Run structural checks for counts, keys, ranges, periods and categories.
  • Combine sanity checks, record tracing and peer review.
  • Test automated logic and keep it in version control.
  • Correct errors openly with versions and notes, and add a check for the cause.

Next: How Reports Mislead

Votre progression est enregistrée dans ce navigateur. Aucun compte nécessaire.