Setting Up a Test for p · 为总体比例设立检验
| English | 中文 | Pinyin · 拼音 |
|---|---|---|
| null hypothesis/nʌl haɪˈpɒθəsɪs/ | 原假设 | yuán jiǎ shè |
| alternative hypothesis/ɔːlˈtɜːnətɪv haɪˈpɒθəsɪs/ | 备择假设 | bèi zé jiǎ shè |
| one-sample z-test/wʌn ˈsæmpl zed test/ | 单样本z检验 | dān yàng běn z jiǎn yàn |
| test statistic/test stəˈtɪstɪk/ | 检验统计量 | jiǎn yàn tǒng jì liàng |
Is an on-time promise being met?
- A fictional seller claims that 90% of orders ship on time. A random sample of 100 orders contains 85 on-time shipments.
- To investigate a lower on-time rate, define $p$ for all orders in the specified period. State the null hypothesis 原假设 $H_0:p=0.90$.
Choose the direction from the study question
- The alternative hypothesis 备择假设 is $H_a:p<0.90$ if the question concerns worse performance. Use $p\ne0.90$ for a difference in either direction.
- Choose the direction before inspecting results. A direction selected to obtain a smaller p-value changes the planned evidence assessment.
The null hypothesis for a one-proportion test has the form...
H0 states a specific value p0 (the status quo).
Match each preplanned question to its alternative.
The research direction determines which results count as extreme.
Check the null expected counts
- The one-sample z-test 单样本z检验 requires a suitable random design, the 10% condition when sampling without replacement, and large null expected counts.
- With $p_0=0.90$, the expected counts are $np_0=90$ and $n(1-p_0)=10$. These are not the observed counts 85 and 15.
In the one-proportion z-test here, the null value p0 is used for expected-count checks and the test standard error.
Calculate np0, n(1-p0) and sqrt(p0(1-p0)/n). Random design and independence must also be checked.
Measure distance under the null model
- The test statistic 检验统计量 is $z=(\hat p-p_0)/\sqrt{p_0(1-p_0)/n}$. Its denominator describes variability under the assumed null value.
- Here the null standard deviation is $\sqrt{0.90(0.10)/100}=0.03$, so $z=(0.85-0.90)/0.03\approx-1.667$.
The observed shortfall is 0.05; the null standard error is 0.03. The sample lies about 1.67 null standard errors below the claim.
Lower-tail evidence for the worked test
The worked lower-sided test has z ≈ -1.67. The shaded left tail is approximately 0.0475 using this rounded statistic.
p0 = 0.90, n = 100, p̂ = 0.85. Compute z = (p̂−p0)/√(p0(1−p0)/n). Two decimals.
(−0.05)/√(0.09/100) = −0.05/0.03 ≈ −1.67.
For n = 100 and H0: p = 0.90, select the null-model calculations.
Under the null model, expected failures are 10 and SE = sqrt(0.90 × 0.10/100) = 0.03.
Match the sign and the alternative
- The negative statistic places the observed proportion below the null value. For the lower-sided alternative, find the area to its left.
- If the planned alternative were greater-than instead, these same data would not support it strongly. A large absolute statistic alone does not select the tail.
Choose the alternative before examining the sample result. A convenient tail chosen afterwards changes the error calibration.
You should choose a one- or two-sided alternative after looking at the data to match it.
Choose Ha before collecting data — matching it afterward is cheating.
Keep interval and test inputs separate
- Use $p_0$ in this null test. The usual interval instead estimates its standard error from $\hat p$, without assuming this null value.
- Both procedures still need assumptions. An interval does not become assumption-free merely because it does not impose $p=p_0$.
Use $p_0$ in this null test. The usual interval instead estimates its standard error from $\hat p$, without assuming this null value.
A test statistic with a large |z| means...
Large |z| = far from the null-predicted value.
Passing the null expected-count check makes a voluntary-response sample representative.
Normal approximation and sampling design are separate requirements.