# Data Detective — educator guide This is a fictional, synthetic-data investigation, intended as a starting point for a learner around age 15. Age does not determine readiness. No learning-gain, diagnostic, or universal-suitability claim is made. ## Objectives and prerequisites Learners compare presentation with numerical evidence, recognise coverage bias in a sample, distinguish association from causal evidence, and assemble a conclusion with a supporting observation and a limitation. Prerequisites: reading a labelled chart, understanding a mean and a percentage, and comparing quantities. The formula for Pearson correlation is optional; the scatterplot and group comparison carry the central argument. Allow about 10–15 minutes: orientation (1 minute), graph framing (3), sampling (3), correlation (3), and a fresh headline plus notebook review (3–5). All activities can be revisited or paused. There is no time pressure, ranking, or penalty for changing an answer. ## Suggested walkthrough 1. **Graph framing.** Read the fictional kiosk's five daily cup counts in the table. Compare the fixed zero-baseline line chart with the adjustable view. Before moving the axis, predict what should stay constant. Try lower bounds of 0, 80, and 100. The numerical mean remains 108 cups; Friday minus Monday remains 8 cups. A narrower vertical range makes a given change occupy more screen space. This does not automatically make a non-zero-axis line chart dishonest: discuss its purpose, visible scale, absolute change, and relevant context. Bar length has a different interpretation and usually needs a zero baseline. 2. **Sampling investigation.** The target is all 120 fictional book-festival visitors. Compare a sample from the whole population with a sample drawn only from the 30 club visitors. Keep seed and size fixed while changing the method, then increase the club sample to 30. That includes every club visitor but still excludes all 90 walk-ins. The resulting club mean is 74.5 minutes, while the population mean is 37 minutes. A larger sample from this restricted frame cannot repair its missing coverage. A whole-population random sample can still differ by chance from the target; one fortunate sample does not prove a procedure is better in every draw. 3. **Correlation challenge.** Compare all 27 fictional fairs with each fair-size group. Combined banner length and visitor count have a strong positive linear association (r about 0.973). Within each size group the constructed association is exactly zero. Event scale is a plausible common explanation in this invented scenario. Association alone does not establish causation; stratification here demonstrates one explanation, rather than proving that no causal effect could ever exist in real fairs. Ask what additional design or evidence would be needed. 4. **New headline.** Examine a fictional garden claim that uses volunteer-club reports from 20 of 100 plots, with a reported mean rising from 24 to 27 kg. The observed change is 3 kg, or 12.5% of 24 kg. It is not a doubling and cannot establish the same change for all plots. Assemble a cautious claim, observation, and limitation. Optional prose is kept only in this page's memory; use the self-review checklist and exemplar instead of pretending to automatically understand arbitrary writing. Use the notebook to distinguish an observation (what the displayed data show) from an interpretation (what that supports). Finishing a control sequence is not evidence that a learner has mastered the ideas. ## Adaptation and co-play - Read one evidence card aloud, keep the data table open, and work through one activity at a time for learners who need less reading. - Start with club versus population means before introducing individual sampled rows. Explain “sampling frame” as the people who could be selected by that procedure. - For deeper work, repeat several fixed seeds and compare the distribution of errors. Avoid selecting only the seed that makes a preferred conclusion look strongest. - Describe the scatterplot in words or use the equivalent table when the chart is difficult to see. The correlation coefficient is optional enrichment, not a gate. - Accept nuanced conclusions that name the actual data and a defensible limitation. Neither “all charts lie” nor “a large sample is always representative” is the intended lesson. ## Original datasets and data dictionary All rows are generated deterministically in `datasets.mjs`, bundled with the source, and frozen against accidental mutation. The people, organisations, settings, headlines, and measurements are invented. None are real observations or scientific findings. No learner demographic information is collected. | Dataset | Fields and units | Construction and interpretation | | --- | --- | --- | | `GRAPH_DATA` | `period`: day label; `value`: cups sold in that day | Monday–Friday values 104, 108, 106, 110, 112, chosen to show modest variation and an 8-cup start-to-end change. Days are five consecutive fictional trading days. | | `POPULATION` | `id`: synthetic row ID; `group`: club or walk-in; `minutes`: visit duration in minutes | 120 rows. Club IDs 1–30 have minutes 60–89 once each; walk-ins have minutes 10–39 repeated three times. Groups are deliberately constructed to illustrate undercoverage. Club share 25%; mean 37 minutes overall. | | `CORRELATION_DATA` | `id`: synthetic fair ID; `scale`: small/medium/large; `bannerMetres`: banner length in metres; `visitors`: visitor count | For group index g=0,1,2, take every pair dx in {-1,0,1}, dy in {-10,0,10}; length=3+5g+dx and visitors=40+80g+dy. Nine fairs per group, 27 total. Within groups x and y deviations form a full Cartesian grid, yielding zero covariance. Between-group means move together. These are constructed group labels, not measured causal variables. | | `FINAL_DATA` | `label`: report period; `value`: mean harvest in kilograms | Two invented aggregate club reports, 24 and 27 kg. No row-level garden dataset is supplied, so dispersion, standard error, missing-plot outcomes, and statistical significance cannot be estimated. The vignette's 20/100 plot coverage is fictional contextual information. | ## Sampling and statistical model `samplePopulation` performs a partial Fisher–Yates shuffle without replacement. The `random` method uses all 120 rows; `club` uses only the 30 club rows. Both sample randomly *within* their frame, but only the former gives every population row an opportunity to appear. A visible unsigned 32-bit integer seed drives a deterministic Mulberry32 pseudorandom generator. It is suitable for reproducible teaching simulations, not security, actual survey selection, or claiming perfectly uniform mathematical randomness. The mean is the arithmetic mean. Pearson r is covariance numerator divided by the product of centred sum-of-squares roots. If either variable has no variation it is undefined (`null`), rather than falsely reported as zero. Correlation describes linear association. Zero correlation need not imply general independence; the deliberately orthogonal within-group grid is a particular constructed example. Charts, summaries, and accessible tables consume the same arrays. ## Sources consulted These sources support the concepts; they did not supply the fictional datasets, code, images, or learner wording. 1. **Office for National Statistics, “Does the axis have to start at zero? (Part 1 – line charts)”** (27 June 2016): https://digitalblog.ons.gov.uk/2016/06/27/does-the-axis-have-to-start-at-zero-part-1-line-charts/ . Supports explaining position encoding, contextual zoom, and why a non-zero line-chart axis is not automatically misleading. 2. **OpenStax, Introductory Statistics 2e, “1.2 Data, Sampling, and Variation in Data and Sampling”**: https://openstax.org/books/introductory-statistics-2e/pages/1-2-data-sampling-and-variation-in-data-and-sampling . Supports the distinction between population and sample, sampling procedures, and sampling variation. 3. **OpenStax, Introductory Business Statistics 2e, “13.1 The Correlation Coefficient r”**: https://openstax.org/books/introductory-business-statistics-2e/pages/13-1-the-correlation-coefficient-r . Supports interpreting linear association and separating correlation from causation. ## Privacy, persistence, and limits The lesson uses no accounts, analytics, network APIs, remote scoring, payments, photos, voice capture, or chat. Progress and optional prose are in memory only and disappear on refresh or reset. Do not enter personal information into the notebook. No testing with children was performed or requested. Accessibility checks and simulated adult walkthroughs are engineering evidence, not a full accessibility audit or an educational study. See `TEST_REPORT.md` for what was actually tested. Offline follow-up: invent six non-sensitive measurements, draw the same line on two clearly labelled scales, then write two sentences: one exact observation and one limit on what the data establish. Explain both chart choices rather than assuming one must be dishonest.