Welcome to STA 101!
Lecture 0
Imagine this dialog
. . .
Campaign manager: What share of the popular vote do we think our candidate will receive?
. . .
(A flurry of analysis takes place.)
. . .
Data scientist: Our best guess is 54%.
. . .
Campaign manager: How reliable is that estimate? How confident are we in that? What’s the margin of error?
. . .
Parallel Universe 1
Data scientist: It’s 54% give or take 3%.
Parallel Universe 2
Data scientist: It’s 54% give or take 20%.
. . .
The manager is going to make wildly different decisions about campaign spending and strategy depending on how uncertain the environment is. Therefore, it pays to know what you’re dealing with. Statistics can help!
What are we studying?
. . .
- Transforming messy, incomplete, imperfect data into knowledge;
- Knowledge often takes the form of pictures and a concise set of numerical summaries.
. . .
Quantifying our uncertainty about that knowledge.
A brief history of intro stat
A Portrait of the Instructor as a Young Man
Back in Spring 2014…


The old way


- $272.00 textbook;
- Point-and-click spreadsheet software ($???.??).
The new way

- Flexible, simulation-based approach to inference ($0.00);
- Computer programming ($0.00).
This is much closer to what contemporary practitioners actually do.
“The ladder”
- This course has no prerequisites. If your body temperature is roughly in the nineties, you are welcome in STA 101;
- You will encounter many new technical ideas in this class, and we will introduce them in several styles:
- in words;
- in pictures;
- in code and data;
- in math and formulas;
- It’s not a one-way street, and these styles of understanding are mutually reninforcing;
- Sometimes you’ll go “all the way” with a topic, and sometimes you’ll stop short (“I can explain the idea, and the picture makes sense, but the math remains a mystery”).
. . .
That’s okay!
Do what you can do, at the pace you can do it

. . .
I can’t guarantee where exactly on this grid the actual letter grades fall, but wherever you land, there is no judgement.
Syllabus highlights
Bookmark the course page!
Grading
Your final course grade will be calculated as follows:
| Category | Percentage |
|---|---|
| Labs | 10% |
| Homeworks | 20% |
| Project | 20% |
| Midterm Exam | 25% |
| Final exam | 25% |
The final letter grade is based on the usual thresholds.
. . .
No curve, no rounding, no extra credit.
Wiggle room
- 10 labs in total, and we drop the lowest 2;
- 8 homeworks in total, and we drop the lowest 1;
- We replace your midterm score with your final score (if it’s better).
Lab (10%)
Hands-on practice with coding and data analysis;
Completed in-person, in lab, in randomly-assigned teams;
Developed collaboratively, but turned in individually by the end of the lab session;
10 throughout semester; 2 lowest scores dropped;
No late work accepted.
Homework (20%)
- Posted on Friday; due at 10 am the following Friday;
- 8 in total, and I’ll drop the lowest;
- No late work accepted unless you request an extension in advance by e-mailing me. All reasonable requests will be entertained, but extensions will not be long;
- Collaboration strongly encouraged, but you must cite your collaborators, and your write-up must be your own.
Project (20%)
- Randomly-assigned teams within your lab;
- Pick a dataset and a research question and write an original analysis;
- Kick-off: Friday October 16;
- Presentation: Friday December 4 (LDOC);
- Submit write-up: Monday December 7 @ 5pm;
- In-between: intermediate deadlines, peer evaluations of teammates, peer review of other groups;
- Regardless your enrollment status, you must complete this to pass.
Exam (50%)
Traditional, in-class, no-tech exams:
- Midterm: Thursday October 8 during lecture;
- Final: Thursday December 10 at 2pm in this room.
You are only allowed both sides of one 8.5” x 11” note sheet created by you.
. . .
Make sure I get an SDAO letter, and make your appointments in the Testing Center now.
Attendance
- Lecture: not required. Live your life. All materials posted;
- Lab: required for credit. You can’t leave your group hanging. I let our “drop 2” policy automatically handle most attendance hiccups.
Communication
If you wish to ask questions in writing…
Post on Ed: about general course policies and content;
Email JZ directly: personal matters.
You should not really be emailing the TAs directly for any reason.
Collaboration
You are enthusiastically encouraged to work together on labs and homeworks. You will learn a lot from each other! Two policies:
- ✅ Acknowledge your collaborators: “Aloysius, Cybill, and I worked together on this problem;”
- ❌ Do not outright share or copy solutions. All submitted work must be your own.
Violation of the second policy is plagiarism. Sharers and recipients alike are referred to the conduct office and receive zeros.
Use of outside resources, including AI
Check out the discussion in the syllabus.
tl; dr:
- Everything is pretty much fair game so long as you cite it;
- Uncited use of outside resources is treated as plagiarism;
- If you spend the entire semester outsourcing all of your thinking to a chatbot, you will probably humiliate yourself on both exams, which are worth 50% of your grade.
FAQ: 101 vs 198 vs 199?
They’re similar (101 and 199 use the same textbook), but:
- 101: much more stats, much less coding;
- 199: much less stats, much more coding;
- 198: part of Constellations, closer perhaps to 199, focuses on applications to the health sciences.
. . .
Also, 198/199 counts as an elective for the stats major. 101 does not. 101 can only count towards the minor.
A game
How old is this person?
Ethel Merman
Ethel Merman

| Born | January 16, 1908 |
| Died | February 15, 1984 |
| Age | 76 |
| Claim to fame | JZ’s favorite singer |
How old is this person?
Megan Pete
Megan Thee Stallion

| Born | February 15, 1995 |
| Age | 31 |
| Claim to fame | Rapper |
How old is this person?
봉준호
Bong Joon-ho

