Important/interesting external links

VSauce: What is random?

Veritasium: What is NOT random?

A good read

R (main website)

RStudio (main website)

Working directory in R

Open course statistics book


Class 1: August 21st
Orientation.

A role model

The first-day handout (unique: 55635; 11am-11:50am)

The first-day handout (unique: 55640; 1pm-1:50pm)

To-Do

Open course video: The definition of probability and first properties

Open course video: Conditional probability. Probability trees. Bayes theorem.

Homework Instructions – if in doubt, read and understand all of this before you work on your homework/project

Homework Template – this is an optional template you can use to complete your homework assignments and projects

Homework #1 – due on Friday, September 1st

Homework #1 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment


Class 2: August 23rd
Setting up R and RStudio. Basics of R. R-scripts.

The instructions slideshow

The basic R slideshow

Console printout

The R-script from class

The basic R “cheatsheet”


Class 3: August 25th
R-notebooks. Functions in R. If ... else in R.

Warm-up worksheet #1: Problems

Warm-up worksheet #1: Solutions

The R-notebook from class

A tutorial on functions in R

If … else

The R-script from class

Working directory in R

Project #1: Part #1 – due on Monday, September 11th

Project #1: Part #2 – due on Monday, September 11th

Project #1: Part #2 – the Rmd file for those who are interested


Class 4: August 28th
Review of discrete random variables.

Warm-up worksheet #2: Problems

Warm-up worksheet #2: Solutions

Bernoulli and binomial (Section 4.3).

Wikipedia: Bernoulli trials – if you are interested

Wikipedia: Jacob Bernoulli – if you are interested

Class notes


Class 5: August 30th
Bernoulli and binomial [cont’d] (Section 4.3).

Wikipedia: The Binomial Distribution – if you are interested

Mathematica demonstration: The Binomial Distribution

Open course video: A review of the binomial distribution

Class notes

Homework #2 – due on Friday, September 8th, 2023

Homework #2 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment

Simulations of random variables. Plots. Histograms. (Section 2.1.3)

Wikipedia: Random number generation

Wikipedia: Mersenne twister

An atmospheric RNG

Setting a seed in R

The R-script from class

Homework #3 – due on Friday, September 15th, 2023

Homework #3 - this is the Rmd file which you are more than welcome to use to neatly complete your homework

Project #2due on Monday, September 25h

Project #2 – this is the Rmd file which you are more than welcome to use to neatly complete your project


Class 6: September 1st
Warm-up.

Warm-up worksheet #3: Problems

Warm-up worksheet #3: Solutions

The R-script from class

What is statistics? (Sections 1.2.1, 1.2.2)

Class notes

Open course video: Data basics

Data presentation [graphical] (Sections 2.2.1, 2.2.5)

Open course video: Exploring categorical data


Class 7: September 6th
Fitting.

Class notes

Goodhart’s Law on YouTube

Data presentation [more on graphical; numerical] (Sections 2.1.2, 2.1.3, 2.1.4)

Data: Favorite pies

R notebook cat-data.Rmd

Data: Pre-existing conditions data - courtesy of the Open Course Statistics

Extra credit #1due on Wednesday, September 27th; you can use the points earned towards your homework scores

Extra credit #1 - this is the Rmd file which you are more than welcome to use to neatly complete your quiz; you will not be able to knit this file as is unless you comment out or delete the R-chunk which inserts the picture

Data: Simplified Titanic data - courtesy of the Journal of Statistics Education

R notebook titanic.Rmd

R notebook titanic-in-class.Rmd as amended in class

xkcd

Florence Nightingale

Wikipedia: Mean household income

Graph: US Household Income Distribution

Here is a list of fun sites which make charts: Infogram, FastCharts, Flourish, Datawrapper


Class 8: September 8th
Median. Quartiles. (Sections 2.1.5, 2.1.6, 2.1.1)

Slides - Courtesy of Open Course Statistics

R script invented-data.R from class

Return values from boxplot

ProPublica: New Climate Maps Show a Transformed United States

