🗓️ Week 05 - Vectorization + Functions, Linear Regression in Practice
This week starts with vectorization (moved from Week 4 to make room for the proposals): operating on whole vectors at once instead of looping. Then we write our own functions, and on Tuesday apply both to fitting and interpreting linear regression models.
| Date | Time | Format | Topic |
|---|---|---|---|
| Thu, Oct 22 | 1:30-3:05 pm | Lecture | Vectorization + Functions |
| Tue, Oct 27 | 9:50-10:55 am | DS | Practice: Vectorization + Functions |
| Tue, Oct 27 | 1:30-3:05 pm | Lecture | Linear regression in practice + AI audit #1 |
Solve the Tuesday-morning DS on your own without generative AI and upload your PDFs to Canvas. Printing is now optional. This week the 1-point discussion check is on Tuesday afternoon: you swap laptops with a classmate and check each other’s DS, so bring your laptop, charged. Thursday starts with the DS 4 discussion check: bring your DS 4 PDF, printed or on your laptop.
🤖 AI & Learning This Week
AI status this week: No AI for the DS. AI audit #1 on Tuesday (AI output is provided, no account needed).
Why: A regression that runs is not a regression that is right. This week you first see AI output with plausible-looking mistakes.
This week:
- AI audit #1 (Tuesday lecture): you get a regression analysis “written by an AI” with planted problems (an unchecked assumption, a misread coefficient, an overreaching conclusion). In small groups, find and fix them, then discuss how you found them.
- Habit to build: check residual plots and the units of every coefficient before believing any interpretation.
See the AI Use Policy for the full rules.
👨🏫 Lecture Slides
- Thu, Oct 22 (Lecture): Vectorization + Functions
- Tue, Oct 27 (DS): DS 5: Vectorization + Functions
- Tue, Oct 27 (Lecture): DS 5 Check + Linear Regression in Practice + AI audit #1
💻 Hands-on: Intro to R
- Lesson 9: Vectorization
- Lesson 10: Functions Explained
- Lesson 11: Regression in Practice: practice for Tuesday’s lecture, with your own year of data.
Lessons 9 and 10 are the DS.
