Use these notes to review a concept or read at your own pace. The interactive workspace above adds predictions, editable code, and actual run results.
IDEA 1
Name the group below the fraction
A proportion compares a part with a specified whole. The denominator is that whole. If 40 club members were invited, 20 submitted a form, and 12 selected Tuesday, then 12/20 describes the Tuesday share among form respondents. The value 12/40 describes Tuesday selections relative to invitations. Both calculations are possible, but they answer different questions.
Our fictional survey includes respondents who submitted a form but skipped the meeting-time question. For this task, the denominator is all submitted forms, including that missing-answer category. Another task might ask for the share among people who answered the item; then you would explicitly change the denominator and label. The program must not silently switch definitions to make the percentage larger.
Read the fraction in words
- Invited. 40 anonymous club members received an invitation.
- Responded. 20 submitted forms define this task's denominator.
- Selected Tuesday. 12 of those 20 selected Tuesday: 60%.
Fictional records for learning. Follow the evidence and the checks.
Work through the example
const percent = 100 * selectedCount / metadata.respondents;Write 'percent of respondents' beside this calculation. The number without its denominator is easy to misread.
Think it through: 12 Tuesday selections, 20 submitted forms, 40 invitations: what is the Tuesday share among submitted forms?
IDEA 2
Keep nonresponse and missing answers visible
Nonresponse occurs when invited people do not participate. Item nonresponse occurs when a participant skips a particular question. Neither should be converted into a vote for a category. In the fixture, submitted forms equal Tuesday plus Thursday plus missing. Checking that identity catches a malformed aggregate before the helper calculates a polished percentage.
A small voluntary club survey does not establish the preferences of an entire school. Who was invited, who replied, and how the question was worded can affect the observed answers. Report the recorded group and collection method, and keep missing values visible. This exercise uses anonymous invented counts, not personality profiles or information about real students.
Account for every submitted form
- Answers. Count the declared preference categories.
- Missing item. Two forms skipped the question.
- Reconcile. All categories must total the respondent count.
Fictional records for learning. Follow the evidence and the checks.
Work through the example
const total = Object.values(counts).reduce((sum, n) => sum + n, 0);
if (total !== metadata.respondents) return { status: "invalid_counts" };The check verifies arithmetic consistency of these aggregates. It does not establish that the sample represents a larger population.
Think it through: Two submitted forms skipped the question. What should the summary do?
IDEA 3
Separate a preference from an explanation
A meeting-time preference question asks what respondents selected. It does not establish why they selected it or whether Tuesday meetings cause better learning. A causal conclusion requires an appropriate design and evidence beyond these counts. A helper can be useful by making a narrow, accurate summary and listing the claims the data cannot settle.
The solution returns the count, denominator, percentage, missing category, source ID, and a fixed scope label. The scope label says club_respondents even if the input asks for all_school. That is an intentional evidence boundary. The program is a transparent calculation workflow; a language model could later help phrase it, but should not broaden the conclusion.
Make the limitation part of the output
- Observation. 12 respondents selected Tuesday.
- Scope. The measured group is club respondents.
- No causal inference. The survey did not test a learning effect.
Fictional records for learning. Follow the evidence and the checks.
Work through the example
return { count, denominator, percent, missing, scope: "club_respondents", causalConclusion: false };The scope and causal flag describe this fixture's design. They are not learned classifications of arbitrary studies.
Think it through: What does a 60% Tuesday preference establish in this invented voluntary survey?
Put it into practice
Calculate the selected share among all submitted forms while retaining missing answers and the limited scope.
- Inspect the fictional input and the selected case's expected result.
- Run the starter. Locate its missing rule using the output and actual tool trace.
- Insert the explained snippet at the TODO and rerun the same case.
- Run all three cases, then change the experiment input and explain what the evidence now supports.
Your next experiment: The category counts add to 21 but metadata says 20 forms. Predict the status before running; explain why the helper should not quietly normalize the mismatch.
A good survey summary keeps the count, denominator, missing data, and measured population together.
Key terms
- Denominator
- The whole group used below the fraction.
- Item nonresponse
- A submitted form with no answer to a particular question.
- Target population
- The group a study aims to describe; it may differ from the people who actually responded.
Sources and scope
Original Stemtiq teaching, reviewed 2026-09-14. The named researchers and organizations do not endorse this course. Classroom cases are authored exercises, not published findings.
Pew Research Center: U.S. Survey Methodology
Reviewed 13 September 2026 · undated methods page
Distinguish a sample from its target population, and consider nonresponse and measurement error when interpreting a survey.
A small authored club survey does not reproduce Pew's sampling process or establish population representativeness.
NIH: Understanding Clinical Studies
Reviewed by NIH 26 June 2025 · primary indexed text checked 13 September 2026
Observational associations and randomized intervention designs support different kinds of conclusions.
This explains study design; it does not provide evidence for the fictional study cards in this lab. Direct page access was blocked during review; its primary indexed text was available.
Anthropic: Writing effective tools for agents — with agents
11 September 2025
Design distinct tools with clear parameters, relevant returned information, and evaluations of how the agent actually uses them.
A description or schema does not guarantee the right action. A live tool can return different data for the same arguments as its environment changes.
Anthropic: Demystifying evals for AI agents
9 January 2026
Define tasks, trials, and graders; inspect both execution records and final outcomes; repeat trials when model behavior varies.
A score depends on its cases and grading rules. Repeating a deterministic classroom case does not measure the variability of a live model.