Design, count and hypotheses
X counts successes in n independent Bernoulli trials fixed in advance with one common unknown probability p. Here n is a positive integer,0<p0<1 and 0<α<1. Define success, direction, sample size and level before the decision. Small-population sampling without replacement, varying probabilities and dependent observations do not automatically fit the binomial model.[1]
The null-boundary distribution supplies point probabilities; a test uses an entire tail.[1]
Choose integer rejection cutoffs correctly
For a right-sided test use H0:p≤p0 against H1:p>p0. Choose the smallest cutoff cR satisfying Pp0(X≥cR)≤α, giving K={cR,…,n}. For a left-sided test use H0:p≥p0 against H1:p<p0. Choose the largest cL satisfying Pp0(X≤cL)≤α, giving K={0,…,cL}. Also check the immediately larger rejection region. Equality with α is allowed.[1]
The complement shifts the integer boundary by one.[1]
Why use the null boundary? As p increases, Pp(X≥c) cannot decrease and Pp(X≤c) cannot increase for any fixed cutoff c. Assign each trial its own uniform random number on[0,1], independently of the other trials. Keep those same numbers when comparing different p and apply the success condition U≤p to each trial: increasing p can add successes, never remove them. Thus p0 is the largest type-I risk among p≤p0 for the right-sided test, and likewise among p≥p0 for the left-sided test. The boundary tail therefore bounds type-I error throughout the one-sided null.[1]
If even X=n for the right-sided test or X=0 for the left-sided test exceeds the level, K is empty. Formally write cR=n+1 or cL=−1; these are cutoff markers rather than observable counts. An empty region is not an arithmetic failure.
Work through both directions exactly
Right-sided: eight successes are not enough
- Given
- Ten independent trials fixed in advance, with constant unknown p. H0:p≤0.5 versus H1:p>0.5; α=0.05. Eight successes are observed.
- Find
- Find the largest right-tail rejection region and make the decision.
Calculate at the null boundary. Large counts favour H1.
Sum the upper tail including 9.
Check the next larger rejection region.
Apply the prespecified rule to the observation.
Result: Do not reject H0 at the 5% level. The rejection region is{9,10}, with actual maximum type-I error 11/1024≈1.074%.
Check: The adjacent tails establish the boundary: rejection from 9 respects α, while rejection from 8 exceeds it. Not rejecting proves neither p=0.5 nor the full null hypothesis true.
Left-sided: small counts are unusual
- Given
- Twelve independent trials; H0:p≥0.5 versus H1:p<0.5; α=0.10. Three successes are observed.
- Find
- Justify the lower-tail rejection region and decision.
Small counts are the prespecified alternative direction.
Calculate the tail through 3 exactly.
Check 4 as the immediate next boundary.
Compare the observation with the integer boundary.
Result: Reject H0 at the 10% level in favour of p<0.5. The actual maximum type-I error is 299/4096≈7.300%.
Check: The observation is on the included boundary 3. Extending the region through 4 would already be too large. Rejection is a statistical decision under the model, not proof of a particular alternative parameter.
Two possible cutoffs and a prescribed level
Free with a Quanta account. Your download stays ready after registration.
Recall the method later with the formula’s flashcards.
10 flashcards · English materials
Already have an account? Sign in for flashcardsAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Decision, errors and calculation model
Reject H0 when the observation belongs to K; otherwise do not reject it. The actual maximum type-I error is Pp0(X∈K)≤α. At a specified alternative p1,β(p1)=Pp1(X∉K), and power is 1−β(p1). These probabilities condition on different true parameters.
The calculator uses a one-sided exact binomial test with 1≤n≤200,10−6≤p0≤1−10−6 and 10−9≤α<1. An additional alternative p1 is in the same probability interval or equals 0 or 1. For type-II error and power it must also belong to H1: p1>p0 for a right-sided test or p1<p0 for a left-sided test. Two-sided conventions, normal approximations, changing sample size during analysis and automatic validation of the substantive model are excluded. Computing β is an additional evaluation at an explicitly specified alternative parameter. Binomial probabilities are summed without a normal approximation. An extremely small requested probability outside the output range requires a numerical-range message rather than being reported as exactly zero.
Five solved exercises
Calculate · Application
For n=8,p0=0.5 and α=0.05 find the largest right-tail rejection region.
Show hint
Compare the tails from 7 and 6.
Learning goal: Validate a discrete cutoff using two adjacent tails.
Show solution and calculation
P(X≥7)=(8+1)/256=9/256=0.03515625≤0.05.
P(X≥6)=(28+8+1)/256=37/256=0.14453125>0.05.
Hence K={7,8}.
Check: the next larger tail violates the level, so the region from 7 is maximal.
Rearrange · Application
For which prespecified α is the right-tail cutoff exactly 9 when n=10,p0=0.5?
Show hint
The tail from 9 must qualify, while the tail from 8 must not.
Learning goal: Translate cutoff conditions into a significance-level range.
Show solution and calculation
The condition is 11/1024≤α<56/1024, or 0.0107421875≤α<0.0546875.
Equality is allowed at the lower endpoint; at the upper endpoint cutoff 8 would qualify.
Check: α=0.05 is inside. This analyses levels mathematically; it does not justify choosing α after seeing data.
Interpret · Foundation
In the first example 8 of 10 successes are observed. Does nonrejection prove p≤0.5?
Show hint
A test can fail to detect an alternative.
Learning goal: Distinguish a decision rule from proof of truth.
Show solution and calculation
No.
The right-sided p-value is 56/1024=0.0546875>0.05, so the prespecified rule does not reject H0.
It neither proves H0 nor determines p exactly.
Check: even for a genuinely larger p, X can fall below 9; such outcomes produce type-II errors.
Error analysis · Application
A calculation uses 1−P(X≤9) for P(X≥9). Correct it for n=10,p0=0.5.
Show hint
The complement of at least 9 is at most 8.
Learning goal: Shift integer cutoffs correctly when taking complements.
Show solution and calculation
Correctly,P(X≥9)=1−P(X≤8)=11/1024.
The incorrect expression counts only X=10 and gives 1/1024.
Check: the missing probability P(X=9)=10/1024 explains the entire difference. The cutoff observation must be included in the rejection region.
Transfer · Application
Keep K={9,10} from the first example. At true p=0.8, what are the type-II error probability and power?
Show hint
For β use the alternative probability and the nonrejection region.
Learning goal: Calculate type-II error at a specified alternative parameter.
Show solution and calculation
β(0.8)=P0.8(X≤8)=1−[10·0.89·0.2+0.810]=0.6241903616.
Power 1−β is 0.3758096384.
Check: β+power=1. The low type-I error 11/1024 at the null boundary therefore does not guarantee that ten observations detect an improvement to 0.8 often.
Check your understanding with the formula’s reference test.
8 test questions · English materials
Already have an account? Sign in for the testAvailable from Essential. A ready-made formula set, no AI credits required. Article exercises are not all included.
Probability model before test decisions
The binomial distribution supplies count probabilities. The binomial coefficient explains how many matching success patterns contribute to each point probability. A test adds a prespecified decision rule.
Two-sided tests: state the convention
Discrete distributions admit different common two-sided p-value conventions. Here probability ordering is used explicitly: under H0, sum the probabilities of all outcomes whose point probability is no larger than the observed k. Outcome selection uses the same exact binomial probabilities. Another valid test may double the smaller one-sided tail; results need not agree.
This section uses only the stated probability-ordering convention.
Original example: n=10, p0=0.2, observed k=0. P0(X=0)=0.810=0.1073741824. Selected outcomes are 0 and 4 through 10, summing to 0.228248064. An α=0.05 test does not reject H0. The doubled lower tail instead equals 0.2147483648. Neither number should be called the uniquely defined exact two-sided p-value without naming its convention.
The rejection set at the selected level is K={k:pord(k)≤α}; discreteness means its actual null probability need not equal α. Existing one-sided calculators retain their labels. This addition does not change their meaning or imply an implemented two-sided calculator.
Sources for this explanation
Quanta · Updated November 6, 2026
- HTW Dresden, Statistics I981: Tests for Unknown Probabilities, Exact Binomial Test (German-language source)
- LehrplanPLUS Bayern, FOS12 Nichttechnik, Lernbereich7 Testen von Hypothesen, gültig seit2018/19
- Landesbildungsserver Baden-Württemberg, Testen von Hypothesen, einseitige Signifikanztests
- R stats: binom.test, Exact Binomial Test
Editorial responsibility: Quanta Study editorial team
Review scope
This explanation, 2 worked examples and 5 exercises are available in German and English. Structure, source references and mathematical notation undergo automated checks. Calculations, model assumptions and both language versions receive a separate AI review.
An independent, named human subject review has not yet been documented. Our exercise numbers are worked examples, rather than measurements published by the cited sources.
Editorial responsibility, sources and methodsChange history
- Authored an independent DE/EN school article with a justification, two original examples, five solved exercises and a native diagram.
- Two-sided tests: state the convention
Cite this reference page
Quanta. One-sided exact binomial hypothesis test. Updated November 6, 2026. https://quanta-study.de/en/formula-sheet/binomialer-hypothesentest
When citing a specific scientific statement, also cite the specialist source linked to that statement.