# Interpreting a Data Analytics pipeline run

You are interpreting the output of a data analytics pipeline that compares
experimental conditions. The accompanying `evidence_pack.json` holds every
derived statistic the analysis produced. Read this briefing first: the numbers
are straightforward, but several of them mean something narrower than they
appear to, and the difference decides whether an interpretation is useful or
misleading.

---

## 1. What was measured

One **run** of the experiment measures many thousands of **observations** in
parallel. Each observation is measured over a series of **steps**, and a known
reference states what the correct response is at each step, so every observation
can be scored against ground truth. The **level** is how much response the
reference expects at a given step: `level 0` none, `level 1` one unit, `level 2` two.

The metrics below are the ones *this* run carried. They are not fixed by the
pipeline: each extract file declares its own metric set, and the run's
configuration decides which of them to analyse and what part each one plays. Do
not assume any metric exists that is not listed here.

From the raw per-observation signal the pipeline derives:

- the **response** (here `auc`) — the raw measured signal per
  observation per step, split by level. The most direct measurement there is;
  everything below is derived from it.
- **signal_to_noise_ratio** — per observation, the separation between steps where
  a response was expected and steps where none was. Treated as a predictor. Can
  be infinite by design when the baseline is zero; those rows are excluded
  wherever they appear.

Every other metric plays one of three roles, and the role decides how it may be
read:

**outcome** — the metric this run is organised around. It defines the
equal-count bins every other metric is summarised against, and it is what the
multivariable model predicts. There is exactly one.

**component of the outcome** — another description of the same result as the
outcome, not an independent quantity. Deliberately excluded from the model:
regressing the outcome on one would mostly recover the arithmetic relating the
two. Never read a component as a cause or a predictor of the outcome.

**predictor** — an independent per-observation quantity that may or may not
relate to the outcome. These are what the correlations and the model are about.

This run carried:

| Metric | Role |
|---|---|
| `Accuracy` | outcome |
| `Accuracy_error_1` | component of the outcome |
| `Accuracy_error_2` | component of the outcome |
| `Accuracy_error_3` | component of the outcome |
| `Accuracy_error_4` | component of the outcome |
| `Accuracy_error_5` | component of the outcome |
| `degradation_1` | predictor |
| `degradation_2` | predictor |
| `degradation_3` | predictor |

A **condition** is an experimental group — a setting, a protocol, a formulation.
Each condition comprises several **runs**, and each run
contributes thousands of observations. Comparing conditions is the point of the
exercise.

## 2. The design, and the one fact that governs everything

This run covers **4 conditions** over **10 runs** — Condition_A (3 runs), Condition_B (3 runs), Condition_C (2 runs), Condition_D (2 runs) — comprising 1,600 observations in total.

**The run is the experimental unit. The observation is not.**

All the observations in one run were measured together, on the same equipment,
under the same setup, on the same day. They are repeated measurements of that run,
not independent observations of the condition. This single fact is why the analysis
looks the way it does, and it is the thing most easily lost when reading the
output.

To see what is at stake, here is the comparison on this project's own demo
dataset, which anyone can regenerate with `da-pipeline-demo`. Condition_A and
Condition_B differ in median `Accuracy` by 0.013. Pooling their 2,880
observations returns `p = 1.9e-08`. The same comparison on the six run medians
that produced those observations -- three runs each -- returns `p = 0.2`.

The first number is not a stronger version of the second. It is an artefact of
treating 2,880 correlated measurements as 2,880 independent ones. The second is
what the design supports, and at three runs against three, `p = 0.2` is close to
the smallest value the test can return at all.

So every statistic here that supports a claim about a condition is computed on
**one value per run**. When you cite a sample size, cite the run count.

## 3. Rules you must follow

These are not stylistic preferences. Each corresponds to a specific way this
data has been misread.

1. **Never report a non-significant comparison as showing equivalence.** At
   these replicate counts the test has a floor: the smallest attainable
   two-sided Mann-Whitney p-value is 0.1 for three runs against three, 0.2 for
   three against two, and 0.333 for two against two — *even when every single
   pairing went the same way*. A comparison can therefore be as one-sided as
   the data allows and still not reach a conventional threshold. "Did not
   separate" is what you may say. "Are the same", "are indistinguishable",
   "show no difference" are not — they claim evidence of absence that this
   design cannot produce.

2. **Always read the effect size beside the p-value.** At these sample sizes
   they come apart in both directions. CLES is the probability that a randomly
   chosen run of one condition scores above a randomly chosen run of the other;
   at two to three runs per condition it is simply a count of pairings.

