Hypothesis testing in R

Open to
Government analysts
Training category
Type of training
Four to six hours
Analysis Function Capability Team
Analysis Function Capability Team


This is a short self-study course on hypothesis testing. It mainly covers the type of errors while conducting a hypothesis test, calculating the probability of those errors, conducting a power analysis to find the power and sample size of a test. Firstly, the theory will be shown, then an example of how to apply the corresponding theory in R will be shown, and lastly, there will be an exercise for learners to be completed.

The course is aimed at someone who is comfortable using tidyverse in R and knows statistical tests (such as t-test and chi-square test) and how to run those test in R, but is interested in learning about conducting power analysis in R, the type of errors in hypothesis testing and calculating their probabilities.

The prerequisite of this course is:Ā Introduction to R and Statistics in R (if you have not gone through Statistics in R course then look at theĀ ā€œStatistical_testsā€Ā file in theĀ ā€œpre_course_informationā€Ā folder).

Learning outcomes

By the end of the session, participants will:

  • understand what Type I and Type II errors are
  • know the relationship between alpha and Type I error and calculate the probability of Type I error
  • know why effect size is required and calculate the effect size
  • know the relationship between Beta and Type II error
  • calculate the power of the test and calculate the probability of Type II error
  • calculate the sample size given alpha, power and effect size

How to book

Please use your Learning Hub account to access the course on-line. Alternatively, please email gss.capability@statistics.gov.uk.