View on GitHub


Introduction to Statistical Computing (using the R programming language)

Welcome to STATS 306 / DATA SCI 306

This is an introductory statistical computing course based on the R programming language. Topics covered include data wrangling, data visualization, basics of programming in R, and basics of statistical modeling.

Instructor Information

Name: Ambuj Tewari
Office Hours: Via Zoom, Mon thru Thu, 8:30 pm - 9:00 pm ET (see canvas for Zoom link). Will also be answering questions on slack at various times during the week.

GSI Information

Name: Ryan Duncan
Lab Webpage: (also has office hours info)

Name: Holly Palmer
Lab Webpage: (also has office hours info)

Name: Jing Ouyang
Lab Webpage: (also has office hours info)

Name: Ariel Polani
Lab Webpage: (also has office hours info)


The final grade in the course will be determined by your scores in homework, a midterm exam, and a final exam using the weights given below.

Late submissions will not be accepted unless there is a documented health or family emergency.

Final grade in this course grading will be awarded using the grading scheme below.

Academic Integrity

The University of Michigan community functions best when its members treat one another with honesty, fairness, respect, and trust. The college promotes the assumption of personal responsibility and integrity, and prohibits all forms of academic dishonesty and misconduct. All cases of academic misconduct will be referred to the LSA Office of the Assistant Dean for Undergraduate Education. Being found responsible for academic misconduct will usually result in a grade sanction, in addition to any sanction from the college. For more information, including examples of behaviors that are considered academic misconduct and potential sanctions, please see

Accommodation for Students with Disabilities

If you think you need accommodation for a disability, please let me know at your earliest convenience. Some aspects of this course, the assignments, the in-class activities, and the way the course is usually taught may be modified to facilitate your participation and progress. As soon as you make me aware of your needs, we can work with the Office of Services for Students with Disabilities (SSD) to help us determine appropriate academic accommodations. SSD (734-763-3000; typically recommends accommodations through a Verified Individualized Services and Accommodations (VISA) form. Any information you provide is private and confidential and will be treated as such.

Mental Health and Well-Being

Students may experience stressors that can impact both their academic experience and their personal well-being. These may include academic pressures and challenges associated with relationships, mental health, alcohol or other drugs, identities, finances, etc. If you are experiencing concerns, seeking help is a courageous thing to do for yourself and those who care about you. If the source of your stressors is academic, please contact me so that we can find solutions together. For personal concerns, U-M offers a variety of resources, many which are listed on the Resources for Student Well-being webpage. You can also search for additional well-being resources here.


Lecture No. Date Topic Reading Assignment
00 Jan 20 Introduction Chapter 1
01 Jan 25 Data Visualization (Aesthetic Mappings, Scatter Plots) Section 3.1-3.4
02 Jan 27 Data Visualization (Facets, Geometric Objects) Section 3.5-3.6
03 Feb 01 Data Visualization (Statistical Transformations, Position Adjustments, Coordinates) Section 3.7-3.10
04 Feb 03 Data Transformation (filter, arrange, select) Chapter 4, Section 5.1-5.4
05 Feb 08 Data Transformation (mutate) Section 5.5
06 Feb 10 Data Transformation (summarize, pipes) Section 5.6, Chapter 18
07 Feb 15 EDA (Visualizing Distributions) Section 7.1-7.2, Section 7.3.1
08 Feb 17 EDA (Typical and Unusual Values, Missing Values) Section 7.3.2-7.3.3, Section 7.4
Feb 22 Well-being break  
Feb 24 Well-being break  
09 Mar 01 EDA (Covariation) Section 7.5, Section 7.7
10 Mar 03 Tibbles and Data Import Section 10.1-10.4, Section 11.1-11.2, Section 11.5
Mar 08 Midterm Exam (due on Mar 11)  
12 Mar 10 Tidy Data, Pivoting Section 12.1-12.3
13 Mar 15 Separate and Unite, Missing Values Section 12.4-12.5
14 Mar 17 String Basics Section 14.1-14.2
15 Mar 22 Regular Expressions (Basics, Anchors, Character Classes, Alternatives) Section 14.3.1-14.3.3
16 Mar 24 Regular Expressions (Repetition, Grouping, Detecting, Extracting) Section 14.3.4-14.3.5, Section 14.4.1-14.4.2
17 Mar 29 More Regular Expression Tools, stringi package Section 14.4.3-14.4.6, Section 14.7
18 Mar 31 Functions Section 19.1-19.6
19 Apr 05 Vectors Section 20.1-20.5
20 Apr 07 Iteration Section 21.1-21.5
21 Apr 12 A Simple Model Section 23.1-23.2
Apr 14 Well-being break  
Apr 19 Well-being break  
Apr 21 Final Exam (due on Apr 28)