# Week 6 — Two Variables ({date}`wk6 range`)
:::{updated} F22
:::
:::{attention}
The first midterm exam is released on Wednesday.
:::
This week's learning outcomes are:
1. Display two potentially-related numeric variables for exploratory analysis.
2. Compute correlation coefficients between variables
3. Run a linear regression
Since we have the exam this week, the lecture load is significantly reduced.
## {{moverview}} Content Overview
:::{module} week6
:folder: 2265c95a-2338-4021-8276-adb801256fe9
:::
## {{mcal}} Deadlines
- Midterm A **Tuesday 9:00–10:15 AM** (in class)
(midterm-a)=
## {{mquiz}} Midterm A
The first midterm is released on Wednesday on Canvas, and is due **Saturday at midnight**. It is written to take about an
hour, and covers material up through and including Week 5. It does not include
Week 6. Once you begin the exam, you will have 4 hours to complete it; if you have a technical problem with that (e.g. losing internet connectivity), let me know to reset the clock.
### Format
The first part of the exam is a short programming exercise.
The second part is a conceptual exam. it will contain a variety of questions to
assess your ability to understand and apply concepts from the class. Question
formats include:
- Multiple-choice
- True/false
- Matching
- Fill-in-the-blank
- Short answer
I may ask you to do a range of things on the exam, including (but not limited to):
- Define a concept
- Compute a metric from a small quantity of data
- Interpret a chart
### Exam Rules
- Notes, books, class materials are allowed
- Asking other humans for help on the exam is not allowed
### Study Tips
- Review the previous quizzes and assignments.
- Review lecture slides to see where you are unclear on concepts and need to review.
- Skim assigned readings, particularly the section headings to remind yourself what was in them.
- Review the [course glossary](../glossary.md), keeping in mind that it does contain terms we haven't gotten to yet.
## {{mvideo}} Introduction
This video introduces the week's topic.
:::{video}
:name: 6-1 - Two Variables Intro
:length: 4m36s
:::
## {{mvideo}} Displaying Variables
This video discusses how to display related numeric variables.
:::{video}
:name: 6-2 - Displaying Variables
:length: 3m45s
:::
## {{mvideo}} Correlation
This video discusses how to compute the *correlation coefficient* between two variables.
:::{video} correlation
:name: 6-3 - Correlation
:length: 11m12s
:::
:::{warning}
In this video, I list the Pandas correlation function as `cor`. The correct name is `corr`.
:::
## {{mvideo}} Regression
This video discusses how to fit a line between two variables.
:::{video}
:name: 6-4 - Regression
:length: 6m3s
:::
## {{mnotebook}} Correlation Notebook
The [correlation notebook](../../resources/tutorials/Correlation.ipynb) shows how to compute the metrics in this week's videos, and has the code I used to produce the charts in the slides.
## {{mvideo}} Features
This video introduces the idea of feature engineering
:::{video}
:name: 6-5 - Features
:length: 4m20s
:::
## {{mquiz}} Week 6 Quiz
Due to the exam, there is **no quiz** this week. I will make sure this does not negatively impact anyone's grade.
## {{massignment}} Assignment 3
[Assignment 3](../../assignments/A3/index.md) is due **{date}`wk7 sun long`**.