STAT540

Fall 2026


Computing in Statistics

Instructor: Yen-Yi Ho

Office: LeConte 216A

Class Meetings:

Monday/Wednesday 2:20p - 3:35p 

Classroom: LeConte 103


Dr. Ho's office Hours: Thursday afternoon 16:30-17:30PM, Friday morning 11:00 AM-12:00 PM or by appointment (LeConte 216A)

Email: hoyen@stat.sc.edu

Teaching Assistant: Alex Goebel

TA email: ajgoebel@email.sc.edu

TA office hours: Tuesday at 12PM -1 PM, Thursday at 12PM - 1 PM (LeConte 219A) or Virtual


Textbook:

  1. Basics of R: A Primer by Don  Edwards (Required)

  2. The Little SAS book: A Primer, 6th edition, by Delwiche and Slaughter (Required)
 (earlier editions are probably OK too)

 3. Introduction to Data Science: Data Wrangling and Visualization with R by

Rafael A. Irizarry   (Required)

  Older Free PDF version available here

4. Python Data Science Handbook by Jake VanderPlas (Required)

available at https://jakevdp.github.io/PythonDataScienceHandbook/


5. Python for Data Analysis, 3rd Edition by Wes McKinney

6. Pandas Comparison with R

7. Think Python: How to Think Like a Computer Scientist by Allen B. Downey

8. John Verzani's SimpleR notes.

 9. 
Steve Schachterle's R Code

                                

Resources:

1. Instruction for downloading R and R Studio

2. SAS OnDemand Entry page

3. Enroll in SAS OnDemand: After going to the entry page, create a student account. You will receive an enrollment link in an email from the course instructor. Once your account is created, you can access SAS Studio by going to the Control Center:


4. SAS OnDemand Control Center

5. This is Statistics.org

6. Summer Internship (National Security Agency)
7. Mathematics Development Program at National Security Agency


SAS OnDemand Invitation

Annoucements:

Approximate course outline: (Lecture notes will be updated often)

Most of my SAS slides were shamelessly borrowed from Dr. David Hitchcock.

Date Weekly topic
Homework
R/SAS code
Reading
Week Aug 17
Syllabus

Calendar


Getting Started with R and R Studio


Quarto (Chapter 20.2 in Rafa)

Homework 1

R Homework Template

dataP1HW2.txt

Quarto
cheat sheet



Homework1 Solution








  Rafa Chap 1
  Don Chap 1
Week Aug 24




R Basics I

Chapter 2: Objects, Modes Assignments (Don)
Chapter 3: Getting Help
Chapter 4: Managing Objects
Chapter 9: NAs, Coercion, Subsetting, Sorting, and Indexing







Homework 1 Due
(8/26 before class)

Homework 2


Homework2 Solution




Rcode_Basics1.R


ALLcode.R


Rafa Chap 2

Don Chap 2, 3, 4, 9
Week Aug 31



R Basics II

Chapter 5: Getting Data Into R

Chapter 6: Getting Results Out of R



brainbod.txt

brainbod2.txt

brainbod1.txt

brainbod.csv

brainbod4.txt



Rcode_Basics2.R




 Rafa Chap 5, 6

  Don Chap 5, 6
Week Sep 07

 
Sep 07: Labor Day No Class

Programming Basics

Chapter 8: Logical Objects and Conditional Expression

Chapter 12: Defining Functions, Name Space






Homework 2 Due
(9/9 before class)

Homework 3


Homework3 Solution





programming-basics.R


programming-basics_9_09_2026.R


Homework3 Solution.R




 Rafa Chap 3

 Don Chap 8, 12
Week Sep 14





Chapter 10: For Loops, Vectorized Function 


The tidyverse (Chapter 4 in Rafa)


Data Visualization I


Permutation Test

Bootstrap Confidence Interval

Data Visualization Principles

FlowingData

Data Exploration Through Time










Homework 3 Due
(9/16 before class)

Homework4

baby.txt








tidyverse.R

tidyverse_exercise.R

tidyverse_exercise_solution.R


Tidyverse Quiz (Sep 14)

Summarize_vs_Reframe.R


permutation.R


Permutation Quiz (Sep 16)



Bootstrap.R


R + Permutation + Bootstrap Quiz (Sep 21)





Rafa Chap 4

Don Chap 10
Week Sep 21



Data Visualization II

ggplot2 (Chapter 8 in Rafa)


Data Visualization Case Studies (Chapter 10 in Rafa)





Homework 4 Due
(9/23 before class)


Homework 4 Solution

Homework 4 RCode


Homework 5








Visualization ggplot2



ggplot2 cheat sheet


ggplot2.R


Data Visualization Quiz (Sep 23)




 Rafa Chap 7-10

 
Week Sep 28


Confounding



Homework 5 Due
(9/30 before class)



Homework 5 Solution

Homework 5 RCode






Confounding Quiz

 Rafa Chap 11-15
Week Oct 05


 Midpoint in Semester
 


Getting Started with Jupyter Notebook and JupyterLab


Python Basic
 Data Types
   NumPy

 


Mid-term take-home exam (qmd)


Mid-term take-home exam (html)


nhanes_wellness.csv


Mid-term take-home
Exam Solution (qmd)


Mid-term take-home
Exam Solution (html)



Mid-term Exam grading rubric




Python Basic
Notebook




Python Basic HTML


Python Quiz 1

Python Quiz 2



Python Data Science Handbook Chap 1, 2

Week Oct 12


Python: Lecture 2

Plots in Python: Lecture 3

 Python Functions
 
 



Mid-term take-home exam due Oct 14 before class


Final Project Instruction


Final Project Proposal template


Final Project Proposal template
HTML




Final Project Presentation template (qmd)



Final Project Presentation template pdf


Python Lecture2
Notebook


Python Lecture2 HTML



Python Lecture 3
Notebook



Python Lecture 3 HTML





Python Data Science Handbook Chap 3
Week Oct 19


 If and Loops

 Modules and Packages


 

Data Manipulation with Pandas



Data Analysis Workflow:
Tip Analysis Example

 


 Python Homework template


Homework6

Homework6 HTML





Homework6 Due
Oct 21 before class

Homework 7

Homework7 HTML




PandasEssentials
Notebook



PandasEssentials
HTML





R_to_Pandas Notebook


R_to_Pandas HTML


TipAnalysis Notebook

TipAnalysis HTML


ktuples


ktuples HTML



Python Data Science Handbook Chap 4
Week Oct 26

 
  

SAS OnDemand Invitation
 





SAS codes in Chapter 1.txt

SAS codes in Chapter 2.txt

SAS codes in Chapter 3.txt


blackjack.R

SAS codes in Chapter 4.txt


SAS Chap 1, 2
Week Nov 02


SAS Chapter 1


 SAS Chapter 2

 

  

 
  Homework7 Due
  Oct 28 before class 

  Homework 8
 
tshirt.txt
districtdata.txt
champ36pres.txt


 

SAS codes in Chapter 6.txt


SAS Chap 3, 4
Week Nov 9


   SAS Chapter 3

   SAS Chapter 4




Final Project Proposal Due
Nov 28 before class
 




SAS codes in Chapter 5.txt


SAS Chap 6, 7
Week Nov 16
 

  Final Project Presentation


  Homework 8 Due
  Nov 04 before class
 


SAS codes in Chapter 7.txt


 
Week Nov 30

 
   Final Project Presentation







 

SAS codes in Chapter 8.txt



Final Project Due
December 11, Friday before 5PM.