Hypothesis Testing for Univariate Categorical Data
Statistical Inference for Univariate Categorical Data
A binary categorical variable is modeled using a Bernoulli distribution (Y∼Bern(π)), where the parameter π represents the true population proportion.
The sample proportion (p^) acts as the point estimate for the unknown population parameter π.
Law of Large Numbers: As the sample size (n) increases, the probability that p^ converges closer to π increases.
One-Sample Z-Test for Proportions
Step 1: Formulate Hypotheses
Null hypothesis: H0:π0=0.5
Alternative hypothesis: Ha:π0=0.5
The subscript 0 denotes the specific hypothesized value under the null hypothesis.
Step 2: Calculate the Test Statistic
The standardized test statistic measures how many standard errors the sample proportion (p^) deviates from the hypothesized value (π0):
z=SE(p^)p^−π0
Under the null hypothesis and large-sample conditions, z follows a standard normal sampling distribution with a center of 0 and a standard deviation of 1.
Step 3: Determine the p-value
The two-sided p-value computes the probability of observing a result at least as extreme as the calculated statistic:
Prob(∣Z∣>∣z∣)=Prob(Z>SE(p^)p^−π0)+Prob(Z<−SE(p^)p^−π0)
Step 4: Draw Conclusions
Compare the p-value to the significance threshold (e.g., α=0.05).
When the p-value is smaller than α, the sample data is inconsistent with the null hypothesis, leading to a rejection of H0.
Technical Conditions and Considerations
Sample Size Rule of Thumb: The sampling distribution of z is approximately normal only when the sample contains at least 10 "yes's" and at least 10 "no's".
When sample counts are too small, the sampling distribution becomes skewed, invalidating standard normal probability calculations.
Violation of Assumptions: If the data cannot be modeled as Bernoulli trials or the minimum sample size criteria fail, standard normal critical values cannot be assumed; more data must be collected or an alternative statistical method used.
Statistical vs. Practical Significance: A statistically significant test result (e.g., rejecting H0) demonstrates that an observed difference is unlikely due to random chance, but does not inherently guarantee that the magnitude of the difference (such as p^−π0=0.1415201) is practically significant.