Data: Student-run cafe - courtesy of the Journal of Statistics Education

Homework #4 – due on Friday, September 22nd, 2023

Homework #4 - this is the Rmd file which you are more than welcome to use to neatly complete your homework; you will not be able to knit this file as is unless you comment out or delete the R-chunk which inserts the picture


Class 9: September 11th
Scatterplots (Section 1.2.3).

Data: Carats vs. dollars - courtesy of the Journal of Statistics Education

R-script diamond-scatterplot.R

On plotting scatterplots in R - this is a demo in R by yours truly on how to draw scatterplots; feel free to start at 2:35 and watch at twice the speed

Adding legends to your R plots

Duke gpa - courtesy of OpenCourse Statistics

The R-notebook for class

The R-notebook from class - I added a few features to our work in class, so check it out

Gapminder: How Does Income Relate to Life Expectancy?

Homework #5 – due on Friday, September 29th, 2023


Class 10: September 13th
Sampling principles and strategies (Section 1.3)

Slides - Courtesy of Open Course Statistics

Problem Set #1 - problems

Problem Set #1 - solutions

In-Term One Topics

Practice for In-Term One - Problems

Practice for In-Term One - Solutions


Class 11: September 15th
Randomized response.

James Grime on randomized response

Wikipedia: Randomized response

Problem Set #2 - problems

Problem Set #2 - solutions

Class notes


Class 12: September 18th
Experiments (Section 1.4)

Open Course Video

Slides - Courtesy of Open Course Statistics

Problem Set #3 - problems

Problem Set #3 - solutions

Class Notes

A historical example

Suggested textbook problems (for after you are done with all the homework): 1.19, 1.20, 1.23, 1.26, 1.27, 1.28, 2.11, 2.13, 3.9, 3.10, 3.13, 3.19

Project #3due on Monday, October 9th

Project #3 - this is the Rmd file which you are more than welcome to use to neatly complete your quiz

Follow up on the “Experiment experiment”

Andrew Gelman on the “replication crisis”


Class 13: September 20th
In-Term One

In-Term One - solutions


Class 14: September 22nd
Review of continuous distributions.

Class notes

Extra-Credit Quiz #3due on Wednesday, October 4th

Extra-Credit Quiz #3 - this is the Rmd file which you are more than welcome to use to neatly complete your quiz


Class 15: September 25th
Statistical inference. Statistics and the sampling distribution.

R notebook Odin.Rmd

Sample versus Theoretical Distribution from the Wolfram Demonstrations Project by Joe Bolte

Point estimates and sampling variability (Section 5.1)

Slides - Courtesy of Open Course Statistics

R notebook prop.Rmd

Problem Set #4 - problems

Problem Set #4 - solutions


Class 16: September 27th
The normal distribution [review] (Section 4.1, Appendix C.1)

Class notes

The R-script from class

Standard Normal Distribution Areas from the Wolfram Demonstrations Project by Ian McLeod

The Normal Distribution from the Wolfram Demonstrations Project by Ian McLeod

Area of a Normal Distribution from the Wolfram Demonstrations Project by Eric Schulz

Standard normal table

Slides - Courtesy of Open Course Statistics

Wikipedia: Six sigma

How to shade in R

Homework #6 – due on Friday, October 6th

Homework #6 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment

Mystery Data: this data set is necessary for Project #4

Bitcoin Data: this data set is necessary for Project #4

Project #4due on Monday, October 23rd

Project #4 - this is the Rmd file which you are more than welcome to use to neatly complete your project

%in% in R


Class 17: September 29th
More on the normal distribution.

Problem Set #5problems

Problem Set #5solutions

Class notes


Class 18: October 2nd
The normal approximation to the binomial [review] (Sections 4.3.2 and 4.3.3).

Problem Set #6problems

Class notes

The R-script from class

Problem Set #6solutions

Mathematica demonstration: The Normal Approximation to the Binomial Distribution

Open Course Video: Normal approximation to the binomial


Class 19: October 4th
The Central Limit Theorem [review] (Sections 5.1.3 and 7.1.1).