| Born | September 14, 1969 |
| Age | 56 |
| Claim to fame | Directed Parasite, Snowpiercer, etc |
Now do it with pictures…
When the picture was taken, how old was the person?
Let’s see how you did
Baby’s first spreadsheet
# A tibble: 82 × 6
celeb1 celeb2 celeb3 celeb4 celeb5 celeb6
<dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
1 36 63 78 79 42 58
2 18 25 72 34 26 64
3 31 35 61 83 58 68
4 26 32 64 50 40 65
5 34 56 67 52 41 71
6 40 40 84 64 42 80
7 34 45 80 40 40 70
8 35 62 64 71 53 82
9 20 35 77 45 37 45
10 45 64 86 65 48 67
# ℹ 72 more rows
Each row is a 101 student, and the columns record their guesses for each celeb.
Anyone know who this is?

Yuja Wang

| Born | 2/10/1987 |
| Age in pic | 36 |
| Claim to fame | Classical pianist |
Baby’s first dataviz
What dataset do we want to visualize?
ggplot(age_guesses)
Baby’s first dataviz
What part of it do we want to visualize?
Baby’s first dataviz
What kind of plot do we want?
ggplot(age_guesses, aes(x = celeb1)) +
geom_histogram()
Baby’s first dataviz
Change the horizontal axis range:
ggplot(age_guesses, aes(x = celeb1)) +
geom_histogram() +
xlim(0, 100)
Baby’s first dataviz
Add some human-readable labels:
ggplot(age_guesses, aes(x = celeb1)) +
geom_histogram() +
xlim(0, 100) +
labs(title = "sta101-f26 students guess Yuja Wang's age",
x = "Guess")
Baby’s first dataviz
Add a vertical line at the answer:
ggplot(age_guesses, aes(x = celeb1)) +
geom_histogram() +
xlim(0, 100) +
labs(title = "sta101-f26 students guess Yuja Wang's age",
x = "Guess") +
geom_vline(xintercept = 36, color = "red")
Concise numerical summaries
Where are your guesses concentrated? How spread out are they?
# A tibble: 1 × 2
average sdev
<dbl> <dbl>
1 31.2 6.34
Say hello to the mean and standard deviation.
We’ll see this stuff daily
- A data frame is R’s version of a spreadsheet. It has rows (observations) and columns (variables);
- A histogram is a way of visualizing the distribution of a numerical variable;
- Features of the distribution can be concisely summarized with numbers like the mean and the standard deviation;
- You will learn how to build up data visualizations by stacking layers, like a cake;
- You will learn how to transform and summarize data by building data pipelines using
|>.
Anyone know who this is?

María Rosario Pilar Martínez Molina Baeza
Better known as Charo.

| Born | 3/13/1941? 1/15/1951? Who knows. |
| Age in pic | 58 - 68 |
| Claim to fame | Renaissance woman |
Charo

Anyone know who this is?

Eubie Blake
His actual birthday was not known at the time:

| Born | 2/7/1887 |
| Died | 2/12/1983 |
| Age in pic | 82 |
| Claim to fame | Composer |
Eubie Blake

Watch out for data quality!


Raghuram Rajan

| Born | 2/3/1963 |
| Age in pic | 48 |
| Claim to fame | UChicago economist |
| RBI governor |
Raghuram Rajan

Anyone know who this is?

Vincent Price

| Born | 5/27/1911 |
| Died | 10/25/1993 |
| Age in pic | 38 - 39 |
| Claim to fame | Horror actor |
Vincent Price

Anyone know who this is?

Celia Cruz

| Born | 10/21/1925 |
| Died | 7/16/2003 |
| Age in pic | 76 |
| Claim to fame | Queen of Salsa |
Celia Cruz

Who guessed best?
| Your name | celeb1 | celeb2 | celeb3 | celeb4 | celeb5 | celeb6 | sqerror |
|---|---|---|---|---|---|---|---|
| (answers) | 36 | 63 | 82 | 48 | 38.5 | 76 | 0.00000 |
| NA | 42 | 65 | 75 | 45 | 37.0 | 63 | 44.87500 |
| NA | 35 | 56 | 78 | 39 | 47.0 | 67 | 50.04167 |
| NA | 34 | 56 | 67 | 52 | 41.0 | 71 | 54.20833 |
| NA | 41 | 62 | 85 | 44 | 52.0 | 66 | 55.54167 |
| NA | 30 | 50 | 75 | 45 | 45.0 | 70 | 56.87500 |
| NA | 27 | 68 | 75 | 59 | 48.0 | 72 | 63.70833 |
(no doxxing version)
Meet your new best friend


Silly exercise; serious themes
-
Domain knowledge and modeling assumptions: data do not speak for themselves. You need some subject-matter expertise about what you’re studying, as well as an interpretive lens;
- Not all models or assumptions are created equal!
Are you asking questions the data can actually answer?
Uncertainty has many sources, and in some cases, it may be simply irreducible, no matter how hard you try;
Data quality and data cleaning: Data are not gospel. There could be noise and mistakes. Then what?
Wisdom of crowds: aggregating many imperfect guesses can do better than any one individual guess.
Questions?
One last thing
Reserve your container

- Visit the Duke Container Manager (and log in with your NetID);
- Reserve the STA101 container on the right-hand-side;
- Click STA101 under “My reservations” on the left-hand side;
- Login, start, and give it a sec to launch in your browser.
Connect to the course files
- Click
in the upper right; - Click
in the drop-down menu; - Click
in the dialog box; - Click
in the dialog box; - Input these and Create Project:
- Repository URL: https://github.com/sta101-f26/sta101-f26-files.git
- Project directory name:
sta101-f26-files

