Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Deterministic Linear Relationships A deterministic linear relationship is one in

ID: 3046119 • Letter: D

Question

Deterministic Linear Relationships A deterministic linear relationship is one in which there is no uncertainty in the linear relationship between y and x (they are perfectly correlated). So plugging x into the relationship will yield the exact value of yi . we can describe such a relationship as is the y-intercept (the value of y when x = 0), is the slope coefficient (the amount y changes when x is one unit larger). Note that we do not need a residual term when the relationship is deterministic. Consider a data set of elementary school students surveyed at the end of 2017. The data set has the following variables. o namet - First name of studenti . birthyeart - The year individual i was born. · ageyears1-The age of individual i in years at the time of the survey. · agedecadesl-The age of individual i in decades at the time of the survey (fractions allowed) . yearsuntil21- Remaining birthdays until individual i is 21 years old (including 21st birthday). For example, if Leo is born in 2010 his data would look like this: name birthyear Lagevears agedecades yearsuntil21 Leo 2010 7 0.7 14 Specify the values of , , and the correlation coefficient (R) for the following linear relationships. Hint: f you're unsure where to start, try adding a few more students born in different years to create a hypothetical sample and plot out the relevant scatter plot for each linear equation. 2) agedecades, = + birthyearí 3) yearsunti 21,- + birthyear

Explanation / Answer

Data<-read.csv("D://school.csv",header=T)
Data
birthyear<-Data[,2]
birthyear
ageyears<-Data[,3]
ageyears
agedecades<-Data[,4]
agedecades
yearsuntil21<-Data[,5]
yearsuntil21

model1<-lm(ageyears~birthyear,data=Data)
model1
cor(ageyears,birthyear)
model2<-lm(agedecades~birthyear,data=Data)
model2
cor(agedecades,birthyear)
model3<-lm(yearsuntil21~birthyear,data=Data)
model3
cor(yearsuntil21,birthyear)

Output:

Call:
1) lm(formula = agedecades ~ birthyear, data = Data)

Coefficients:
(Intercept) birthyear  
201.7 -0.1

2)Call:

lm(formula = yearsuntil21 ~ birthyear, data = Data)

Coefficients:
(Intercept) birthyear  
-1996 1

3) Call:

lm(formula = ageyears ~ birthyear, data = Data)

Coefficients:
(Intercept) birthyear  
2017 -1  

Correlation for ageyears and birthyear is -1 negatively correlated

Correlation for agedecades and birthyear is -1 negatively correlated

Correlation for yearsuntil21 and birthyear is 1 perfect positively correlted

Dr Jack
Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote