t-test
A t-test checks whether the difference between two averages, like the average basket before and after a change, is likely real or could be chance.
Select any words here to ask your Maestro about them.
Two stores test a new layout with 30 shoppers per group. In both, the average basket rises from $50 to $54. In test B, baskets vary far more. Which result is more convincing?
What it's for: finding out whether the gap between two averages is real or could be luck: before and after a change, version A against B, one store against another. It gives you a p-value.
What it needs: two groups of numbers, their averages, their standard deviations and how many data points each has. With more data, it can detect smaller differences.
Where it breaks: when the groups don't come from a random sample, or when the same customer shows up in both and you skip the paired version. For three groups or more, you need a different test (ANOVA).
How it's used
One in Excel
A t-test in Excel
- Old baskets in A2:A31, new ones in B2:B31
- marked: =T.TEST(A2:A31, B2:B31, 2, 3)2: two-tailed, because the change could go up or down. 3: Welch's test, which doesn't assume both groups vary the same.
- If the same shoppers are in both columns, in the same row order, use 1 instead of 3That's the paired test: it compares each shopper with themselves.
When to look closer
Same shoppers, measured twice
30 shoppers, before and after
- marked: =T.TEST(A2:A31, B2:B31, 2, 3), as if they were different people: p = 0.30
You measure the same 30 shoppers before and after the new layout. Does it matter if you use the paired test (type 1) or the two-group one (type 3)?
Ask your Maestro about t-test
It answers from the free course page closest to this word, the way it answers while you study.
You: What does "t-test" mean, in plain words?
Your Maestro: I'll explain it with a case of yours: it sticks better than a definition. Which change at work would you like to test with two groups?
Asking about: Answers from the page "Why does pandas count "CDMX" and "cdmx " as different cities?"
Only this browser keeps what you ask here. How it works
Learn more
Related terms
- P-value
A p-value is the probability of seeing a result at least as extreme as yours if there were truly no effect. The smaller it is, the more surprising your result would be without one.
- Mean (average)
To find the mean (the average), add up all the values and divide by how many there are: 15, 7, 8, 13 and 7 add up to 50, and 50 ÷ 5 = 10.
- Standard deviation
Standard deviation measures how far data lands from the average: with an average of 30 and an SD of 2, most values fall from 28 to 32. In Excel: =STDEV.S.
- Confidence interval
A confidence interval is the range where the whole population's number probably falls, worked out from a sample: 52% ± 5 runs from 47% to 57%.