Cheat sheets

Statistics / Chapter 3

Inference for Categorical Data: Proportions

Cheat sheet

Proportion sampling

  • p^=x/n\hat p=x/n For independent observations, E(p^)=pE(\hat p)=p and SD(p^)=p(1−p)/nSD(\hat p)=\sqrt{p(1-p)/n} An unbiased estimator is centered at the parameter over repeated samples; precision concerns spread.
  • Check random selection/assignment appropriate to the inference, independent observations (10% guideline when sampling without replacement), and np≥10np\ge10 n(1−p)≥10n(1-p)\ge10 for a normal sampling approximation.

One-proportion interval

  • p^±z∗p^(1−p^)/n\hat p\pm z^*\sqrt{\hat p(1-\hat p)/n} Check at least 10 observed successes and 10 observed failures, along with design and independence.
  • Confidence describes long-run coverage of the method. A computed interval estimates the population proportion; it is not the range containing that percentage of individuals.
  • Planned margin M needs n≥(z∗/M)2p∗(1−p∗)n\ge(z^*/M)^2p^*(1-p^*) rounded up. Use p∗=0.5p^*=0.5 if no reasonable planning estimate exists; more confidence increases width.

Hypothesis tests

  • Write hypotheses about population parameters. A p-value is the probability under the null model of a result at least as extreme as observed in the alternative’s direction.
  • Reject when p-value≤αp\text{-value}\le\alpha otherwise fail to reject. A p-value is not the probability the null is true, and failure to reject does not prove it.
  • One-proportion test: z=(p^−p0)/p0(1−p0)/nz=(\hat p-p_0)/\sqrt{p_0(1-p_0)/n} Check expected successes/failures using p0p_0 not p^\hat p Match the tail to HaH_a
  • Type I: reject a true null. Type II: fail to reject a false null. Describe the mistake in the study’s context.

Two independent proportions

  • Target p1−p2p_1-p_2 with a fixed group order. Center of p^1−p^2\hat p_1-\hat p_2 is p1−p2p_1-p_2 independent variances add.
  • Interval: (p^1−p^2)±z∗p^1(1−p^1)/n1+p^2(1−p^2)/n2(\hat p_1-\hat p_2)\pm z^*\sqrt{\hat p_1(1-\hat p_1)/n_1+\hat p_2(1-\hat p_2)/n_2} Use separate observed proportions and check both groups.
  • For H0:p1=p2H_0:p_1=p_2 pool p^c=(x1+x2)/(n1+n2)\hat p_c=(x_1+x_2)/(n_1+n_2) and use z=(p^1−p^2)/p^c(1−p^c)(1/n1+1/n2)z=(\hat p_1-\hat p_2)/\sqrt{\hat p_c(1-\hat p_c)(1/n_1+1/n_2)} Check expected counts under this null.
  • Negative intervals for p1−p2 indicate a lower proportion in group 1. Distinguish a proportion difference in percentage points from a relative percent change. Paired binary data are not independent two-sample data.

Chi-square association

  • Independence: one sample measured on two categorical variables. Homogeneity: independent samples/populations compared on one categorical distribution.
  • E=(row total)(column total)/grand totalE=(\text{row total})(\text{column total})/\text{grand total} Check independent units, appropriate random design, the 10% guideline where relevant, and every expected cell count at least 5.
  • χ2=∑(O−E)2/E\chi^2=\sum (O-E)^2/E with df=(r−1)(c−1)df=(r-1)(c-1) The p-value is a right-tail area. A significant overall test does not identify every differing cell or establish causality.

Diagrams

Repeated confidence intervals
Illustrative intervals, not a simulation guarantee: 19 of these 20 contain the fixed parameter 0.50 (dashed). The interval from 0.55 to 0.71 misses it. A 95% procedure need not capture in exactly 19 of every 20 samples.
Illustrative intervals, not a simulation guarantee: 19 of these 20 contain the fixed parameter 0.50 (dashed). The interval from 0.55 to 0.71 misses it. A 95% procedure need not capture in exactly 19 of every 20 samples. Source
Chi-square tail
For df=2, a chi-square statistic of approximately 7.824 has right-tail probability 0.02. The distribution is nonnegative and asymmetric; the p-value is a right-tail area.
For df=2, a chi-square statistic of approximately 7.824 has right-tail probability 0.02. The distribution is nonnegative and asymmetric; the p-value is a right-tail area. Source

Sign in