Activity 38
MATH 216: Statistical Thinking
Activity 2: Quiz
Given \(r = 0.8\), what is the value of \(r^2\)?
If \(r^2 = 0.64\), what percentage of the variability in \(y\) is explained by \(x\)?
Activity 3: Data Exploration
Use the
cor()
function to calculate \(r\) between two variables (e.g.,mpg
andhp
).Create a scatterplot using
ggplot2
to visualize the relationship.Derive \(r^2\) manually and interpret its meaning.
Activity 4: Real Data
Given a dataset
iris
answer the following questions:- Calculate \(r\) and \(r^2\) for
Sepal.Length
andPetal.Length
. - Interpret the strength and direction of the relationship.
- Calculate \(r\) and \(r^2\) for