Analysis · 5 steps

Tests for categories

Test whether two categorical variables are associated, using a contingency table.

Step by step

Before you start: Load the Penguins sample: Data › Sample data › Penguins. Getting started shows how.

  1. Choose Chi-Square Test of Independence

    Click Analyze in the menu bar; under Categorical choose Chi-Square Test of Independence.

  2. Fill in the form

    In Rows of the table, choose species. In Columns of the table, choose island. Leave the options at their defaults unless you need otherwise.

  3. Run the analysis

    Press Run analysis. The Result Card opens on the Results tab: what to know first, then the interpretation in words and the Key Results.

  4. Find the chart

    Scroll down the Results tab to the chart.

  5. Read Learn More

    Open Learn More for the idea in plain words, the assumptions and the formula. Code gives the same analysis as Python, R and MATLAB code (and SAS where the tab offers it), and Export sends the card to a report or slides: see Read a Result Card.

What you should see

A Chi-Square Test of Independence card on the Results tab: what to know first, the interpretation in words, the Key Results and, further down, the chart.

Common problems

Some expected counts are small.

Read the card’s assumption check on expected counts before relying on the p-value.

Understand the statistics

Ask Oobi

Type one of these into Ask Oobi beside your data:

  • Is penguin species associated with the island it lives on?
  • What share of each island's penguins belongs to each species?

Last reviewed November 16, 2026.

Report an unclear step