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

References 1. Anscombe, F. J. (1973). \"Graphs in Statistical Analysis\". Americ

ID: 3071021 • Letter: R

Question

References 1. Anscombe, F. J. (1973). "Graphs in Statistical Analysis". American Stat stician 27 (1): 17-21 How do you evaluate and compare the developed linear regression mod els in the first question? Is there any way to improve your linear regression models for Data I, 11 and Il? Appendix The complete version of the solution scripts in R Calculate the mean, variance, correlation, and a linear regression for each data set. Using base R or geplot2, create a visual representation of this data. What does this visualization show?

Explanation / Answer

rm(list=ls())
#all data set from data1
x1=c(10,8,13,9,11,14,6,4,12,7,5)
y1=c(8.04,6.95,7.58,8.81,8.33,9.96,7.24,4.26,10.84,4.82,5.68)

#all data set from data2
x2=c(10,8,13,9,11,14,6,4,12,7,5)
y2=c(9.14,8.14,8.74,8.77,9.26,8.10,6.13,3.10,9.13,7.26,4.74)

#all data set from data3
x3=c(10,8,13,9,11,14,6,4,12,7,5)
y3=c(7.46,7.77,12.74,7.11,7.81,8.84,6.09,5.19,8.15,6.42,5.73)

#all data set from data4
x4=c(8,8,8,8,8,8,8,19,8,8,8)
y4=c(6.58,5.76,7.71,8.84,8.47,7.04,5.25,12.5,5.56,7.91,6.89)

#mean of data1
mean_x=mean(x1)
mean_y=mean(y1)

#variance of data1
var_x=var(x1)
var_y=var(y1)

#correlation b/w data1
cor_data1=cor(x1,y1)

#regression of data1
model_data1=lm(y1~x1)

#mean of data2
mean_x=mean(x2)
mean_y=mean(y2)

#variance of data2
var_x=var(x2)
var_y=var(y2)

#correlation b/w data2
cor_data1=cor(x2,y2)

#regression of data1
model_data1=lm(y2~x2)

#mean of data3
mean_x=mean(x3)
mean_y=mean(y3)

#variance of data3
var_x=var(x3)
var_y=var(y3)

#correlation b/w data3
cor_data1=cor(x3,y3)

#regression of data3
model_data1=lm(y3~x3)

#mean of data4
mean_x=mean(x4)
mean_y=mean(y4)

#variance of data4
var_x=var(x4)
var_y=var(y4)

#correlation b/w data4
cor_data1=cor(x4,y4)

#regression of data4
model_data1=lm(y4~x4)

#visual representation of all data set(1,2,3,4).
#data1
boxplot(x1)


boxplot(y1)
#In firts data set their is no outlier in that data set so this data1 is almost fine data set.

#data2
boxplot(x2)
boxplot(y2)
#In data2 their is one outlier in 'y2'variable.if we remove this outlier in that variable so our data set is correct.

#data3
boxplot(x3)
boxplot(y3)

#In that data3 their is one outlier in 'y3'.so we remove this outlier in that variable so it is fine data set.

#data4
boxplot(x4)
boxplot(y4)

#In that data set their is two outlier in both variable 'x4','y4'.all observation in variable 'x4'is lieing in minimum value.so we remove this outlier from data set.

The output of all data. we see the above code. I will give my all effort to understand question.

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote