# Maths question

Your friend is taking an introductory statistics course and is now learning about linear regression. They are having a difficult time understanding how scatterplots, line-of-best-fit,…

Your friend is taking an introductory statistics course and is now learning about linear regression. They are having a difficult time understanding how scatterplots, line-of-best-fit, Pearson’s r, residuals, squared residuals, outliers and R-squared relate to each other. Your friend says they are a “visual learner” and gets confused by all the calculations and R code. They think if only they could understand the big picture, maybe they would understand what each calculation and R command does.

While thinking of how to help your friend, you stumble across this website:(link: https://phet.colorado.edu/sims/html/least-squares-regression/latest/least-squares-regression_en.html ). This URL leads to a web application that allows you to create and calculate a scatterplot, a line-of-best-fit, residuals, squared residuals and Pearson’s r. It also shows you the regression equation. Best of all, this application operates in real time and lets you create custom scatterplots.

Prompt

Design three to seven screenshots and supporting text that allow you to demonstrate the following to your friend:

How the line of best-fit changes as new observations are added or removed.How outliers can impact the strength and direction of Pearson’s r.How Pearson’s r changes as new observations are added or removed.How the residuals (AKA error terms or deviations) change as new observations are added or removed.How better fitting lines produce smaller squared residuals.How better fitting lines produce higher values of Pearson’s r.How Pearson’s r (and R-squared, a measure of goodness-of-fit) is independent of the slope of the line.

Sample Solution