STAT 385 Summer 2025 - Public-Facing Website

STAT 385 Statistics Programming Methods

3 Credit Hours - Major Elective

Section ONL

Summer 2025 - Public-Facing Website

Table of Contents


Week 1

This is the first week of class. It is of critical importance you read the syllabus, especially the Software section to download and install necessary technologies: R, RStudio Desktop, and Git. We begin with an introductory exploration of R, RStudio, and Git. There are various objects in R that are foundational to our ability to program. Each R object has associated properties and purposes. These objects may be of different types and modes. We use R via the integrated development environment, RStudio Desktop. It is a helpful, user-friendly layout space for programming and creating various files. RStudio works with .R script files and reproducible document files such as .Rmd and can knit a reproducible document to .html and other formats. Git and GitHub are critical to submitting assignments in this course. Each student has a repo in this course that they made via following the instructions of the syllabus Software section Step 2. Create a GitHub account if you don’t have one already and Sign into GitHub, Step 3. Click here to enroll in STAT 385 course organization and follow the steps to be setup properly in the learning management system. Each repo has a main branch, which serves as the landing page of the repo. We will place files into directories on the main branch of our repos. For example, when you complete homework01, you will submit it into the homework directory. Grades will be returned to students on a grades branch for the corresponding week. Because of the file organization on branches, it’s important to learn about Git commands and how to navigate the branches.

The following are readings which will be helpful in first learning the course material for this week.

  1. Bryan’s Why Git? Why GitHub?

  2. Sanchez’s First Contact with R via RStudio

  3. Sanchez’s First Contact with RStudio

  4. Bryan’s Git Commands

  5. Bryan’s Git Branches

  6. Gagolewski’s Preface

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, June 20, 2025.

  1. gdp01

  2. homework01

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 2

This week we acknowledge that we have an introductory understanding of R, RStudio, and Git. This week, we dive more into R. There are various objects in R and vectors are among the simplest of R’s objects. These vectors are atomic meaning they are of a single type - logical, numeric, character, complex, raw. Each object has associated properties, such as mode and length, which we may later call attributes. Vectors can be indexed or subset based on vectors of various types. Types can be changed implicitly (coercion) and explicitly (type casting) in R. Additional key R functions are discussed in the lecture videos.

The following are readings which will be helpful in first learning the course material for this week.

  1. Sanchez’s First Contact with Vectors

  2. Sanchez’s Properties of Vectors

  3. Sanchez’s Creating Vectors

  4. Sanchez’s More About Vectors

  5. Venables et al’s Simple manipulations; numbers and vectors

  6. Venables et al’s Objects, their modes and attributes

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, June 27, 2025.

  1. gdp02

  2. homework02

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 3

In this week, we introduce other objects - matrices, arrays, factors, lists, and data frames. These objects are critical for working with R and considering how data can be accessed. Some objects are atomic, e.g., matrix() and factor(), while others are recursive, e.g., list() and data.frame(). Some objects are basic, e.g., list(), while others are compound, e.g., matrix(), factor(), data.frame(). Matrices are a special type of array - a two-dimensional array. Arrays are of general dimension such that the user must specify the dimension and its attributes. Lists are generic vectors meaning that they are very flexible. Lists are recursive objects too in the sense that they can contain lists themselves. In R, data frames are always lists, but lists are not always data frames. Additional key R functions are discussed in the lecture videos.

The following are readings which will be helpful in first learning the course material for this week.

  1. Sanchez’s Matrices and Arrays

  2. Gagolewski’s Lists and attributes

  3. Sanchez’s More About Matrices

  4. Sanchez’s Factors

  5. Sanchez’s Lists

  6. Sanchez’s Data frames

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, July 4, 2025.

  1. gdp03

  2. homework03

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 4

We’ve covered several data objects or structures used in R. Now we move into certain flows of programming including conditionals (if and else) and loops (for and while). We also discover some potential problems with naively created loops and objects. Burn’s informs us that growing objects in R costs us memory and time, which can have devastating effects in programming efficiency. With these flows and well-understood objects, we can add specific efficient repetition to our programming. And there is power in repetition for us as statisticians. Additionally, we cover common regular expression syntax and R functions - some that employ regex and some that do not - to manipulate character vectors.

The following are readings which will be helpful in first learning the course material for this week.

  1. Sanchez’s Conditionals: If-Else

  2. Sanchez’s Iterations: For Loop

  3. Sanchez’s Iterations: While Loop

  4. Burns’s Growing Objects

  5. Gagolewski’s Data frames

  6. Gagolewski’s Character vectors

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, July 11, 2025.

  1. gdp04

  2. homework04

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 5

This week, the readings cover how to define custom functions and common pitfalls of the concept vectorization. There is also an in-the-weeds discussion of R’s environments and how to take advantage of that knowledge when creating objects and functions in R. User-defined functions are critical for building programs in R. Programs are essentially big functions that likely have considerate user-friendliness in their design. It is a good idea to practice making user-defined functions often during this chapter. Learners are encouraged to try all exercises in the readings for practice.

The following are readings which will be helpful in first learning the course material for this week.

  1. Burns’s Failing to Vectorize

  2. Burns’s Over-Vectorizing

  3. Sanchez’s Intro to Functions

  4. Sanchez’s Expressions

  5. Sanchez’s More About Functions

  6. Grolemund’s Environments

  7. Gagolewski’s Functions

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, July 18, 2025.

  1. gdp05

  2. homework05

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 6

By now, we go even deeper in the weeds to understand R’s S3 system and how to consider more than just coding results when it comes to programs. The reading materials are less coding heavy, except programs, but discuss important ideas about R’s internal workings that help us understand what’s underneath programs.

The following are readings which will be helpful in first learning the course material for this week.

  1. Grolemund’s Programs

  2. Grolemund’s S3

  3. Gagolewski’s S3 Classes

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, July 25, 2025.

  1. gdp06

  2. homework06

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 7

This is the penultimate week of the course. The readings are less coding intensive, but do challenge learners to think, be curious, and push the limits of their creativity. The human brain is capable of doing so many things. Have you considered how much your brain does even when you are asleep? Design, intentionm, and alignment are a part of what can be the difference between a good program and a great one. Learners are encouraged to ask questions, read and gather information, and make fun games for the final project.

The following are readings which will be helpful in first learning the course material for this week.

  1. Gagolewski’s Designing functions

  2. Kinson’s Slides on Weston’s Creativity for Critical Thinkers

  3. Kanna’s ‘How to Solve Coding Problems with a Simple Four-Step Method’

After completing the readings, we encourage students to begin watching the lecture videos below.

After watching the lecture videos, we encourage students to read the notes which serve as highlights of important concepts based on the readings and lecture videos. The notes are below.

After reading, watching, and digesting the course materials above, we encourage students to begin the assignments of the week. Below you will find the two assignments, which are due at 11:59 pm on Friday, August 1, 2025.

  1. gdp07

  2. homework07

Remember that the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.


Week 8

This is the last week of the course. There is no new material for this week. Learners are encouraged to spend ample time working and fine-tuning their final projects for this course. Review the final project guidelines and grading rubric.

We encourage students to watch the lecture videos below and review videos from all previous weeks.

After watching the lecture videos, we encourage students to re-read the notes and practice code therein as it may be helpful when creating the final project .R file.

Because the final project is the only assignment left and due at 11:59 pm on Friday, August 8, 2025, we encourage students to review the final project details.

Although this is the last week of the semester, the course staff, i.e. Professor Christopher Kinson and TA Lam Lam Hui, are still here to help and educate. The following are opportunities for learners to get help in their learning and skill building ordered by day of the week.