Skip to main content
Module 6 · Lesson 2 of 312/18 in the course~22 min
Module lessons (2/3)

Hypothesis Test, Welch t-test and p-value

Lesson preview5 hands-on exercises readyCourse R · Module 6 — Distributions and Statistical Inference

Compare means with t.test() (one-sample, Welch two-sample and paired), read p-value and confidence intervals.

What you'll learn in this lesson

  • Set the null hypothesis (H0) and alternative hypothesis (H1) correctly before reading the result.
  • Run and distinguish the three main t-tests in Base R using t.test(): one sample, Welch two-sample (default in R), and paired samples (paired = TRUE).
  • Interpret without misunderstanding p-value, 95% confidence interval and difference between statistical significance and practical relevance.

Overview

Observing that Checkout Variant B is 3 seconds faster than Variant A on 20 users is not enough to immediately launch into production: those 3 seconds could depend on simple sample noise. The t test quantifies how unlikely it would be to observe a difference at least that large if no effect actually existed (H0).

Select Inferenza: Confronto A/B con Welch t.test() in the simulator below and try increasing the noise or adding an outlier - see how t, df and p-value react in real time!

Sections covered in this lesson

  1. 1How to choose the right t.test()
  2. 2Explore variance, outliers and p-values live
  3. 3Test yourself: guided exercises
  4. 4Concept check
Pro Lesson · Module 6 — Distributions and Statistical Inference

Unlock "Hypothesis Test, Welch t-test and p-value" and the full Course R curriculum

Compare means with t.test() (one-sample, Welch two-sample and paired), read p-value and confidence intervals.

Unlock all 5 hands-on exercises in this lesson plus every advanced WebAssembly module with automated checks.

  • Instant access to all advanced modules in Course R plus 17 more courses
  • Hands-on browser exercises with automated test suites and solutions
  • 14-day money-back guarantee processed via Paddle.com

14-day guarantee · Cancel anytimeModule 1, all 18 interactive games, and cheatsheets are always free.