In: Statistics and Probability
P286 8-38 (Modified) (28pt)
A particular brand of diet margarine was analyzed to determine the level of polyunsaturated fatty acid (in percentages). A sample of six packages resulted in the following data: 16.8, 17.2, 17.4, 16.9, 16.5, 17.1.
g. Calculate a 95% two-sided confidence interval for the standard deviation of the level of polyunsaturated fatty acid for this particular brand of diet margarine.
h.Is your method used in part (g) justified? Why or why not?
i.Repeat part (g) using R. Attached the R codes and output.
j.Provide a practical interpretation of your interval in part (g).
i.
> fatty_acid=c(16.8, 17.2, 17.4, 16.9, 16.5, 17.1) > shapiro.test(fatty_acid) # Normality Test Shapiro-Wilk normality test data: fatty_acid W = 0.98779, p-value = 0.9831 > df =length(fatty_acid) - 1 # degrees of freedom > df [1] 5 > var_fatty_acid=var(fatty_acid) # Variance > var_fatty_acid [1] 0.1016667 > lower_limit = var_fatty_acid * df / qchisq(0.05/2, df, lower.tail = FALSE) > lower_limit [1] 0.03961296 > upper_limit = var_fatty_acid * df / qchisq(1 - 0.05/2, df, lower.tail = FALSE) > upper_limit [1] 0.6115571 > cbind(lower_limit = lower_limit, variance = var_fatty_acid, upper_limit = upper_limit) lower_limit variance upper_limit [1,] 0.03961296 0.1016667 0.6115571 > CI=cbind(lower_limit = sqrt(lower_limit), std.dev = sqrt(var_fatty_acid), + upper_limit = sqrt(upper_limit)) # Confidence Interval for standard deviation > > round(CI,3) lower_limit std.dev upper_limit [1,] 0.199 0.319 0.782