1 Welcome to Lab 3

Intended Learning Outcomes:

  1. Perform hypothesis test for various scenarios manually.
  2. Conduct a hypothesis test for the population variance in R with a step-by-step guide.

1.1 A summary of the type of the hypothesis test and R commands used today

Test for population variance


The \(F\)-test can be implemented in R by using var.test:

var.test(x, y, ratio = 1,
         alternative = c("two.sided", "less", "greater"),
         conf.level = 0.95)
  • ratio: the hypothesised ratio of the population variances of \(X\) and \(Y\), i.e. \(\frac{\sigma_X^2}{\sigma_Y^2}\) under \(H_0\)
  • alternative: the type of alternative hypothesis, where two.sided corresponds to \(\sigma_X^2 \neq \sigma_Y^2\), greater corresponds to \(\sigma_X^2 > \sigma_Y^2\), and less corresponds to \(\sigma_X^2 < \sigma_Y^2\).
  • conf.level: confidence level, which equals to \(1-\alpha\) (significance level).