Problem Set #7problems

Class notes

Wikipedia: On the gamma distribution

The R-script from class

Problem Set #7solutions

Homework #7 – due on Friday, October 13th, 2023

Homework #7 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment


Class 20: October 6th
Sample mean (the normal case).

Lecture notes: The normal sample mean

Problem Set #8problems

Class notes

Problem Set #8solutions

Quiz #7due on Friday, October 8th

Quiz #7 - this is the Rmd file which you are more than welcome to use to neatly complete your quiz


Class 21: October 9th
Confidence intervals (the normal case).

Class notes

Class notes


Class 22: October 11th
More on confidence intervals (the normal case).

R notebook normal-conf-int.Rmd

Shiny: Confidence intervals

Problem Set #9problems

Problem Set #9solutions

Extra credit #4due on Wednesday, October 25th

Homework #8 – due on Friday, October 20th, 2023

Homework #8 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment

In-Term Two Topics

Practice for In-Term Two - Problems

Practice for In-Term Two - Solutions

Principles of hypothesis testing.

Class notes


Class 23: October 13th
The \(p−\)value. More on hypothesis testing in the normal case.

Class notes

Problem Set #10problems

Problem Set #10solutions

Extra-Credit Quiz #5due on Wednesday, November 1st, 2023

Extra-Credit Quiz #6due on Wednesday, November 8th, 2023


Class 24: October 16th
The reasoning of tests of significance. Inference as a decision.

Problem Set #11problems

Class notes

Problem Set #11solutions

\(p-\)hacking is bad


Class 25: October 18th
In-Term Two

In-Term Two - Solutions


Class 26: October 20th
Hypothesis-testing practice (the normal case).

Problem Set #12problems

Class notes

An article on p-hacking in biology

A blog post on p-hacking with an interactive component (pardon the expletives!)

Problem Set #12solutions


Class 27: October 23rd
Types of errors.

Errors

Class notes

Problem Set #13problems

Problem Set #13solutions

R-bloggers: QQ-plots in R

Data: this data set is necessary for Project #5

Project #5due on Monday, November 13th

Project #5 - this is the Rmd file which you are more than welcome to use to neatly complete your project


Class 28: October 25th
Power of test (the normal case).

Power of test

Problem Set #14problems

Class notes

Homework #9 – due on Friday, November 3rd

Homework #9 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment

Problem Set #14solutions


Class 29: October 27th
The sampling distribution for counts and proportions. Confidence intervals (Sections 6.1.1, 6.1.2, and 6.1.5)

Open course video: Statistical inference for proportions.

Class notes

Problem Set #15problems

Problem Set #15solutions

Quiz #11due on Friday, November 5th, 2021

Homework #10 – due on Friday, November 10th

Homework #10 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment


Class 30: October 30th
Hypothesis testing for a proportion (Section 6.1.3)

Class notes

Problem set #16problems

Problem set #16solutions


Class 31: November 1st
Comparing two proportions (Sections 6.2.1, 6.2.2, 6.2.3, 6.2.5)

Complete class notes

Problem set #17problems

Problem set #17solutions

Quiz #12due on Friday, November 12th, 2020

Homework #11 – due on Friday, November 17th

Homework #11 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment


Class 32: November 3rd
The \(\chi^2-\) distribution (Sections 6.3.3, C.3)

Zed Statistics video: The \(\chi^2-\) distribution.

Class notes

\(\chi^2-\)table

A better \(\chi^2-\)table

Mathematica demonstration: The Chi-Squared Distribution

Mathematica demonstration: Tail Areas under the Chi-Squared Distribution


Class 33: November 6th
Goodness of fit (Sections 6.3.1, 6.3.2, 6.3.4)

Open course video: Goodness of fit.

Class notes

Problem set #18problems

Problem set #18solutions


Class 34: November 8th
Analysis of two-way tables.

James Grime on the Simpson’s paradox

Chi-squared test of independence (Section 6.4)

Class notes

Slides - Courtesy of Open Course Statistics

