67.1k views
2 votes
4. The data set DDT (MASS) contains independent measurements of the pesticide DDT on kale. Make a histogram and a boxplot of the data. From these, estimate the mean and standard deviation. Check your answers with the appropriate functions.

User Moystard
by
2.5k points

1 Answer

5 votes

Answer:

Explanation:

Rcode:

library(MASS)

data(DDT,package="MASS")

head(DDT)

colnames(DDT)

print(DDT)

boxplot(DDT)

hist(DDT,main="Histogram for DDT")

fivenum(DDT)

dim(DDT)

outlier_values <- boxplot.stats(DDT)$out # outlier values.

boxplot(DDT, main="DDT", boxwex=0.1)

mtext(paste("Outliers: ", paste(outlier_values, collapse=", ")), cex=0.6)

mean(DDT)

sd(DDT)

Output: * see attachment below*

From Histogram the mean is at the peak

it lies in between 3and 3.5

Form Boxplot we found one outlier and it is 4.64

Fivenum summary is

2.790 3.075 3.220 3.360 4.640

min=2.790

Q1=3.075

Q2=3.220

Q3=3.360

max=4.640

From boxplot the center line is median which cuts the box into 2 equal halves

Distribution is symmetrical

Follows normal distribution.

Mean=3.328

Standard deviation=0.4371531

4. The data set DDT (MASS) contains independent measurements of the pesticide DDT-example-1
4. The data set DDT (MASS) contains independent measurements of the pesticide DDT-example-2
User Sadek
by
3.7k points