Solve Using R studio please. contamination 383 395 380 390 386 380 409 382 389 3
ID: 3068419 • Letter: S
Question
Solve Using R studio please.
contamination 383 395 380 390 386 380 409 382 389 396 409 384 373 410 393 387 396 379 380 405 387 388 395 386 397 397 396 380 398 1488 377 393 387 409 402 379 386 387 387 394 410 386 392 398 387 408 390 397 403 390 6. Question Details I Previous Answers My Notes The data below indicate the contamination in parts per million in each of 50 samples of drinking water at a specific location. hw1_q6.csv a) What is the first quartile of the data? 386 b)What is the third quartile of the data? 398 c)What is the median of the data? 390 d)What is the mean of the data? Give your answer to three decimal places 418.268 e)Values that are greater than Q3 1.5 IQR or less than Q1 1.5 IQR are typically considered outliers. What value is an outlier in this data? 416 f)Delete the outlier by clicking inside its cell and hitting the Delete key. What is the median after the outlier is deleted? 390 g)What is the mean after the outlier is deleted? Give your answer to three decimal places. 391.463Explanation / Answer
Sol:
import the dataset as conrt in R
It has 50 rows and one cloumn
ANSWERS:
SolutionA:
Q1=386
SolutionB:
Q3=397
Solutionc:
median=390
Solutiond:
mean=413.6
Solutione:
outlier is1488
Solutionf:
median=390
Solutiong:
mean= 391.674
ENTIRE R CODE IS
quantile(cont$contamination,probs=c(0.25,0.75))
median(cont$contamination)
mean(cont$contamination)
IQR <- 397-386
IQR
Q1 <- 386
Q3 <- 397
Q3+1.5*IQR
Q1-1.5*IQR
boxplot(cont$contamination)
cont1 <- cont[-c(1488)]
dim(cont1)
outlier <- cont[which(cont$contamination > 413.5 | cont$contamination < 369.5), ]
print(outlier)
newdata <- cont$contamination[which(cont$contamination!=1488)]
print(newdata)
dim(newdata)
mean(newdata)
median(newdata)
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.