Nick Seewald's Slide Repository

A catch-all repository for Nick's HTML slides

Slides for Nick’s STATS 250 Labs - Fall 2020

PDF versions of the slides are available on our Lab Resources page on Canvas.

All materials © 2020 Nicholas J. Seewald

Introduction Video

Welcome to STATS 250 Lab! Please watch this video for details on lab policy and logistics.

Jump to a specific lab by clicking the appropriate link:
[Lab 1: Getting Started with R] [Lab 2: Basics of Data with R] [Lab 4: Probability and Scatterplots] [Lab 5: Plotting and Linear Regression] [Lab 6: Simulation Basics] [Lab 7: Simulation-Based Hypothesis Testing] [Lab 8: Sampling Distributions of Proportions] [Lab 9: Normal Distribution] [Lab 10: Confidence Intervals and Hypothesis Tests for Proportions] [Lab 11: Confidence Intervals and Hypothesis Tests for One Mean] [Lab 12: Paired Data and Difference of Two Means] [Lab 13: Linear Regression Inference]

Lab videos are available on Youtube! [Video Playlist]


Lab 1: Getting Started with R

Lab materials for the week of August 31, 2020

Statistical Learning Goals

  1. Learn how to visualize categorical data in a bar chart
  2. Learn how to summarize quantitative and categorical data

R Learning Goals

  1. Learn the difference between R, RStudio, and R Markdown
  2. Become familiar with the RStudio interface
  3. Understand key components of an R Markdown document
  4. Become familiar with R functions and arguments

Slides


Lab 2: Basics of Data with R

Lab materials for the week running Friday 9/4 - Friday 9/11. All labs are asynchronous due to Labor Day.

Statistical Learning Objectives

  1. Understand the structure of data (observations and variables)
  2. Think about the scope of a data set: what questions can and cannot be answered with a particular data set?

R Learning Objectives

  1. Learn how to “assign” information to “objects” in R
  2. See how R “reads in” a data set from a file
  3. Be able to identify the names of variables contained in a data set
  4. Make a frequency table for one or two variables

Slides


Lab 3: See Canvas


Lab 4: Probability and Scatterplots

Lab materials for the week running Friday 9/18 - Friday 9/25.

Statistical Learning Objectives

  1. Sampling with replacement versus sampling without replacement
  2. The Law of Large Numbers and expected values
  3. Scatterplots with linear associations
  4. The correlation coefficient

R Learning Objectives

  1. Creating a sequence of integers between two values.
  2. Learning how to randomly sample from a set, with replacement or without replacement.
  3. Creating a plot of (x,y) quantitative values.
  4. Finding the correlation coefficient between two quantitative variables.

Slides


Lab 5: Plotting and Linear Regression

Lab materials for the week running Friday 9/25 - Friday 10/2.

Statistical Learning Objectives

  1. Interpret a correlation matrix
  2. Interpret a fitted linear regression model
  3. Check the fit of the linear regression model using \(R^2\)
  4. Explore the dangers of extrapolation

R Learning Objectives

  1. Dive deeper into R plotting
  2. Create a correlation matrix
  3. Use R to fit a linear regression model

Slides


Lab 6: Simulation Basics

Lab materials for the week running Friday 10/2 - Friday 10/9

Statistical Learning Objectives

  1. Explore sample-to-sample variation
  2. Investigate probability using long-run proportions

R Learning Objectives

  1. Learn about reproducible randomness by “setting seeds”
  2. Functions within functions: table(sample())
  3. Line graphs in R

Slides


Lab 7: Simulation-Based Hypothesis Testing

Lab materials for the week running Friday 10/9 - Friday 10/16

Statistical Learning Objectives

  1. Get experience with randomization under an independence model
  2. Explore hypothesis testing and p-values

R Learning Objectives

  1. Learn how to perform simulations under an independence model

Slides


Lab 8: Simulation-Based Hypothesis Testing

Lab materials for the week running Friday 10/16 - Friday 10/23

Statistical Learning Objectives

  1. Discover the central limit theorem for proportions

Slides


Lab 9: Normal Distribution

Lab materials for the week running Friday 10/23 - Friday 10/30

Statistical Learning Objectives

  1. Understand Z scores and percentiles
  2. Get experience with the normal distribution

R Learning Objectives

  1. Learn how to use R to work with the normal distribution

Slides


Lab 10: Confidence Intervals and Hypothesis Tests for Proportions

Lab materials for the week running Friday 10/30 - Friday 11/6.

All labs are asynchronous this week due to the election.

Statistical Learning Objectives

  1. Understand how confidence intervals are constructed
  2. Understand what a confidence level means
  3. Consider the relationship between confidence intervals and hypothesis testing

R Learning Objectives

  1. Interpret R output providing confidence intervals and hypothesis tests for inference on population proportions.
  2. Use R as a calculator to compute a confidence interval

Slides


Lab 11: Confidence Intervals and Hypothesis Tests for One Mean

Lab materials for the week running Friday 11/6 - Friday 11/13.

Statistical Learning Objectives

  1. Get experience making confidence intervals for population means
  2. Understand hypothesis tests for population means

R Learning Objectives

  1. Interpret R output providing confidence intervals and hypothesis tests for inference on population means.

Slides


Lab 12: Paired Data and Difference of Two Means

Lab materials for the week running Friday 11/16 - Friday 11/20.

Statistical Learning Objectives

  1. Continue discussing quantitative data, this week in regards to a paired mean and a difference in two means scenario.
  2. Understand whether data is considered paired or from two independent samples.

R Learning Objectives

  1. Create a “difference” variable in a data.frame
  2. Learn how to use R to perform paired t-tests and t-tests for two independent samples.

Slides


Lab 13: Linear Regression Inference

Lab materials for the week running Monday 11/30 - Friday 12/4.

Statistical Learning Objectives

  1. Learn about how to make inference for linear regression parameters
  2. Learn about conditions needed for valid inference in regression

R Learning Objectives

  1. Learn how to interpret output from lm() to make inference in regression
  2. Learn how to use R to check conditions for valid inference in regression

Slides