BYU-Idaho Math 221: Introduction to Statistics in R

An Interactive Textbook

This course is intended to familiarize students with foundational concepts and vocabulary in statistics and introduce basic data wrangling and visualization in R.

Those who diligently work through these materials will be well prepared for their next Statistics or Data Science course.

This book is designed to be a digital workbook. You can download the notes, practice problems and application activities which can be edited locally on your computer. Completed assignments will be submitted in Canvas as web-page reports.

Download Course Material

To download the folder containing all of the exercises, notes and application activities by following these steps:

  1. Create a class folder where you will save all your work throughout this semester. This can be on your computer locally or in cloud-based storage such as One-Drive or iCloud.
  2. Click on the link below to download the .zip file containing all contents of the course website:
Download Course Files
  1. Open the .zip file
  2. Save the Student_Work folder to your class folder created in step 1. This can typically be done by right clicking the folder then copying and pasting it into the new location.

These files will be the basis of your coursework.

How to Use This Book

Each unit contains:

  • Background readings
  • Class notes including example code
  • Practice problems
  • Application Activities

Unit 1 introduces R and summarizing data. It’s a gentle enough introduction to enable even those who have never coded before to start working with R and begin creating lovely web-based reports.

Unit 2 expands on the R basics of Unit 1 and introduces the Tidyverse. This is a powerful way to wrangle data and create even more beautiful data visualizations.

Unit 3 covers the fundamentals of statistics including elementary probability, the Normal Distribution, sampling distributions and the Central Limit Theorem.

Unit 4 introduces hypothesis testing, confidence intervals and statistical inference for means.

Unit 5 introduces hypothesis tests for regression and categorical data.

The Semester Project is an opportunity for students to demonstrate the skills acquired during the course. You will be able to find and import data into R, clean the data, create top notch visualizations, perform appropriate statistical analysis and create a beautiful report.

R Help provides additional resources for learning how to use R.

Course Objectives

By the end of this semester, students will confidently be able to:

  • Import data and apply basic data wrangling to moderately messy data
  • Describe data with numerical and graphical summaries
  • Make evidence-based decisions regarding situations with inherent randomness
  • Investigate questions through the application of probability distributions
  • Perform the appropriate statistical analysis based on specific data being analyzed including hypothesis tests and confidence intervals
  • Create web-based reports to communicate the results of statistical analyses to relevant audiences