In: Statistics and Probability
Please use R and R studio
The accompanying observations are precipitation values during March over a 30-year period in Minneapolis-St. Paul.
.77 1.20 3.00 1.62 2.81 2.48
1.74 .47 3.09 1.31 1.87 .96
.81 1.43 1.51 .32 1.18 1.89
1.20 3.37 2.10 .59 1.35 .90
1.95 2.20 .52 .81 4.75 2.05
a. Construct and interpret a normal probability plot for this data set.
b. Calculate the square root of each value and then construct a normal probability plot based on this transformed data. Does it seem plausible that the square root of precipitation is normally distributed?
c. Repeat part (b) after transforming by cube roots
Solutiona
a. Construct and interpret a normal probability plot for this data set.
Rcode:
precipitation <- c(.77, 1.20, 3.00, 1.62 ,2.81, 2.48,
1.74 ,.47, 3.09, 1.31 ,1.87 ,.96,
.81, 1.43, 1.51, .32, 1.18, 1.89,
1.20, 3.37, 2.10 ,.59, 1.35, .90,
1.95 ,2.20 ,.52, .81, 4.75, 2.05)
qqnorm(precipitation)
qqline(precipitation)
Output:
from normal probability plot
precipitaion datset values does not follow normal distribution as there is a deviation from straight line
SolutionB:
Rcode:
sqrt_prectpitation <- sqrt(precipitation)
print(sqrt_prectpitation)
qqnorm(sqrt_prectpitation)
qqline(sqrt_prectpitation)
output:
From plot we observe square root of precipitation is normally distributed s most of the observations after transformation fall on straight line.
Solutionc:
Rcode:
library(kader)
cuberoot_precipitation <- kader:::cuberoot(x =precipitation
)
qqnorm(cuberoot_precipitation,main="Normal Q-Q plot for cube root
of precipitation")
qqline(cuberoot_precipitation)
shapiro.test(cuberoot_precipitation)
From normal QQplot we observe that cube root of precipitation is normally distributed as most of the observations after transformation fall on straight line.