IYKNO
home/guides/which statistical test should i use?

guides · study methods · 6 min read

which statistical
test should i use?

in short: start from your question and your variables: compare two means with a t-test, three or more groups with anova, categorical data with a chi-square test and two numeric variables with correlation or regression, then check the assumptions.

a short set of questions about your data that points to the right test: t-tests, anova, chi-square, correlation and regression.

the bit that is not landing. a real tutor works it with you.

most statistics students can run a test once someone tells them which one to run. the hard part, on homework and exams, is choosing. the good news is that the choice follows a short set of questions about your data, and once you learn them the list of tests stops looking like a pile of names. here is the decision process, with the assumptions you need to check before you trust the result.

start with the question, not the test

before you think about any test, write down in one sentence what you are trying to find out. for example: "do students who sleep more score higher?" or "is the average wait time different from what the company claims?" then answer four things:

  1. what are the variables, and is each one numeric (like height or a score) or categorical (like a major, a yes or no answer, or a group label)?
  2. how many groups are you comparing: one, two, or three or more?
  3. are the groups independent (different people in each) or paired (the same people measured twice, or matched pairs)?
  4. are you comparing means, comparing proportions or counts, or looking at a relationship between two variables?

those four answers point to a test almost every time.

comparing means: the t-tests

when the outcome is numeric and you want to compare averages, you are usually in t-test territory. there are three common versions.

  • one-sample t-test. compares the mean of one group to a fixed value. example: is the average battery life of a sample different from the advertised figure?
  • two-sample (independent) t-test. compares the means of two separate groups. example: do two different classes have different average exam scores? if the spread in the two groups looks quite different, use the version that does not assume equal variances (often called welch's test).
  • paired t-test. compares two measurements on the same subjects, such as before and after a program. it works on the differences within each pair, which is why it is a different test from the independent one. using the independent test on paired data is one of the most common mistakes.

a quick way to tell paired from independent: if you could line the data up in rows with each row being one person measured twice, it is paired. if the two groups are different people, it is independent.

three or more groups: anova

if you have three or more group means to compare, use analysis of variance, or anova. it asks one overall question: is at least one group mean different from the others? running many t-tests instead is tempting, but every extra test adds another chance of a false alarm, and anova avoids that. if the anova result is significant, you follow up with a post-hoc comparison (tukey's test is a common one) to find out which groups differ.

categorical data: the chi-square tests

when your data are counts in categories rather than measurements, the chi-square family is the usual choice.

  • chi-square test of independence. two categorical variables in a table of counts. example: is preferred study location (library, home, cafe) related to year in school? it compares the counts you observed to the counts you would expect if the variables were unrelated.
  • chi-square goodness-of-fit. one categorical variable compared to a set of expected proportions. example: do the colors in a bag match what the maker says?

two things to remember. first, the test uses the actual counts, not percentages. second, the expected counts in each cell should not be very small; a common rule of thumb is at least five. for comparing one or two proportions directly, such as the share of students who passed in two groups, a z-test for proportions is the other standard tool.

two numeric variables: correlation and regression

when both variables are numeric and you want to know how they move together, plot them first. a scatterplot shows you whether a straight-line pattern is even reasonable.

  • correlation measures the strength and direction of a linear relationship, on a scale from -1 to 1. it says nothing about cause. two things can move together because of a third factor.
  • simple linear regression fits a line so you can predict one variable from another and interpret the slope: how much the predicted outcome changes for a one-unit change in the predictor.

check the assumptions

every test comes with conditions, and instructors like to ask about them. the names change from test to test, but the ideas repeat.

  • independence. one observation should not influence another, apart from the pairing you built into a paired design. this depends on how the data were collected, so no test can fix it afterwards.
  • random sampling or random assignment. this decides what you are allowed to conclude about a wider population or about cause.
  • shape. t-tests and anova work best when the data, or the paired differences, are roughly bell-shaped, or when the sample is large enough for the averages to behave. with small, clearly skewed samples or strong outliers, look for an alternative.
  • equal spread. classic anova and the pooled two-sample t-test assume the groups have similar variability.
  • enough data per cell. chi-square needs reasonably large expected counts.

when the shape assumption fails, many courses introduce rank-based alternatives, such as the wilcoxon signed-rank test (instead of a paired t-test), the mann-whitney test (instead of a two-sample t-test) and the kruskal-wallis test (instead of anova). check which of these your course expects.

reading the result

  • a p-value is the probability of getting data at least as extreme as yours if the null hypothesis were true. it is not the probability that the null hypothesis is true.
  • choose your significance level before you look at the data, and state the conclusion in the context of the question, in plain words.
  • report the size of the effect too, ideally with a confidence interval. a result can be statistically significant and still too small to matter.

how to practise this

choosing a test is a skill you build by doing it, not by memorizing a chart. take a set of word problems and, for each one, answer only the four questions at the top without running any numbers. then check your choice against the solution. keep a list of the problems you got wrong and note which question you answered badly, such as paired versus independent. review it the way described in how to review a practice test, and do short sessions spread across the week instead of one long one. for writing up results from a real data set, the structure in how to write a lab report is a useful model.

getting real help instead

if you can pick a test but cannot explain why, or the assumptions keep tripping you up, a tutor can talk through your reasoning with you and point to the exact step where it goes wrong, while the work stays yours. for where that line usually sits, read is getting homework help cheating?. see the statistics page, and algebra if the underlying math is the sticking point. to see how iykno works, post the problem you are stuck on in the app and a verified tutor sends an offer and works it with you. how it works.

related

all guides · college help · statistics · psychology and psych stats · calculus study plan for a semester · the week before an exam

IYKNO

post it in the app

any subject, any level. a real tutor answers.

qr code that opens iykno.app/get/ to download the app

or scan to get it on your phone