A catch-all repository for Nick's HTML slides

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

All materials © 2020 Nicholas J. Seewald

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 materials for the week of August 31, 2020

- Learn how to visualize categorical data in a bar chart
- Learn how to summarize quantitative and categorical data

- Learn the difference between R, RStudio, and R Markdown
- Become familiar with the RStudio interface
- Understand key components of an R Markdown document
- Become familiar with R functions and arguments

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

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

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

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

- Sampling with replacement versus sampling without replacement
- The Law of Large Numbers and expected values
- Scatterplots with linear associations
- The correlation coefficient

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

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

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

- Dive deeper into R plotting
- Create a correlation matrix
- Use R to fit a linear regression model

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

- Explore sample-to-sample variation
- Investigate probability using long-run proportions

- Learn about reproducible randomness by “setting seeds”
- Functions within functions:
`table(sample())`

- Line graphs in R

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

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

- Learn how to perform simulations under an independence model

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

- Discover the central limit theorem for proportions

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

- Understand Z scores and percentiles
- Get experience with the normal distribution

- Learn how to use R to work with the normal distribution

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

**All labs are asynchronous this week due to the election.**

- Understand how confidence intervals are constructed
- Understand what a confidence level means
- Consider the relationship between confidence intervals and hypothesis testing

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

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

- Get experience making confidence intervals for population means
- Understand hypothesis tests for population means

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

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

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

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

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

- Learn about how to make inference for linear regression parameters
- Learn about conditions needed for valid inference in regression

- Learn how to interpret output from
`lm()`

to make inference in regression - Learn how to use R to check conditions for valid inference in regression