Postgraduate tutorial

Hypothesis Testing: p-Values and the t-Test

Set up null and alternative hypotheses, read p-values correctly and work through a one-sample t-test.

  • Postgraduate
  • 2 min read
  • Free

Hypothesis testing helps you decide whether data gives enough evidence against a default assumption.

The steps

  1. State the null hypothesis (H₀), the “no effect” claim, and the alternative (H₁).
  2. Choose a significance level, usually α = 0.05.
  3. Calculate a test statistic from your sample.
  4. Find the p-value and compare it with α.
  5. Reject H₀ if p < α. Otherwise, fail to reject H₀.

Worked example: one-sample t-test

A supplier claims its bags weigh 50 g on average. You weigh 25 bags: the sample mean is 52 g and the sample standard deviation is 5 g. Is the true mean different from 50 g?

  • H₀: μ = 50 and H₁: μ ≠ 50 (two-tailed).
  • Standard error = s ÷ √n = 5 ÷ 5 = 1.
  • t = (52 − 50) ÷ 1 = 2.0, with 24 degrees of freedom.
  • The two-tailed p-value is about 0.057.

Because 0.057 is greater than 0.05, we fail to reject H₀ at the 5% level. The evidence is suggestive but not strong enough.

Reading p-values correctly

  • A p-value is the probability of seeing data at least this extreme if H₀ were true.
  • It is not the probability that H₀ is true.
  • “Fail to reject” isn’t the same as proving H₀. You may simply need more data.

Practice

With the same data but n = 100, what changes?

The standard error becomes 5 ÷ 10 = 0.5, so t = 4.0 and p is far below 0.05: you would reject H₀. Larger samples detect smaller differences.

Want a live class on this?

An advisor will call you within one business day to recommend a course and a batch that fits your schedule.

  1. An advisor calls you within one business day.
  2. You talk through your background and goals for about 20 minutes.
  3. You get a recommended program and batch, with no obligation to enroll.
info@stratedgeitconsulting.com +1 (302) 434-8889 ext. 101 Monday to Saturday, 9 AM to 7 PM ET

Tell us about you

Takes about a minute. Fields marked optional can be skipped.

Enter your full name.
Enter an email address like name@example.com.
Enter a phone number so an advisor can call you.
Choose what you’re interested in.
Preferred batch
Tick the box so an advisor can contact you.

We use these details as described in our Privacy Policy. By submitting, you agree to our Terms and Conditions.