In: Statistics and Probability
Many boxed cake mixes include special high-altitude baking instructions. One would like to investigate that, on an average, cakes take longer to bake at high altitudes. A consumer group made several similar cakes in nine-inch rounded pans in Denver and Miami, and carefully recorded the time to bake (in minutes). The data is given as follows:
Baking Times at High Altitude 22.8 30.0 27.3 30.3 28.3 31.1 27.0 26.8 26.3 29.1 23.5 26.2 29.2 23.0
Baking Times at Low Altitude 25.1 25.6 24.9 23.7 25.5 22.4 24.7 24.2 25.6 24.8 23.9 24.4 24.7 24.4 26.4 24.7 24.7 26.8 24.9 24.3
(a)Draw side-by-side boxplots for low and high altitudes. Write a short description about what you observe from the boxplots by examining them individually and contrasting them with regard to measures of center, variability and shapes.
(b)Make a quantile-quantile plot of the data with a 45oline added to it. What does the plot tell you about the baking times at the low and high altitudes?
I cannot figure out the R-scripts to make the q-q plot. I need to know how to enter the data from excel into R for the plot. Thank you!!
Solution:
Rcode to get boxplots:
Baking_Times_High <- c(22.8, 30.0 ,27.3, 30.3, 28.3, 31.1,
27.0, 26.8, 26.3, 29.1, 23.5 ,26.2, 29.2, 23.0)
Baking_Times_Low <- c( 25.1, 25.6, 24.9, 23.7, 25.5, 22.4, 24.7,
24.2 ,25.6, 24.8, 23.9, 24.4 ,24.7 ,24.4, 26.4, 24.7 ,24.7, 26.8
,24.9, 24.3)
boxplot(Baking_Times_High,Baking_Times_Low,col=c("green","orange"),names=c("High","Low"),horizontal = TRUE)
fivenum(Baking_Times_High)
fivenum(Baking_Times_Low)
Fivenum summary for baking times high is
22.80 26.20 27.15 29.20 31.10
min=22.80
Q1=26.20
Q2=27.15
Q3=29.20
max=31.10
Fivenum summary for baking times high is
22.40 24.35 24.70 25.30 26.80
Min=22.40
Q1=24.35
Q2=24.70
Q3=25.30
max=26.80
Baking times High and Baking times low follow normal distribution
there are outliers for baking times low.
Solution-b:
use qqnorm and qqline to get the qqplot
Rcode
qqnorm(Baking_Times_High,main ="Normal QQ Plot
BtimesHigh",pch=8)
qqline(Baking_Times_High)
qqnorm(Baking_Times_Low,main ="Normal QQ Plot
Btimeslow",pch=8)
qqline(Baking_Times_Low)
Output:
From QQplot there are very little deviations from straigh tline
Baking times High and Baking times low follows normal distribution
ENTIRERCODE:
Baking_Times_High <- c(22.8, 30.0 ,27.3, 30.3, 28.3, 31.1,
27.0, 26.8, 26.3, 29.1, 23.5 ,26.2, 29.2, 23.0)
Baking_Times_Low <- c( 25.1, 25.6, 24.9, 23.7, 25.5, 22.4, 24.7,
24.2 ,25.6, 24.8, 23.9, 24.4 ,24.7 ,24.4, 26.4, 24.7 ,24.7, 26.8
,24.9, 24.3)
boxplot(Baking_Times_High,Baking_Times_Low,col=c("green","orange"),names=c("High","Low"),horizontal
= TRUE)
fivenum(Baking_Times_High)
fivenumBaking_Times_Low()
qqnorm(Baking_Times_High,main ="Normal QQ Plot
BtimesHigh",pch=8)
qqline(Baking_Times_High)
qqnorm(Baking_Times_Low,main ="Normal QQ Plot
Btimeslow",pch=8)
qqline(Baking_Times_Low)