Lumina
Applied Health Statistics · Level 0
EN · PT
Level 0 · readiness

Read the study before the software

“Did the program help?” is not one statistical question. AURORA-30 is the wholly synthetic teaching cohort and dataset used to expose that ambiguity: 30 fictional records, with no real patients, institutions, interventions, or outcomes; it does not constitute clinical evidence. This diagnostic shows what to review before software enters the reasoning.

what you'll be able to doTranslate a plain-language health question into the minimum statistical structure needed to enter HEALTH.1—and run a prepared command without treating software output as a conclusion.

The opening conflict: one table, three questions

The AURORA-30 table makes three routes plausible:

All three can be mathematically correct. They are not interchangeable: each targets a different quantity, uses dependence differently, and supports a different interpretation. Rigor begins by naming which question the result must answer and preserving that choice so another analyst can inspect it.

The trap: treating software fluency as statistical readiness

Someone can run a t test and still compare the wrong unit. Another learner may never have opened Python yet correctly recognize paired measurements. The second learner has the stronger foundation. Programming is a delivery mechanism; design and measurement determine what the numbers mean.

not an examChoose “review” whenever you are unsure. The result stays in your browser, does not block the course, and should never be interpreted as a clinical or professional credential.
how to read later gate resultsA gate is a check with an explicit criterion. Didactic check passed (PROMOTE) and review required (HOLD) describe only a teaching artifact. In a Verdict, confidence is certainty of the check—not evidence strength, a confidence interval, clinical or external validity, or research authorization.

Eight readiness signals

Choose one response for each signal. There is no score or pass mark: “review” simply adds the matching repair to your route. The diagnostic works without a server and sends no response anywhere.

01Population, sample, unit

I can distinguish who I want to understand, who was observed, and what one row represents.

02Outcome, exposure, comparison

I can name what changes, what may explain it, and the reference for the contrast.

03Variable scale

I can classify a variable as nominal, ordinal, discrete, or continuous.

04Dependence

I can tell independent people from matched pairs or repeated observations.

05Description

I can read counts, proportions, mean/SD, median/IQR, tables, and honest displays.

06Numeracy

I can work with percentages, ratios, subtraction, division, and elementary rearrangement.

07Uncertainty

I can distinguish a point estimate from a confidence interval.

08Execution

I can open a CSV and copy one prepared Python or R command from the correct folder.

Stored only in this browser on this device. You may reset it at any time; the result never blocks HEALTH.1.

a file has two visits per participant. What does one row represent?
A visit, not necessarily a participant. The participant identifier links rows; analyses that assume every row is independent would discard that dependence.

Worked example: meet AURORA-30

AURORA-30 is a fictional methods-training cohort with 30 synthetic participant records. It contains a baseline score, a day-30 score, an assigned follow-up workflow, a site, a time-to-event field, a synthetic reference classification, and two reader ratings. It is deliberately small enough to inspect and rich enough to support the full dossier. It is not evidence about a real intervention.

questionwhat effect? one rowunit / visit variablesscale + role dependencewho repeats? summaryestimate + CI

First run: start in the lab folder

Find the course folder that contains START_HERE.md, open a terminal there, and copy one runtime path below. Programming experience is not required. The first command fixes the working directory; the second checks the runtime; the third runs the supplied synthetic plan.

# From the course folder that contains START_HERE.md:
cd labs/analysis-plan-contract
python --version
python analysis_plan_contract.py --input samples/aurora30_plan.json --lang en --format text
python analysis_plan_contract.py --input samples/aurora30_plan.json --lang pt --format text