3. **Pooled correlations are descriptions, not evidence.** They honestly
   describe the observation population measured. They carry no p-values, deliberately.
   Do not use one to argue that a relationship is real.

4. **Prefer the within-run correlations for any reproducibility claim.** Each
   is computed inside one run and then summarised across runs. The count of runs
   agreeing on the sign is the claim the replicate count supports. Where the
   pooled and within-run coefficients disagree — and in this project they often
   do, sometimes reversing sign — the within-run one is the one about observations.

5. **Between-run correlations are confounded with the condition.** The runs span
   every condition, so a strong coefficient there may be re-measuring the
   condition effect rather than a run-level relationship. Say so when you cite one.

6. **Every condition result is an association.** The design supports "this
   metric differs between these conditions". It does not support "the condition
   improved the metric by way of this mechanism". Do not write causal or
   mediation language.

7. **Model coefficients are within-run associations between observations.** They
   do not license "raising signal-to-noise would raise the outcome metric". The model cannot
   contain the condition as a predictor — the condition is constant within a run,
   so a per-run model cannot estimate it even in principle. Do not suggest adding it.

8. **A negative out-of-sample R-squared is a finding, not an error.** It means
   the coefficients fitted on the other runs predicted that run worse than that
   run's own mean would have. Runs that fail this way are worth naming.

9. **Wide confidence intervals are the honest answer.** Every interval is a
   percentile bootstrap that resamples runs, not observations. At two to three
   runs per condition they are wide. Do not present a wide interval as a
   precise estimate, and do not apologise for it either.

10. **Distinguish "the difference is small" from "the evidence is weak".** The
    variance decomposition tells you which. A metric whose run-to-run variation
    is as large as its condition-associated variation has weak support for a
    condition difference however many observations were measured.

## 4. What is in the evidence pack

| Key | Contents |
|---|---|
| `design` | condition and run counts, and the unit of analysis |
| `findings` | the pipeline's own summary of what the run found, each with its caution |
| `tables.effect_size` | eta-squared per level, on run medians, with bootstrap intervals and a one-way ANOVA p |
| `tables.pairwise_conditions` | every condition pair on every metric: CLES with interval, Mann-Whitney p, Benjamini-Hochberg (1995) corrected within each metric — the family is the metric, so `p_adjust_family` says what a given adjusted p was corrected against |
| `tables.variance_decomposition` | each metric's variation split into condition / run-within-condition / observation-within-run. The three shares sum to 100 exactly |
| `tables.run_spread_by_condition` | each condition's own run medians: range, IQR, and how far the result moves if the most influential run is dropped |
| `tables.correlations` | pooled, per condition |
| `tables.correlations_within_run` | computed inside each run, summarised across runs, with sign agreement |
| `tables.correlations_between_run` | one median per run, correlated across all runs |
| `tables.outcome_model` | per-predictor standardised coefficients with bootstrap intervals, VIF, and leave-one-run-out cross-validation |
| `tables.outcome_model_by_run` | the per-run fits behind that summary |
| `tables.bin_summaries` | every metric summarised against equal-count bins of the outcome metric, computed per condition. The bins hold equal numbers of observations by rank, so bin 4 spans a different range in each condition |

Run identifiers have been replaced with `run_01`, `run_02`, … The mapping back
to the original identifiers was not included and stays on the machine that
produced this pack.

## 5. What to produce

Answer these, in this order:

1. **Which conditions differ, on what, and how confidently?** Name the metrics
   and give the effect size with its interval. State plainly which comparisons
   did not separate, without claiming they are equivalent.

2. **Would these differences reproduce?** Use the variance decomposition and the
   per-condition run spread. Call out any result carried by a single run, and
   name that run.

3. **What relates to the outcome metric, and does it hold inside a run?** Compare the
   pooled and within-run views explicitly. Flag any relationship that exists only
   between runs.

4. **What does the multivariable model add?** Which predictors survive being
   considered together, how consistent are they across runs, and does the model
   transfer to a held-out run?

5. **What should be investigated next?** Ground each suggestion in a specific
   number from the pack.

Write for someone who knows the experiment and did not run the analysis. Be
concrete: cite the metric, the conditions, the number and its interval. Where the
evidence is weak, say so and say why. A short honest answer is worth more than a
long confident one.

If something in the pack is missing, null, or internally inconsistent, say so
rather than working around it.
