01 · Null versus observation
Why is B(20,0.75) the wrong null model here?
Hint
Where does 0.75 come from?
Worked solution
15/20=0.75 is the observed proportion. H₀ specifies 0.5 for the probability used in the test.
Understand · explore · practise
Complete a two-sided binomial test with explicit equal-tail boundaries, inclusive probabilities and a careful contextual conclusion.
Before you startTwo-tailed critical regions and one-tailed tests.
01 / Either direction can challenge the claim
H₀: p=p₀; H₁: p≠p₀.
Here, use an equal-tail at-most test: the lower and upper tail budgets are each α/2.
Define the event whose probability is p. A change can be either an increase or a decrease. The calculation still uses p₀, not the sample proportion.
A device should select either output equally often. Test a change with 20 independent trials at nominal 5%, using equal tails at most 2.5% each.
02 / Write the full null model
Let p be the probability of output A
H₀: p=0.5; H₁: p≠0.5.
Let X count output A in 20 trials
Under H₀, X~B(20,0.5), assuming independent trials and a common probability.
Observed count x=15
The upper end is relevant to this observation; each end has budget 0.025.
Why is B(20,0.75) the wrong null model here?
Where does 0.75 come from?
15/20=0.75 is the observed proportion. H₀ specifies 0.5 for the probability used in the test.
Why is p>0.5 not the given alternative?
Read the original suspicion.
The engineer suspected a change in either direction. Seeing a high count does not authorise rewriting that preselected two-sided alternative.
03 / Use half the level for an observed tail
Pause, replay or seek freely. The notes explain the same idea and stay in view.
P(X≥15) = 1 − P(X≤14) ≈ 0.02069473
This includes 15,16,…,20.
0.02069473 ≤ 0.025
The observed upper tail meets its half-level budget.
Reject H₀
There is sufficient evidence at nominal 5%, under this rule and model, that the probability of output A differs from 0.5.
Why not use 1−P(X≤15)?
Identify the first included count.
That gives P(X≥16) and wrongly omits the observed 15.
For 14 outputs A, the upper tail is 0.05765915. State the decision.
Compare with 0.025.
Do not reject H₀. There is insufficient evidence of a change at nominal 5% under the stated test.
04 / Both boundaries belong to one test
By symmetry, P(X≤5)=P(X≥15)≈0.02069473. The next counts fail: P(X≤6)=P(X≥14)≈0.05765915. Therefore the full critical region is X≤5 or X≥15. Counts 6 through 14 do not reject.
What conclusion follows if output A appears five times?
Check membership of the other tail.
Five lies in the critical region, so reject H₀. There is sufficient evidence of a change in the output probability under the stated test.
Why is six excluded?
Use its inclusive lower tail.
P(X≤6)≈0.05765915 exceeds 0.025, so it does not meet the per-tail condition.
05 / Report the achieved level when asked
The actual significance is P(X≤5)+P(X≥15)≈0.04138947, or 4.138947%. It is at most the nominal 5%. This is the probability of rejecting under H₀, not the probability that H₀ is false.
Why add, rather than multiply, the two tails?
Can one count lie in both?
They are disjoint alternatives in a union. Add their probabilities to find the rejection probability.
Find the probability of not rejecting if H₀ is true.
Complement the actual level.
Approximately 1−0.04138947=0.95861053. This is not the probability that H₀ is true after observing nonrejection.
06 / Specify what your two-sided calculation means
For this symmetric example, doubling the observed one-sided tail gives 0.04138947, which can be compared with 0.05 and gives the same decision. These lessons define the equal-tail construction explicitly. Do not assume every software package uses that same definition of an exact two-sided p-value.
Why not compare an observed tail with 0.05 for this equal-tail test?
There are two preselected directions.
The equal-tail construction gives each end 0.025. Giving each tail 0.05 can allow up to 0.10 overall.
For B(20,0.2), may you reflect the lower cutoff about 10 to get the upper cutoff?
Check symmetry.
No. A binomial distribution is symmetric at p=0.5. Compute both tails separately for p=0.2.
07 / Make the conclusion match the evidence
Rewrite “14 does not reject, therefore the device is perfectly fair”.
State what the test failed to establish.
There is insufficient evidence at nominal 5%, under the stated rule and assumptions, that the output probability differs from 0.5. Fairness has not been proved.
Can the result with 15 outputs A prove p=0.75?
Distinguish an estimate from a hypothesis-test conclusion.
No. The sample proportion estimates p, but rejection supports a difference from 0.5 rather than proving a particular value.
The device repeats its preceding output unusually often. Which assumption needs scrutiny?
Does one result affect the next?
Independence. A binomial test may be inappropriate if successive trials are dependent.
List the components of a complete two-sided test.
Follow the reasoning from parameter to context.
Define p and X; state H₀ and H₁; justify the null binomial model; state nominal level and tail convention; calculate inclusive tails or a justified critical region; compare and conclude in context.
08 / Two possible extremes, one planned rule
Use the null probability, allocate half the level to each tail, include boundary counts and state the full rejection region. Calculate the actual total if requested. Rejection is evidence against the null within the model; nonrejection is not proof of equality.
Section 1 of 8 · Either direction can challenge the claim