Skip to main content
Back

Chi-Square Tests and One-Way ANOVA: Concepts, Calculations, and Applications

Study Guide - Smart Notes

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

Chi-Square Tests

Chi-Square Goodness-of-Fit Test

The chi-square goodness-of-fit test is used to determine whether the observed frequencies in categorical data match expected frequencies based on a specific hypothesis. This test is commonly applied when evaluating whether a sample distribution fits a theoretical distribution.

  • Observed Frequencies (O): The actual counts obtained from the data.

  • Expected Frequencies (E): The counts expected under the null hypothesis, often based on equal proportions or known population proportions.

Example: Suppose a survey of 200 students yields the following distribution by year:

  • First year: 60

  • Second year: 45

  • Third year: 52

  • Fourth year: 43

If equal representation is expected, E = 50 for each year. The test evaluates whether the observed distribution significantly deviates from this expectation.

Hypotheses

  • Null hypothesis (H0): O = E (Observed frequencies match expected frequencies)

  • Alternative hypothesis (Ha): O ≠ E (Observed frequencies differ from expected frequencies)

Test Statistic

The test statistic is calculated as:

where O is the observed frequency and E is the expected frequency for each category.

Degrees of Freedom

The degrees of freedom (df) for the goodness-of-fit test is:

where k is the number of categories.

Decision Rule

  • Choose a significance level (α), commonly 0.05.

  • Compare the calculated χ2 statistic to the critical value from the chi-square distribution table with the appropriate degrees of freedom.

  • If χ2 is greater than the critical value, reject H0.

Critical values of the Chi-square distribution with d degrees of freedom

Conditions for Validity

  • Observed frequencies must be from a random sample.

  • Each expected frequency should be at least 5.

Interpretation

If the test statistic does not exceed the critical value, we conclude that the observed distribution does not significantly differ from the expected distribution.

Chi-Square Test of Independence

The chi-square test of independence is used to determine whether two categorical variables are independent in a population. Data are organized in a contingency table (cross-tabulation).

  • Null hypothesis (H0): The variables are independent.

  • Alternative hypothesis (Ha): The variables are not independent.

Expected frequency for each cell:

Degrees of freedom:

The test statistic is calculated as in the goodness-of-fit test, and the decision is made by comparing to the critical value from the chi-square table.

Analysis of Variance (ANOVA)

Introduction to ANOVA

Analysis of Variance (ANOVA) is a statistical method used to compare means across three or more groups. It tests the null hypothesis that all group means are equal against the alternative that at least one group mean differs.

  • One-way ANOVA: Used when comparing means across groups defined by a single factor (independent variable).

  • Factor: The independent variable; each group is a level of the factor.

Assumptions

  • Each sample is randomly selected from a normal population.

  • Samples are independent.

  • Population variances are equal (homogeneity of variance).

ANOVA Calculations

  • Find the mean and variance of each sample.

  • Calculate the grand mean (mean of all data points).

  • Compute the sum of squares between groups (SSB) and within groups (SSW).

  • Calculate mean squares (MS) by dividing sum of squares by their respective degrees of freedom.

  • Compute the F statistic as the ratio of mean squares:

Degrees of Freedom

  • Numerator (between groups):

  • Denominator (within groups):

  • Where k = number of groups, N = total number of observations.

ANOVA Summary Table

The results of an ANOVA are often summarized in a table:

Variation

Sum of squares

Degrees of freedom

Mean squares

F

Between

SSB

d.f.N = k – 1

MSB = SSB/d.f.N

MSB/MSW

Within

SSW

d.f.D = N – k

MSW = SSW/d.f.D

ANOVA summary table

Decision Rule

  • Compare the calculated F statistic to the critical value from the F-distribution table with the appropriate degrees of freedom.

  • If F is greater than the critical value, reject H0.

Interpretation

If the null hypothesis is rejected, it indicates that at least one group mean is significantly different from the others. Further post-hoc tests may be needed to determine which groups differ.

Summary

  • Chi-square tests are used for categorical data to test goodness-of-fit or independence.

  • ANOVA is used to compare means across multiple groups.

  • Both tests rely on comparing calculated statistics to critical values from their respective distributions to make decisions about hypotheses.

Pearson Logo

Study Prep