# 4/17/2023

## Summarizing Bivariate Data

- Scatterplots - Return to ClassDataS23.R

## Common Types of Relationships

- No Association
- Positive Association
- Negative Association

## Scatterplot Smoothing

## Measuring the strength of assocation

- Pearson’s correlation coefficient

## Properties of r

- r > 0 indicates positive association.
- r < 0 indicates negative association.
- Extreme values r = 1 and r = -1 indicate perfect linear association.
- The value of r remains unchanged if the unit of measurement of X, Y, or both changes.
- r measures only the strength of
**linear association** between two variables.

## Class Activity

## Fitting a line to data

- In general, no straight line will pass through all of the points. We need a method for selecting the line with best fit.

## Method of Least Squares

- Look at the deviations of the plotted points from the line in the vertical direction. (Residual = observed - predicted)
- Compute the sum of the squares of the deviations. (sum of squared residuals)
- Choose the line that minimizes the sum of squared residuals. This line is called the least squares regression line

## Computing the least squares regression line

- Body measurements (see neckwaist.csv and neckwaist.R in our Google Drive folder)

## Please read Sections 8.1-8.3 for class on Wednesday.