R-code: On-line courses or not?: An example on how to do the \(\chi^2-\)test of independence in R

Quiz #13due on Friday, November 19th, 2021


Class 36: November 10th
\(\chi^2-\)connections to normal samples.

Statistics Associated with Normal Samples from the Wolfram Demonstrations Project by Pierre-Emmanuel Robert

Quiz #14due on Friday, December 3rd, 2021

The \(t-\)distribution (Sections 7.1.3 and C.2).

Wikipedia: William Sealy Gosset

Mathematica demonstration: The Student’s t-distribution

t-table

Class notes

Data: this data set is necessary for Project #6

Project #6due on Monday, December 4th

Project #6 - this is the Rmd file which you are more than welcome to use to neatly complete your project

Wikipedia: Fisher’s exact test


Class 36: November 13th
The confidence interval for the population mean (Section 7.1.1, 7.1.2, 7.1.4)

Class notes

R-code: Normality check for Dobson

R-code: Confidence intervals with t.test


Class 37: November 15th
The t-test (Section 7.1.5)

Class notes

Slides - Courtesy of Open Course Statistics

In-Term Three Topics

Practice for In-Term Three - problems

Practice for In-Term Three - solutions


Class 38: November 17th
t-procedures practice.

Problem set #19problems

Class notes

Problem set #19solutions

Robustness of t-procedures (optional).

Robustness of Student t in the One-Sample Problem from the Wolfram Demonstrations Project by Ian McLeod

The Royal Society of Chemistry on robustness

Paired data (Section 7.2)

Slides - Courtesy of Open Course Statistics

Homework #12 – due on Friday, December 1st

Homework #12 - this is the Rmd file which you are more than welcome to use to neatly complete your homework assignment

The Final Projectdue on the date of your final exam


Class 39: November 27th
Difference of two means (Section 7.3)

Class notes

Slides - Courtesy of Open Course Statistics

Quiz #15due on Monday, December 6th for extra credit

t-procedures [practice].

The R-script from class

Problem set #20problems

Problem set #20solutions

Class notes

Mock In-Term Three - Problems

Mock In-Term Three - Solutions


Class 40: November 29th
In-Term Three

In-Term Three - solutions


Class 41: December 1st
Correlation. Causation (Section 8.1.4)

xkcd: Correlation

Class notes

Visualizing Correlations from the Wolfram Demonstrations Project by Ian McLeod

Anscombe Quartet from the Wolfram Demonstrations Project by Ian McLeod

Datasaurus

Problem set #21problems

Problem set #21solutions

Data: Shoe size and height - courtesy of the Open Course Statistics: this data set is necessary for Quiz #16

Quiz #14solutions

Quiz #16due on Monday, December 6th for extra credit

Quiz #16 - this is the Rmd file which you are more than welcome to use to neatly complete your quiz


Class 42: December 4th
Fitting a line. Residuals (Sections 8.1.1, 8.1.2, 8.1.3)

Slides - Courtesy of Open Course Statistics

Class notes

Least-squares. Predictive statistical tools (Section 8.2)

Least squares with the mechanical analogue

Simple linear regression.

Least Squares Criteria for the Least Squares Regression Line from the Wolfram Demonstrations Project by Mariel Maughan

Mean, Fitted-Value, Error, and Residual in Simple Linear Regression from the Wolfram Demonstrations Project by Ian McLeod

R-code: Simple linear regression

Regression toward the Mean from the Wolfram Demonstrations Project by Ian McLeod

Quiz #17due on Monday, December 6th for extra credit

Simple linear regression [cont’d].

R-code: Confidence intervals


The Final Exam Topics

The Final Exam Practiceproblems

The Final Exam Practicesolutions


Three interesting special topics

Lady tasting tea.

Wikipedia: Lady tasting tea

R. Fisher: Mathematics of a Lady Tasting Tea

Lady Tasting Coffee: A case study in experimental design

The foster-twins study.

Wikipedia: Cyril Burt

The German tank problem.

Wikipedia: The German tank problem