STAT 540 Computing in Statistics (Fall 2025)

Dr. Karl Gregory

Class times: 1:15 - 2:30 pm Tuesdays and Thursdays in LeConte College 103

Office hours: 3:00 - 4:00 pm Tuesdays and Wednesdays in LeConte College 216C

TA office hour: Patrick Jin, 12:00 - 1:00 pm Mondays in LeConte College 111


syllabus


R notes Annotated Code Topics
R objects pdf Rscript Introduction, types of objects in R
R basic operations pdf Rscript Arithmetic operations, logical comparisons, statistics functions, missing values, applying functions to matrices and arrays, making plots
R defining functions pdf Rscript Defining functions, conditional programming
R for loops pdf Rscript For loop, nested for loops
R while loops pdf Rscript While loops
R statistics functions pdf Rscript Statistics functions
R Monte Carlo methods pdf Rscript Monte Carlo methods for integration and optimization
R Monte Carlo experiments pdf Rscript Monte Carlo experiments for investigating performance of statistical inference methods
R importing data pdf Rscript Importing and formatting data
R manipulating data pdf Rscript Merging, stacking, reshaping, and aggregating data


Python notes Annotated Code Topics
Python objects Notebook
Notebook 2
Introduction, types of objects, NumPy arrays
Python basic operations pdf Notebook Defining functions, plotting in Matplotlib, conditional programming
Python loops pdf Notebook For loops and while loops
Python import data Notebook Importing data with the Pandas library
Python manipulate data Notebook Merging, stacking, reshaping, and aggregating data


SQL notes Annotated Code Topics
SQL basics .qmd Connecting to a data base, submitting basic queries
SQL in R Storing SQL query results in R data frames


R homework template

Quarto cheat sheet

LaTex math symbols


Homework Due
R Homework 1 Th. Sep 18, 11:59 pm. Render to html, print to pdf, upload to Blackboard.
R Homework 2 Th. Oct 2, 11:59 pm. Render to html, print to pdf, upload to Blackboard.
Python Homework Tu. Nov 11, 11:59 pm. Render Jupyter notebook to html, print to pdf, upload to Blackboard.


Exams Solutions
Exam I Exam I sol
Exam II, Th. Nov 6
Final Exam, Th. Dec 11, 12:30 pm


scatterplot with the trajectory of a particle overlaid


Home