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

Problem. The strength of the linear relationship between two statistical variabl

ID: 3056188 • Letter: P

Question

Problem. The strength of the linear relationship between two statistical variables X and Y can be defined in terms of the so-called Pearson correlation coefficient r defined as rt def Tl T2 The coefficient r belongs to [-1, 1] and measures how one variable varies as the other does. Values of r2 close to 1 indicate a strong linear relationship between the statistical variables, values close to 0 a weak one (there stll may be a relationship, just not a linear one). In the R-statistical software package, the correlation coefficient is found with the cor function. Assume that the observational data corresponding to the statistical variable X is given by the following numerical set X = {xi} with i = 1, 35; 72.4, 78.2, 86.7, 93.4. 106.1, 107.6, 98.2, 92.0, 81.4, 77.2, 87.9, 82.4, 91.6, 95.0, 92.1, 83.9, 76.4, 78.4, 73.2, 81.4, 86.2, 92.4, 93.6, 84.8, 107.5, 99.2, 94.7, 86.1, 81.0, 77.7, 73.5, 76.0, 80.2, 88.8, 91.3 Using the R-statistical package, find the Pearson correlation coefficient r-cor(X, Y) between X and Y, where Y is defined as follows: a) Y = 2X2 + 3X + 4, that is: {yi)-2H 3rit 4): b) Y-22X-1; that is: {Vi} = {22ai-1): c) Y = X + 1000: that is: {yi} = {xit 1000): Finally, verify in an analytical fashion that the Pearson correlation coefficient in Eq. (1) reduces to zero in the working hypothesis that, 1

Explanation / Answer

The R-code of the problem is,

x=c(72.4,78.2,86.7,93.4,106.1,107.6,98.2,92,81.4,77.2,87.9,82.4,91.6,
95,92.1,83.9,76.4,78.4,73.2,81.4,86.2,92.4,93.6,84.8,107.5,99.2,94.7,
86.1,81,77.7,73.5,76,80.2,88.8,91.3)

y=2*x*x+3*x+4
cor(x,y)
# correlaation=0.9982
mean(x*y)#1392763
mean(x)*mean(y)#1360340
##here mean(x*y) not same as mean(x)*mean(y)


#######part (B)################################
y=22*x-1
cor(x,y)
# correlaation=1
mean(x*y)#168794.1
mean(x)*mean(y)#166813.9
##here mean(x*y) not same as mean(x)*mean(y)


#######part (C)################################
y=x+1000
cor(x,y)
# correlaation=1
mean(x*y)#94776.42
mean(x)*mean(y)#94686.41
##here mean(x*y) not same as mean(x)*mean(y)

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