The Language of Models

Lecture 13

Dr. Elijah Meyer

Duke University
STA 199 - Summer 2023

2023-10-10

Checklist

– Clone ae-12

– Reminder: Turn in 1 lab-4 for your group

– hw-4 is now due on Friday at 11:59 pm

Goals

We can assess the relationship between variables using a variety of techniques. Today, we will go over:

– Correlation

– Intro to modeling

Warm Up: Correlation

– What is correlation?

– When is it appropriate to measure correlation? Hint: Think about variable type.

Warm Up: Correlation

Guess the Correlation

Correlation

Warm Up - Correlation vs Causation

What is a statistical model?

– Statistical modeling is the process of applying statistical analysis to a data set.

– A statistical model is a mathematical representation of observed data.

Vocab - Response variable

Vocab - Explanatory variable

What is linear regression?

– Model data using a straight line

– Quantitative response

– Quantitative (today) or categorical explanatory

In R

linear_reg() |>
  set_engine("lm") |>
  fit(y ~ x, data = data-set)

ae-12