University of Auckland · FACULTY OF STATISTICS

BUSINFO700 Chap.7 Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA

- one subject, every graph, every model, every mark
6 Chapters5-page Bible
Our own words - no uploaded lecturer files
Updated for this semester
Chapter 7 of 9 · BUSINFO700

Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA

This chapter turns test selection into a routine you can run in seconds. It starts from the measurement level of each variable: two non-metric variables call for a chi-square test on their cross-table, a binary group with a metric outcome leads to a t-test, three or more groups with a metric outcome lead to ANOVA, and two metric variables lead to correlation.

You will compute expected counts and a chi-square statistic by hand, see when Fisher's exact test replaces chi-square, and read t-test output where the difference is too small to be significant.

The ANOVA page sets out the follow-up sequence whose R code appears in the Week 7 slides, from the overall F-test to a Levene test on the variances and then Tukey or Tamhane post-hoc comparisons, and shows why a pairwise result means nothing after a non-significant F. Three drills rehearse the selection and interpretation questions in the practice-test format.

The interpretation drills end with the four moves a strong answer makes: why this test, what the output says, what could bias it and which error remains possible.

In this chapter

What this chapter covers

  • 01

    Classifying variables as metric or non-metric

  • 02

    Cross-tables, expected counts and chi-square

  • 03

    Fisher's exact test for small samples

  • 04

    Two-group comparisons with the t-test

  • 05

    ANOVA, Levene and post-hoc tests

  • 06

    Writing the manager's verdict from output

Worked example · free

Follow the branch for each pair of variables in a repair dataset

Q [6 marks]. AskSia-authored practice. A phone-repair chain's job file holds four variables: turnaround in days, repair type (screen, battery, water damage or other), whether the phone was under warranty (yes or no) and the customer's age in years. First classify each variable as metric or non-metric, then follow the tree for the manager's two questions: (1) does average turnaround differ across repair types, and (2) is customer age related to turnaround? The marks shown are an AskSia study allocation, not an official University marking scheme.
Choosing a bivariate testA tree starts from two variables and splits by measurement level: both non-metric leads to a chi-square test, or Fisher's exact test when expected counts are small; a binary variable with a metric one leads to a t-test; three or more groups with a metric variable lead to ANOVA, a Levene test and a post-hoc test; two metric variables lead to correlation.Two variablesBoth non-metricChi-square testFisher's exact if smallBinary × metrict-test3+ groups × metricANOVALevene, then post-hocBoth metricCorrelation
Start at the top with the two variables, follow the branch that matches their measurement levels, and read the analysis in the box at the bottom; the small notes under chi-square and ANOVA show the follow-up check each one needs.
  • 2Classify: turnaround in days and age in years are metric; repair type is a non-metric variable with four categories; warranty is a binary non-metric variable.
  • 2Question 1 pairs a four-category grouping variable with a metric outcome, so it takes the ANOVA branch: run the F-test, then a Levene test on the variances and a Tukey or Tamhane post-hoc test if F is significant.
  • 2Question 2 pairs two metric variables, so it takes the correlation branch; warranty is not needed for either question.
Turnaround and age are metric, repair type and warranty are non-metric. Comparing turnaround across four repair types is an ANOVA with a Levene test and post-hoc comparisons, and relating age to turnaround is a correlation. Classifying every variable first makes each branch of the tree obvious.
Sia tip — Classify every variable in the dataset before reading the questions; each question then becomes a pair of labels you can trace down the tree.
Glossary

Key terms

Expected count
The number of cases a cell of a cross-table would hold if the two variables were unrelated, computed from the row and column totals.
Fisher's exact test
An alternative to chi-square for cross-tables with small samples or expected counts below 5, computing the probability exactly.
Independent samples t-test
A comparison of a metric variable's mean between two separate groups, judged by the gap relative to its standard error.
Levene test
A check, run after ANOVA, of whether the groups share equal variances, which decides the post-hoc procedure.
Post-hoc test
A follow-up comparison of every pair of groups, such as Tukey or Tamhane's T2, used once ANOVA finds a difference.
FAQ

Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA FAQ

When should I use Fisher's exact test instead of chi-square?

Use it when the sample is small or expected cell counts drop below 5, because the chi-square approximation then becomes unreliable. In R, check the expected table first; if several cells are under 5, run fisher.test on the same two variables and report its p-value instead.

Why not run several t-tests instead of one ANOVA?

Each extra t-test adds another chance of a false positive, so comparing three or more groups pairwise inflates the overall risk of a Type I error. ANOVA tests all group means together first, and post-hoc procedures then compare pairs in a controlled way.

How do I choose between Tukey and Tamhane after ANOVA?

Run a Levene test on the variances. If its p-value is 0.05 or higher, the groups can be treated as having equal variances and Tukey's procedure applies. If it is below 0.05, the variances differ, and Tamhane's T2 is the appropriate pairwise comparison.

Does a significant chi-square result prove one variable causes the other?

No. It shows only that the two variables are associated in the sample. A confounding factor, the order of events or the way the sample was drawn could explain the pattern, so a full answer names the association, its direction and at least one reason it may not be causal.

Why does R need factor() around the group variable in ANOVA?

If groups are stored as numbers such as 1, 2 and 3, R treats them as a continuous scale and fits the wrong model. Wrapping the variable in factor() tells R the values are categories, so aov compares one mean per group as intended.

Study strategy

Assessment move

Make a one-page selector in your own words that lists the four pairings of measurement levels and the analysis each one calls for, then cover it and rebuild it from memory until it takes under a minute. Practise classifying variables from short business descriptions, paying special attention to banded or coded numbers that are really ordinal.

For the chi-square test, compute expected counts and the statistic by hand for at least two small tables so the R output stops being a black box. For t-tests and ANOVA, write out the null and alternative hypotheses before reading any p-value, and practise the ANOVA sequence of F-test, Levene test and post-hoc comparison.

Finish every interpretation with four short moves: why this test, whether the result supports the manager's expectation, what could bias or confound it, and which error type remains possible. Time yourself: the practice test allows 5 minutes for three selection items, which leaves the rest of the time for interpretation.

Working through Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA in BUSINFO700? Sia is AskSia’s AI Statistics tutor — ask any BUSINFO700 Choosing a Bivariate Test: Chi-Square, T-Test, ANOVA question and get a clear, step-by-step explanation grounded in how BUSINFO700 is taught and assessed. Read this chapter free, then take your hardest questions to Sia.

A+Everything unlocked
Unlocks this Bible + all 32 of your University of Auckland subjects - and 1,000+ Bibles across every Australian university.
Sia - your BUSINFO700 tutor, unlimited, worked the way the exam marks it
The full 5-page Bible + practice bank with worked solutions
Chrome extension - sync your LMS so Sia knows your deadlines
Bilingual EN / Chinese on every Bible and every Sia answer
$0.99 Trial
30-day money-back · cancel in one tap · how it works