Week 3

Bayes’ Rule & EDA
Published

October 13, 2025

Modified

October 20, 2025

Overview of Week 3

Day 4

Day 5

  • (Fall 2023: Day 3)
  • Data visualization, exploratory data analysis (EDA), and summarizing categorical data
    • Sections 1.5-1.7 & supplementary material
    • Bonus:
      • Examples on dealing with overlapping labels in figures (Slides 65, 66, & 68 from BERD R intro workshop)
      • Check out Ted Laderas’s Better Plots presentation
  • Day 5 Practice Problems
    • Textbook:
      • 1.28 Mix-and-match
      • 1.36 Associations
Note

As I mentioned in the recording, the various options in more complex figures I usually look up how to implement when I need them. I show them so that you are aware of some of the functionality and options one has in creating figures using the ggplot2 package. At the end of the slides, we cover how to create tables summarizing data, especially categorical data. This part has some very useful code and data wrangling in it.

Slides & Recordings

Day Topic Slides (F23): html Slides: pdf Slides: web-page Slides with notes Recording Link (F23) Duration Code: qmd Code: html
4 Bayes’ Rule (Book section 2.2.5) Day 5: slides 1-2 Day 5 Part 1 22 min
Bayes’ Rule (Book section 2.2.5) Day 5: slides 3-6 same same Day 5 Part 2 22 min
R packages Day 2: slides 47-54 same Day 2 Part 4 30 min
5 Exploratory Data Analysis Day 3: slides 1-59 Day 3 1 hr 18 min
Extra EDA slides Day 3 Part 2 slides
*Extra data wrangling code

* These are slides with extra data wrangling code, and I refer to some of the slides in the homework assignment. You are welcome to go through all of the slides to learn some data wrangling techniques, but are not required to do so. We will be covering topics from these slides as needed throughout the quarter.

Class discussion

During class you will be working in groups discussing the following:

Day 04

  • Practice Problems
    • Textbook: 2.18 Predisposition for thrombosis
      • Solution typed up using LaTeX: qmd, html
  • R Packages (Fall 2023: Day 2)
    • R packages: Please let me know if you had any difficulty installing packages.
  • Bayes’ Rule (Fall 2023: Day 5)
  • From HW 2
    • Non-book exercise (this is an old exam question)
    • Book exercises
      • 2.24

Day 05

  • Practice Problems
    • Textbook:
      • 1.28 Mix-and-match
      • 1.36 Associations
  • Slide 30: Can distribution shape and sample size be determined from a boxplot?
  • Slide 58: Is there evidence of ethnicity (Hispanic vs. White non-Hispanic) discrimination in DDS expenditures? Why or why not?
  • From HW 2
    • R1 & R2: NHANES - parts 1 & 2

Homework

Exam 1 information

  • Exam 1 will be on Wed, Oct. 22nd
  • Samples of past exam questions and answers (on Sakai)
  • Material will cover Days 1-5,
    • which is approximately Chapters 1 & 2 from the textbook.
  • The exam will be in-class and handwritten. Bring a calculator.
  • You may bring one page of notes on an 8.5” x 11” sheet of paper.
    • You may use both sides.
    • You may type your notes.
    • You may not use screenshots of the notes or textbook
    • You will be turning in the page of notes with the exam, so please add your name to the sheet.

International Day of Women in Statistics and Data Science