How Can We Design a Statistical Test and Explain What Its Errors and Power Actually Mean? Specify the null and alternative, the sampling model and the decision rule before interpreting the result. An exact test uses the stipulated probability distribution to bound false rejection and calculate power at specified alternatives. Failure to reject does not prove a null claim, and rejecting a hypothesis does not automatically establish real-world conformity.
This international lab extends Confidence Interval Coverage, Sequential Probability Updating and the newer standards and certification education branch. The fictional counter trials and calculations are original teaching examples. Vocabulary Coding and Engineering (VCE) and EnDist are proposed frameworks, not validated interventions. No actual product, learner or institution is tested or certified; future superintelligence remains hypothetical.
- Declare a fixed Bernoulli sampling model and hypotheses.
- Enumerate the exact null distribution.
- Choose a rejection region satisfying a size constraint.
- Calculate a one-sided p-value and distinguish it from a posterior probability.
- Compare power and errors at specified parameter values.
- Verify a fresh test without treating its outcome as a certification.
Choose your reading route
Coursework series: Confidence Interval Coverage Lab · Sequential Probability Updating Lab · Precision, Recall and Threshold Lab · Standards, Testing and Certification Services and Education · Vocabulary Coding and Engineering
Continue this coursework series: Interval Scheduling and Exchange Proof Lab · Bitemporal Records Lab · Exact Hypothesis Test and Power Lab (this article) · Controlled Vocabulary Crosswalk Studio
Full chapter index
Chapters 1–5
Chapters 6–10
Chapters 11–15
Chapters 16–20
Chapters 21–25
Chapter 26
CHAPTER 1 OF 26 · Understand the capability
1. The capability: separate a decision rule from a claim of certainty
A fictional card generator produces a marked or unmarked card on each draw. A learner wants to investigate whether its probability of producing a mark exceeds one half. Seeing several marks might suggest that it does, but the inference needs a declared sampling and decision model.
The deliverables are hypotheses, an exact probability table, a prespecified rejection region, an error and power analysis, and a fresh transfer. The goal is to understand what a statistical procedure warrants, not to convert a small sample into an unconditional guarantee.
CHAPTER 2 OF 26 · Understand the capability
2. Define the model and hypotheses
Assume five independent Bernoulli trials with the same fixed but unknown mark probability p. Let X count marked outcomes. Under this model X has the binomial distribution: Pr(X=k)=C(5,k)pᵏ(1−p)⁵⁻ᵏ for k from zero to five, with the usual boundary conventions.
Use null H0: p≤1/2 and alternative H1: p>1/2. A large X is evidence in the direction of the alternative. Fix the number of draws and decision criterion before seeing outcomes. Penn State’s hypothesis-testing lesson gives the general framework; our finite exact rule is constructed here.
Background reading: Penn State STAT 415: Hypothesis Tests (Part I).
CHAPTER 3 OF 26 · Understand the capability
3. Vocabulary Coding and Engineering for test evidence
Distinguish null hypothesis, alternative, statistic, rejection region, significance level, size, p-value, Type I error, Type II error and power. A decision to reject the null is not an observation that p has a particular value. Power is a probability under a specified alternative parameter.
Under proposed VCE, preserve the hypotheses, sample size, assumptions and threshold alongside the test outcome. A receiving reader can then reconstruct the decision and distinguish the strength of the evidence from claims that require further inspection. Do not use the word passed without defining its meaning.
Related framework: Vocabulary Coding and Engineering.
CHAPTER 4 OF 26 · Work through the example
4. Read the fictional decision contract
The Hazel workshop proposes at most a 5% probability of rejecting the null when the null is true. This is the maximum test size, not a promise that only 5% of reported rejections are wrong. The sample size is five, and only upper-tail count rules are considered.
The workshop does not require a specified minimum power in this first example. All trials and marks are mathematical abstractions. No measured quality level, product approval, certification or real classroom judgment is supplied. We will calculate the procedure before examining a hypothetical outcome.
CHAPTER 5 OF 26 · Work through the example
5. Construct the null distribution
At p=1/2, every length-five sequence of marked and unmarked outcomes has probability 1/32. There are 1,5,10,10,5,1 sequences containing respectively zero through five marks. Count the choices of positions for the marked outcomes.
These counts sum to 32. Divide each by 32 to obtain the exact null probabilities. The small sample gives a discrete distribution, so rejection probabilities change in jumps. This matters when a desired significance level does not equal any attainable deterministic upper-tail probability.
| Successes k | Number of sequences | Probability at p=1/2 |
|---|---|---|
| 0 | 1 | 1/32 |
| 1 | 5 | 5/32 |
| 2 | 10 | 10/32 |
| 3 | 10 | 10/32 |
| 4 | 5 | 5/32 |
| 5 | 1 | 1/32 |
CHAPTER 6 OF 26 · Work through the example
6. Choose a rejection region
Reject when X=5. At boundary p=1/2, the rejection probability is (1/2)⁵=1/32=0.03125. For p≤1/2, p⁵ is at most this boundary value. Hence the rule’s maximum false-rejection probability over the null is 3.125%, within the declared 5% limit.
Choosing X≥4 would yield probability (5+1)/32=0.1875 at the boundary, exceeding 5%. Among nonempty deterministic rules that reject all counts at or above a chosen integer threshold, X=5 is the most inclusive one satisfying the specified size constraint. Its size is below the nominal maximum.
CHAPTER 7 OF 26 · Work through the example
7. Calculate the p-value for a hypothetical observed five
Suppose the observed count is five. The one-sided exact p-value is the supremum over null probabilities of obtaining a count at least as large as the observed count. Here it is 1/32 because Prₚ(X≥5)=p⁵ increases with p.
The observed result lies in the rejection region, so reject H0 under the prespecified rule. This does not say the probability that H0 is true is 3.125%. No prior probability on p is supplied, and the frequentist tail probability is computed assuming a member of the null model.
CHAPTER 8 OF 26 · Work through the example
8. Calculate the p-value for a hypothetical observed four
Now consider a separate outcome, X=4. At p=1/2 the upper-tail probability Pr(X≥4) is 6/32=0.1875. The upper-tail event becomes more probable as p increases: one can couple all draws using uniform random numbers and mark a draw when its uniform value is at most p.
Thus the maximum null tail probability occurs at p=1/2. The test does not reject H0 after four marks. This does not prove p≤1/2 or show that the generator is fair. It establishes only that this observation did not meet the chosen rejection condition.
CHAPTER 9 OF 26 · Work through the example
9. Compare Type I error and power
At p=0.8, the original rule rejects with probability 0.8⁵=0.32768. Its power at that specific alternative is about 32.77%. Because p=0.8 belongs to the alternative, failing to reject is a Type II error with probability 1−0.32768=0.67232.
For the more inclusive rule X≥4, power at p=0.8 is 5(0.8)⁴(0.2)+(0.8)⁵=0.73728. But its size is 18.75%, violating the original limit. The extra detections are not a free improvement. Compare both constraints rather than ranking power alone.
| Rejection rule | False-rejection probability at p=0.5 | Power at p=0.8 |
|---|---|---|
| X=5 | 0.03125 | 0.32768 |
| X≥4 | 0.1875 | 0.73728 |
CHAPTER 10 OF 26 · Identify failure modes
10. Detect a misleading assurance claim
A generated report says a rejection proves with 96.875% certainty that p exceeds one half. That calculation subtracts the p-value from one and treats the result as a posterior probability. The stipulated test does not support that interpretation.
Repair the report: under the model, the observed count meets the declared rejection rule, with one-sided p-value 1/32 and maximum false-rejection probability under the null 3.125%. State what the decision does and does not establish. An actual conformity assessment requires its own applicable criteria, evidence and authorised decision process.
CHAPTER 11 OF 26 · Identify failure modes
11. Explain why error rates are conditional
Type I error is rejecting when p lies in the null region. Its probability depends on p, and the test size is the supremum across that region. Type II error is not rejecting at a parameter in the alternative. Its probability also varies with p.
Neither quantity by itself gives the fraction of all rejected claims that are false in a wider population of tests. That would require information about how null and alternative cases arise. Keep the sampling-model calculation separate from any model of prior uncertainty.
CHAPTER 12 OF 26 · Identify failure modes
12. Consider a larger sample under a new contract
If six independent trials are instead stipulated and the rule rejects only on six marks, size becomes 1/64 at p=1/2. At p=0.8 its power is 0.8⁶=0.262144, lower than the five-mark rule’s 0.32768.
This does not show that larger samples generally reduce power. We changed both the sample size and the critical count, imposing an all-success rule. A larger experiment may support a different threshold. Compare tests designed to a common size constraint and specified alternatives, rather than using sample size alone.
CHAPTER 13 OF 26 · Identify failure modes
13. Do not select the rule after seeing the result
If four marks arrive and the learner changes the threshold from five to four just to reject, the decision is no longer the original test. Its declared error guarantee cannot be carried over to that changed procedure. The new rule has a different false-rejection probability.
Record the original contract, any exploratory analysis and any planned follow-up separately. A genuine sequential testing design can have valid error control, but it requires its own rule and proof. Repeatedly inspecting data until a preferred result appears is not the fixed-five-trial model.
CHAPTER 14 OF 26 · Identify failure modes
14. Inspect the power curve rather than a single number
For the original test, rejection probability is p⁵ for every admissible p. At p=0.9, power is 0.59049. At p=1, power is one. Close to the null boundary, a true alternative may still produce rejection only infrequently.
These values show why stating the test has high power is incomplete without specifying an alternative. An expected operational detection rate would depend on the relevant parameter values and model. The power curve is calculated from assumptions, not measured on actual equipment.
| p | Power of X=5 | Probability of non-rejection |
|---|---|---|
| 0.5 | 0.03125 | 0.96875 |
| 0.8 | 0.32768 | 0.67232 |
| 0.9 | 0.59049 | 0.40951 |
| 1 | 1 | 0 |
CHAPTER 15 OF 26 · Identify failure modes
15. Inspect a violated independence assumption
Imagine the five recorded marks are actually five copies of one original Bernoulli outcome. The count is either zero or five, and at p=1/2 the chance of five marks is one half. The original binomial calculation would then seriously understate false rejection.
This counterexample changes the dependence structure, not the arithmetic. Verify that the observation units and generation mechanism justify the sampling model before interpreting a test. Identical-looking rows do not establish independent trials. The related conditional-independence and data-quality lessons develop these checks.
CHAPTER 16 OF 26 · Identify failure modes
16. Separate statistical evidence from standards decisions
The newer eduKate standards and conformity-literacy guide distinguishes requirements, evidence scope and qualified review. Our toy null test provides a narrow kind of evidence about a stipulated probability, not an acceptance decision for a real object or organisation.
A real assessment may require an authorised sampling plan, measurement uncertainty, applicable standard, documented procedures and a responsible decision-maker. These requirements cannot be inferred from a p-value. Education should teach learners to ask which question the evidence actually answers and which conditions remain missing.
CHAPTER 17 OF 26 · Identify failure modes
17. Audit an AI-generated test report
Ask an assistant to enumerate the null count distribution, identify the allowed critical region and calculate tail probabilities for four and five. Independently check the binomial coefficients and verify that the maximum size is below 0.05.
Then ask for power at 0.8 under both threshold rules and test the dependent-copy counterexample. Require the report to label the hypotheses and model. Reject any claim of a posterior probability, guaranteed outcome or real conformity that the assumptions do not support.
CHAPTER 18 OF 26 · Identify failure modes
18. A prompt for inspectable testing
Try: Assume five independent trials with fixed mark probability p. Test H0: p≤0.5 against p>0.5 at maximum size 0.05 using deterministic upper-tail count rules. Enumerate the null boundary distribution and justify the most inclusive valid threshold.
Continue: compute the one-sided p-values for X=4 and X=5, then calculate power at p=0.8 and compare the X≥4 variant. Explain why non-rejection is not proof of the null. Have the learner verify the null distribution and one alternative probability independently before reading the worked result.
CHAPTER 19 OF 26 · Identify failure modes
19. A proposed assessment rubric
Score five dimensions from zero to three: hypotheses and sampling assumptions; exact count probabilities; rejection region and p-value; power, errors and interpretation; independent transfer. Zero indicates absent evidence, one substantial errors, two mostly correct with an identified gap, three independently reproducible reasoning.
Record assisted output, learner explanation and recipient reconstruction separately. Permit ordinary access supports and agreed calculators. Maximum fifteen is a proposed teaching rubric, not a validated statistical-literacy measure or a guarantee of learning outcomes.
CHAPTER 20 OF 26 · Test independent transfer
20. Independent transfer: six draws and a new size constraint
A new fictional experiment has six independent Bernoulli draws. Test p≤1/2 against p>1/2 with maximum size 1/8. Among deterministic upper-tail rules choose the most inclusive valid one. Calculate its size and power at p=3/4, and the p-values for observed five and four marks.
Worked check: X≥5 has boundary probability (6+1)/64=7/64≤1/8. X≥4 has (15+6+1)/64=22/64, too large. Power at p=3/4 is 6(3/4)⁵(1/4)+(3/4)⁶=2187/4096, about 53.39%. The p-values are 7/64 and 22/64 respectively. Explain the decision and the remaining uncertainty.
| Quantity | Fresh transfer calculation |
|---|---|
| Number of trials | 6 |
| Boundary null p | 1/2 |
| Maximum test size | 1/8 |
| Candidate rejection rule | X≥5 |
| Alternative for power check | p=3/4 |
CHAPTER 21 OF 26 · Test independent transfer
21. Primary learning: count outcomes without claiming certainty
Use adult-prepared tokens or fictional sequences with two possible outcomes. Compare a set of five marks with a mixed set. Ask why a surprising pattern might arise even when both outcomes are equally likely.
The foundation is distinguishing an observation from a claim about the rule that generated it. Keep formal hypothesis terminology for later readiness. Adults may prepare and check examples with AI without direct child access. Use accessible representations and no actual assessment penalties.
CHAPTER 22 OF 26 · Test independent transfer
22. Secondary learning: connect combinations and probability
Students can enumerate the 32 equally likely sequences under the null boundary using combinations, then construct upper tails and check the threshold. Introduce error probabilities at specified alternatives. Distinguish the sample proportion from the unknown probability.
Give the six-draw transfer before the answer and require justification of the threshold. A calculator or spreadsheet may support arithmetic, but the learner should explain the conditioning and the dependent-copy counterexample. Retain ordinary accessibility supports.
CHAPTER 23 OF 26 · Test independent transfer
23. University, institutions and EnDist
Advanced work may examine exact tests, composite hypotheses, power functions, sequential methods, multiplicity and decision-theoretic design. Real use requires appropriate data generation, domain review and applicable requirements. This small experiment does not certify a method, instrument or learner.
Under proposed EnDist, transfer the sampling contract, hypotheses, decision rule, error guarantees and evidence limits with the calculation. A recipient should be able to reproduce the decision at a new observed count. Assess that demonstrated transfer separately from a polished statistical report.
CHAPTER 24 OF 26 · Four-week coursework plan
24. A four-week coursework sequence
Week one: define the fixed experiment and construct its null distribution. Week two: choose the threshold, calculate tail probabilities and interpret the decisions. Preserve the prespecified rule beside the outcome.
Week three: compare power, dependence violations and post-result rule changes; discuss conformity boundaries. Week four: release the six-draw transfer and assess independent and receiver reconstruction. Adapt pacing and access supports. The sequence is proposed instruction, not a validated intervention.
CHAPTER 25 OF 26 · Four-week coursework plan
25. Questions about exact tests
Does a p-value give the probability that the null is true? No. Does failing to reject prove the null? No. Does an exact calculation remove the need to check sampling assumptions? No. Is a test’s size necessarily equal to its maximum allowed significance level?
No; discrete thresholds can produce a smaller actual size. Does a rejection certify a real item? No. A meaningful test report retains the precise question, assumptions, procedure and scope. AI may help calculate, but an independent check is still necessary.
CHAPTER 26 OF 26 · Four-week coursework plan
26. Sources, boundaries and next steps
Penn State’s mathematical-statistics lesson explains the testing framework, errors and power. All trial models, decisions, numerical results, transfers and assessment proposals here are original fictional teaching constructions. The standards-education connection concerns evidence literacy; it does not establish conformity or learning effectiveness.
Design a different small count test with a declared maximum size, calculate its rejection region and compare power at two alternatives. Give the rule and probability table to a recipient before the observations. The enduring capability is making a conditional statistical judgment without confusing it with certainty or authority.
References: Penn State STAT 415: Hypothesis Tests (Part I).
Related coursework: Confidence Interval Coverage Lab · Sequential Probability Updating Lab · Precision, Recall and Threshold Lab · Standards, Testing and Certification Services and Education.
