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

The following bivariate data set contains an outlier. What is the correlation co

ID: 2907934 • Letter: T

Question

The following bivariate data set contains an outlier.



What is the correlation coefficient with the outlier?
rw =

What is the correlation coefficient without the outlier?
rwo =

Would inclusion of the outlier change the evidence for or against a significant linear correlation?

Yes. Including the outlier changes the evidence regarding a linear correlation.

No. Including the outlier does not change the evidence regarding a linear correlation.



Question for thought: Would you always draw the same conclusion with the addition of an outlier?

x y 41.1 -295.9 26.5 504.6 25.3 299.1 42.9 206 40.1 -94.9 34.3 -177.3 43 197.1 38.6 -149.2 42.6 400.9 28 531.4 30 -1044.4 24.3 -102.3 45 487.7 49.6 322.4 125.5 85

Explanation / Answer

The R code to remove outliers and to find the correlation with and without out liers.......

#define a function to remove the outliers from a vector

rm_outlr<- function(z, na.rm = TRUE, ...) {
qrtl <- quantile(x, probs=c(.25, .75), na.rm = na.rm, ...)
e <- 1.5 * IQR(z, na.rm = na.rm)
z1 <- z
z1[z < (qrtl[1] - e)] <- NA
z1[z > (qrtl[2] + e)] <- NA
z1
}
#given data

x<-c(41.1,26.5,25.3,42.9,40.1,34.3,43,38.6,42.6,28,30,24.3,45,49.6,125.5)
y<-c(-295.9,504.6,299.1,206,-94.9,-177.3,197.1,-149.2,400.9,531.4,-1044.4,-102.3,487.7,322.4,85)
x1<- rm_outlr(x) #data of x without outliers
y1<- rm_outlr(y) #data of y without outliers
x1 <- x1[!is.na(x1)] #remove NA values
y1 <- y1[!is.na(y1)] #remove NA values
cor(x,y)
cor(x1,y1)

.......................................................................................................................................

Answers..

> cor(x,y)
[1] 0.05350603
> cor(x1,y1)
[1] -0.3614671

here we can see that with outliers in the data , it seems there is almost zero correlation between x and y ,which is rw= 0.05350603. But without outliers we can see that there is a negative correlation between X and Y ,i.e rwo=-0.3614671 .So we can see that if we add the qutliers it has an impact on the data.and we can say that including the outlier, changes the evidence regarding a linear correlation.

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