Skip to main content
Back

Hypothesis Testing with Categorical Response: Proportions and Chi-Square Methods

Study Guide - Smart Notes

Tailored notes based on your materials, expanded with key definitions, examples, and context.

Hypothesis Testing with Categorical Response

Response and Explanatory Variables

In statistical studies, it is crucial to distinguish between the response variable (the outcome of interest) and the explanatory variable (the variable that may explain or influence the response). Understanding their roles is foundational for hypothesis testing and data analysis.

  • Response Variable: The main outcome measured in a study (also called the dependent variable).

  • Explanatory Variable: The variable manipulated or categorized to observe its effect on the response (also called the independent variable).

Example: In a medical study, the response variable might be whether a patient recovered (yes/no), and the explanatory variable could be the treatment received.

Type of Study

Response Variable

Explanatory Variable

Survey

Customer satisfaction

Product type

Experiment

Recovery status

Treatment group

One Sample Test for a Proportion

This test evaluates whether the proportion of a categorical outcome in a sample differs from a hypothesized value. It is commonly used when the response variable is binary (e.g., success/failure).

  • Null Hypothesis (H0): (the population proportion equals the hypothesized value)

  • Alternative Hypothesis (HA): , , or (depending on the research question)

Test Statistic:

  • = sample proportion

  • = hypothesized population proportion

  • = sample size

Confidence Interval:

Example: Testing if the side effect rate of a vaccine differs from a known value. If 40 out of 150 individuals experience a side effect, .

Test for Difference in Proportions

This test compares the proportions of a categorical outcome between two independent groups. It is widely used in clinical trials, A/B testing, and survey analysis.

  • Null Hypothesis (H0): (the population proportions are equal)

  • Alternative Hypothesis (HA): , , or

Pooled Proportion:

  • = number of successes in each group

  • = sample sizes of each group

Test Statistic:

Confidence Interval for Difference:

Example: Comparing recovery rates between two therapies or conversion rates in A/B testing.

Chi-Square Goodness of Fit

The chi-square goodness of fit test assesses whether the observed frequencies of a categorical variable match expected frequencies under a specified distribution.

  • Null Hypothesis (H0): The observed frequencies fit the expected distribution.

  • Alternative Hypothesis (HA): The observed frequencies do not fit the expected distribution.

Test Statistic:

  • = observed count in category

  • = expected count in category

Bonferroni Adjustment: Used when making multiple comparisons to control the family-wise error rate.

Example: Testing Mendelian inheritance ratios in genetics.

Chi-Square Test for Association

This test evaluates whether there is an association between two categorical variables, often using a contingency table.

  • Null Hypothesis (H0): The variables are independent (no association).

  • Alternative Hypothesis (HA): The variables are associated (not independent).

Expected Count:

Test Statistic:

  • = observed count in cell

  • = expected count in cell

Example: Examining the relationship between smoking status and lung disease, or between product preference and gender.

Summary Table: Key Concepts and Formulas

Keyword/Concept

Definition/Formula

Null hypothesis (proportion)

Test statistic (one proportion)

Test statistic (two proportions)

Chi-square statistic

Expected count (association)

Additional info:

  • All tests require certain assumptions, such as random sampling and sufficiently large sample sizes for normal approximation.

  • Bonferroni correction is used to adjust confidence intervals when multiple comparisons are made, reducing the risk of Type I error.

  • Statistical software (e.g., JMP) can be used to perform these tests and calculate confidence intervals efficiently.

Pearson Logo

Study Prep