What is the relationship between the weight of a runner and their mile time?
The International School of Bangkok collected data from 30 male students across 3 schools. The data was recreated in excel and imported in R to replicate the study.
library(tidyverse)
setwd("/Users/robertvargas/Documents/Projects/R/WeightMile Project")
MileData<- read.csv(file = "IBMathStudies.csv")
Table 1 plots a runner’s weight as the predictor variable and runner’s mile time as the dependent variable. The data clearly shows that heavier students have a longer mile time compared to lighter students.
## [1] "The SD in weight: 11.26 kg"
## [1] "The SD in time: 71.71 seconds"
## [1] "Regression co-effecient(1) and constant(2): 45.9"
## [2] "Regression co-effecient(1) and constant(2): 5.48"
## [1] "R-squared is 0.74"
Table 2 plots our regression model against the study data. To further describe the relationship between the two variables I calculated the correlation at 86%. This indicates a strong correlation since it is close to 100%.
## [1] "Correlation = 86.08 %"
The graph indicates that there is clear positive correlation. The R-squared (74%) calculated from the linear model describes the degree of variation in a runner’s mile time is explained by the runner’s weight. Though the correlation is relatively strong (86%), it does not take into account other potential variables such as height, age, and gender.