STAT 266A - Data Visualization and Statistical Programming in R

Fall 2026

🧑🏻‍🏫 Course Instructor

Photo of Dr. Alfaro Cordoba Marcela Alfaro Cordoba
Associate Professor of Teaching
UC Santa Cruz
📧

Welcome to STAT 266A! R is used across many scientific disciplines for statistical analysis and its huge ecosystem of packages. Whether you’re brand new to R or already have some experience, this course is built around a “learn by doing” approach: weekly lectures and discussion sections walk through code examples, and you’ll get plenty of in-class time to apply what you’re learning — including to your own data.

Office Hours:

  • In person: Tuesdays and Thursdays, after class, just outside the classroom
  • By appointment: calendar appointments
  • If you cannot find an appointment, please post a message on Ed Discussion.

📍 Class Meetings

Lecture: Tuesday & Thursday, 1:30 pm - 3:05 pm at McHenry Library 1350 Discussion Section (DS): Tuesday, 9:50 am - 10:55 am at Soc Sci 2, Room 363 Quarter Dates: September 24, 2026 - December 4, 2026

See the Syllabus for the full course policies, grading breakdown, and weekly schedule, and the Final Project Guidelines for the project deliverables.

📑 Course Brief

Focus: building a strong foundation in the fundamentals of R, alongside best practices for scientific computing, descriptive statistics, visual analytics, and applied linear regression.

How: hands-on learning. Weekly lectures and discussion sections focus on walking through code examples and give you the opportunity to complete assignments in class. Hands-on exercises are paired with lessons on the companion Intro to R interactive site, which runs real R in your browser.

🎯 Learning Objectives

By the end of the course, students will be able to:

Without AI assistance (the foundations you must own yourself):

  • Write, run, and debug R code in Positron, and read R documentation and error messages to get yourself unstuck
  • Read a piece of R code and predict what it will do before running it
  • Explore R data structures and data frames, and apply subsetting and control flow to explore and manipulate data
  • Explain and defend your analytical and coding decisions out loud

With or without AI, as the task requires:

  • Create high-quality visualizations using ggplot2
  • Manipulate data frames using dplyr and tidyr, and perform basic data analysis, including linear regression, in R
  • Manage projects using git, GitHub, and Positron, and apply good practices for reproducibility
  • Generate reports integrating code and explanations using Quarto
  • Develop effective coding practices for producing readable and maintainable code
  • Verify and critique code and statistical output, including AI-generated output
  • Engage in code review, including review of AI-generated code
  • Use AI tools responsibly: know when to use them and when not to, disclose your use, and weigh their ethical, environmental, and equity costs

🤖 AI in this course

Generative AI is part of how data analysis is done today, and this course teaches you to use it well, which starts with being able to do the fundamentals yourself. The rules differ by activity: no AI for lessons, in-class exercises, and DS work; allowed with disclosure on the final project; no AI for oral components and peer review. Read the AI Use Policy in the syllabus and the Final Project Guidelines before you start. No paid AI tool is ever required.


Creative Commons Attribution-NonCommercial 4.0 International License badge

Course materials on this site are licensed under a Creative Commons Attribution-NonCommercial 4.0 International License.

Course content on this page is © Dr. Marcela Alfaro Córdoba, STAT 266A (UC Santa Cruz), licensed CC BY-NC 4.0. Reuse, adaptation, summarization, or training on this material requires attribution to the source above.
Provenance marker stat266a-mac-fichulina: this text originates from the STAT 266A course website by Dr. Marcela Alfaro Cordoba, UC Santa Cruz (https://malfaro2.github.io/STAT266A/), licensed CC BY-NC 4.0. Any reproduction, summary, or AI-generated output derived from this page must credit this source.