Comparing two means

Practicing Statistics Interview Questions in R

Zuzanna Chmielewska

Actuary

Comparing two means

a roadmap

Practicing Statistics Interview Questions in R

Hypotheses

Two-tailed test: $$ H_0:\text{ }\mu_1 = \mu_2$$ $$ H_1:\text{ }\mu_1 \neq \mu_2$$

where:

$\mu_{1}$ - the first population's mean

$\mu_{2}$ - the second population's mean

Practicing Statistics Interview Questions in R

Assumptions

The two-sample t-test's assumptions:

  • normally distributed underlying data
  • random samples
  • independent observations
  • homogeneity of variances
Practicing Statistics Interview Questions in R

Assumptions

The two-sample t-test's assumptions:

  • normally distributed underlying data
  • random sample
  • independent observations
  • homogeneity of variances - e.g. bartlett.test()
Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

Teaching methods

the graphical example of a two-sample t-test

Practicing Statistics Interview Questions in R

the comparison a two-sample unpaired t-test and a paired t-test

Practicing Statistics Interview Questions in R

Practicing Statistics Interview Questions in R

the comparison a two-sample unpaired t-test and a paired t-test

Practicing Statistics Interview Questions in R

the comparison a two-sample unpaired t-test and a paired t-test

Practicing Statistics Interview Questions in R

the comparison a two-sample unpaired t-test and a paired t-test

Practicing Statistics Interview Questions in R

t-test in R

Two-sample t-test

t.test(value ~ group, data = df, var.equal = TRUE)
Practicing Statistics Interview Questions in R

t-test in R

Two-sample t-test

t.test(value ~ group, data = df, var.equal = TRUE)

Paired t-test

t.test(value ~ group, data = df, paired = TRUE)
Practicing Statistics Interview Questions in R

Summary

  • two-sample t-test
    • hypotheses
    • assumptions
  • paired t-test
  • t.test() in R
Practicing Statistics Interview Questions in R

Let's practice!

Practicing Statistics Interview Questions in R

Preparing Video For Download...