Skip to content
tezvyn:
Menu

T-test: Are Two Groups Actually Different?

Source: Wikipedia: Student's t-testMediumHow cards are made

A t-test asks whether the gap between two groups is a real signal or just sampling noise. UX researchers use it to compare task times or conversion rates between designs. The footgun is trusting results from tiny samples where the math gives false confidence.

Why it exists

When you compare two sets of numbers, the averages almost never match exactly even if the underlying groups are identical. The gap could be a real effect or merely random fluctuation from sampling. The t-test was invented to quantify that exact uncertainty so you do not launch a design change based on noise alone.

The mental model

Think of the t-test as a calibrated skeptic. You hand it two groups of measurements and it answers one question: how surprised should I be if these groups actually came from the same population? If the observed gap is large relative to the variation inside each group, the test returns a small probability that the gap is mere luck. That probability becomes your evidence that the difference is genuine.

How it works

The test computes a statistic that measures the distance between the two group means in units of standard error. Under the null hypothesis, which assumes both groups share the same true mean, this statistic follows a Student's t-distribution rather than a normal curve because the scaling term, the standard deviation, is estimated from the sample data instead of being known in advance. As sample sizes grow large, that t-distribution converges toward the normal distribution used in a Z-test, which is why the two methods often agree on big datasets but can diverge on small ones.

When to use it

Use a t-test when you need to decide whether the mean response of one group differs from another and you do not know the true population standard deviation. In UX research this appears when comparing average task completion times, error rates, or Likert-scale ratings between a control design and a variant.

When not to use it

Do not use it when the scaling term, the standard deviation, is already known from the population rather than estimated from your sample, because a Z-test is the exact tool for that situation. You should also avoid treating the result as reliable when the sample is so small or the data so ill-behaved that the test statistic no longer satisfies the conditions required to follow a t-distribution.

One canonical example

Imagine you measure task completion time for twenty users on your old checkout flow and twenty on a redesigned flow. The redesign averages twelve seconds faster. A t-test tells you whether a gap that large would be unlikely if both designs were actually equally fast. If the resulting p-value is very small, you have evidence that the speedup is not just sampling noise.

Interview question

When should you choose a t-test over a Z-test to compare two group means?

  • a.When the two groups have markedly different variances or non-normal shapes
  • b.When the population standard deviation is unknown and must be estimated from the sampleCorrect
  • c.When the total sample size across both groups is smaller than 30
  • d.When you want the exact probability that the null hypothesis is true
Why?

The t-test is designed for cases where the population standard deviation is unknown and estimated from the sample, while a Z-test requires it to be known beforehand. Option C is tempting but wrong because the choice depends on whether the standard deviation is known, not on an arbitrary sample-size cutoff.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

Put your scrolling time to good use

Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles