A study was made on the amount of converted sugar in a certain process at variou
ID: 3355712 • Letter: A
Question
A study was made on the amount of converted sugar in a certain process at various temperatures. The data were coded and recorded as follows:
Temperature, x: 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0,
Explanation / Answer
we shall do the analysis in R ,
The complete R snippet to analyse this as follows
Temperature <- c( 1.0, 1.1, 1.2, 1.3, 1.4, 1.5, 1.6, 1.7, 1.8, 1.9, 2.0)
ConvertedSugar <- c(8.1, 7.8, 8.5, 9.8, 9.5, 8.9, 8.6, 10.2, 9.3, 9.2, 10.5)
## fit the model
fit <- lm(ConvertedSugar~Temperature)
summary(fit)
## confidence interval
confint(fit,Temperature=1.6,level = 0.95)
# prediction interval
predict(fit,newdata=data.frame(Temperature=1.6),interval = "predict")
## correlation
cor(Temperature,ConvertedSugar)
## correlation test
cor.test(Temperature,ConvertedSugar)
The result is
summary(fit)
Call:
lm(formula = ConvertedSugar ~ Temperature)
Residuals:
Min 1Q Median 3Q Max
-0.7082 -0.4868 -0.1227 0.5109 1.0346
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 6.4136 0.9246 6.936 6.79e-05 ***
Temperature 1.8091 0.6032 2.999 0.015 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.6326 on 9 degrees of freedom
Multiple R-squared: 0.4999, Adjusted R-squared: 0.4443
F-statistic: 8.996 on 1 and 9 DF, p-value: 0.01497
> confint(fit,Temperature=1.6,level = 0.95)
2.5 % 97.5 %
(Intercept) 4.3219598 8.505313
Temperature 0.4446316 3.173550
> # prediction interval
> predict(fit,newdata=data.frame(Temperature=1.6),interval = "predict")
fit lwr upr
1 9.308182 7.807277 10.80909
> cor(Temperature,ConvertedSugar)
[1] 0.7070264
> ## correlation test
> cor.test(Temperature,ConvertedSugar)
Pearson's product-moment correlation
data: Temperature and ConvertedSugar
t = 2.9993, df = 9, p-value = 0.01497 , as the p value is less than 0.05 , hence we reject the null hypothesis and conclude that the correlation is signficant
alternative hypothesis: true correlation is not equal to 0
95 percent confidence interval:
0.1860680 0.9176857
sample estimates:
cor
0.7070264
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.