# Alternative base R path from the same lab folder:
Rscript --version
Rscript analysis_plan_contract.R --input samples/aurora30_plan.json --lang en --format text
Rscript analysis_plan_contract.R --input samples/aurora30_plan.json --lang pt --format text
if the terminal reports an error “No such file”: run pwd (macOS/Linux) or Get-Location (PowerShell) and return to the folder containing analysis_plan_contract.py, analysis_plan_contract.R, and samples/. “Python not found”: try py -3 on Windows or python3 on macOS/Linux in place of python. “Rscript not recognized”: Python remains sufficient. On macOS/Linux, run which Rscript. On Windows, run where.exe Rscript; if it returns nothing, use the read-only PowerShell discovery below. There is no universal R path.
# Windows PowerShell — read-only discovery in common installation roots
Get-ChildItem -LiteralPath 'C:\Program Files\R','C:\Program Files (x86)\R' `
  -Filter Rscript.exe -File -Recurse -ErrorAction SilentlyContinue |
  Select-Object -ExpandProperty FullName

# If a path is returned, invoke that exact discovered file:
& '<discovered absolute path to Rscript.exe>' --version

If discovery finds Rscript.exe, use that absolute path for the R commands or add its containing bin folder to your Windows PATH. If both checks return nothing, continue with Python; install R only if you want the second runtime and have confirmed it is absent.

which is the outcome: assigned workflow or day-30 score?
The day-30 score is the outcome. The assigned workflow is the intervention/exposure; the other workflow is the comparison. The estimand must still say which contrast and population are intended.

Observable adaptation: predict, run, inspect

Keep the versioned sample untouched. From the analysis-plan-contract folder, make a learner-owned copy with the command for your shell:

# Windows PowerShell
Copy-Item -LiteralPath 'samples/aurora30_plan.json' -Destination 'my_aurora30_plan.json'

# macOS/Linux shell
cp -- samples/aurora30_plan.json my_aurora30_plan.json
  1. Open my_aurora30_plan.json in a text editor. Change the safe metadata field "version": "1.0" to "version": "1.0-practice". Predict the first-line token, then run python analysis_plan_contract.py --input my_aurora30_plan.json --lang en --format text. Inspect why the result remains PROMOTE: the method contract did not change.
  2. In the same learner-owned file, change "time_horizon_days": 30 to "time_horizon_days": 60. Predict again, rerun the same command, and inspect HOLD plus time_horizon_days:expected_30. The explicit error is evidence that a changed horizon is an analysis decision, not harmless metadata.
the adaptation ruleChange one field, predict the gate, run, and inspect the exact evidence before changing another. Your copy is disposable; samples/aurora30_plan.json remains the stable reference.

The reusable twelve-question contract

Carry this checklist into HEALTH.5–7 and the capstone. If a question is unanswered, the next move is not “pick a test”; it is “repair the contract.”

  1. What is the question and estimand?
  2. What are the population and unit of analysis?
  3. What is the outcome type and scale?
  4. How many groups, times, or conditions exist?
  5. Are observations independent, paired, or repeated?
  6. How was the sample obtained, and which biases are plausible?
  7. Are missingness, outliers, unit errors, or coding errors present?
  8. Are assumptions reasonable for the design and data?
  9. Was the analysis prespecified, and how many comparisons are planned?
  10. Which method directly estimates the effect of interest?
  11. Which effect, interval, and diagnostic accompany the p-value?
  12. Which limitations prevent causal or population-level generalization?
when the normality test has p > 0.05, has normality been proved?
No. Failure to reject is not proof of the null, and small samples have limited power to expose departures. Diagnose assumptions using design knowledge, distributions, residuals, and sensitivity analyses—not one mechanical test.

Review route: repair only what is uncertain

Use the route generated above, or browse all eight repairs. Each is deliberately small: complete it, return to the diagnostic, and change “review” to “ready” when you can explain the idea in your own words.

01 · Population, sample, unit

For AURORA-30, write: target population = the people the question concerns; sample = the 30 synthetic records observed; unit = participant. Then ask whether one row is a person or a visit. Continue with HEALTH.1.

02 · Outcome, exposure, comparison

Label day-30 score as the outcome, assigned workflow as the intervention/exposure, and the other workflow as the comparison. Do not choose a test until the contrast and time horizon are explicit.

03 · Variable scale

Practice with four fields: site is nominal, ordered severity is ordinal, visit count is discrete, and score is continuous. HEALTH.2 turns those labels into a data dictionary.

04 · Dependence

Two different participants are independent; two visits from one participant are repeated; a deliberately matched control pair is paired. The identifier—not the row count—reveals the structure.

05 · Description

For values 2, 3, 3, 4, 18, compare the mean with the median and identify the unusual value. For every percentage, write its numerator and denominator. HEALTH.3 expands this into the descriptive profile.

06 · Numeracy

If 6 of 24 records meet a rule, calculate 6 ÷ 24 = 0.25 = 25%. Then express the contrast as 6:18 and the percentage-point difference against a stated reference.

07 · Uncertainty

Read “effect 2.1; 95% CI 0.4 to 3.8” as one sample estimate plus a range produced by a declared interval method—not as a guarantee that every value is equally plausible. HEALTH.4 develops the interval contract.

08 · Execution

Complete the literal first-run path. A successful run ends with AURORA-30 | analysis_plan | PROMOTE; in human terms, the supplied teaching contract passed its didactic structural check. It does not establish clinical or external validity or authorize research.

Your turn: write the five-line study card

Without software, write five lines for AURORA-30: population, unit, outcome, comparison, and dependence. If any line is vague, return to the matching readiness signal. If all five are concrete, you are ready for HEALTH.1; the first run and the two-change adaptation are enough programming for day one.

key takeaways