Thirty samples of cheddar cheese were analyzed for their content of acetic acid,
ID: 3207503 • Letter: T
Question
Thirty samples of cheddar cheese were analyzed for their content of acetic acid, hydro- gen sulfide and lactic acid. Each sample was tasted and scored by a panel of judges and the average tast score produced. Use the cheddar data in package faraway to answer the following. (Try help(cheddar) for information about the variables, and use cheddar to list the data.) You need the R software
Install faraway data package in R., or download data at: https://cran.r-project.org/web/packages/faraway/index.html )
(a) Fit a regression model with taste as the response and the three chemical contents as predictors. Report the values of the regression coefficients.
(b) If H2S is increased 0.01 for the fitted model, what change in the taste would be expected?
(c) Calculate R2 and adjusted R2 for this model.
(d) Construct the analysis-of-variance table and test for significance of regression.
(e) Calculate t statistics for testing the hypotheses H0 : 1 = 0 and H0 : 2 = 0, respectively. What conclusions can you draw about the role the variables Acetic, H2S play in the model?
(f) Using the partial F test, determine the contribution of H2S to the model. How is this partial F statistic related to the t-test for 2 calculated in part (e)?
Explanation / Answer
solution:
a
che_fit <- lm(taste ~., data=che)
> summary(che_fit)
Call:
lm(formula = taste ~ ., data = che)
Residuals:
Min 1Q Median 3Q Max
-17.390 -6.612 -1.009 4.908 25.449
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -28.8768 19.7354 -1.463 0.15540
Acetic 0.3277 4.4598 0.073 0.94198
H2S 3.9118 1.2484 3.133 0.00425 **
Lactic 19.6705 8.6291 2.280 0.03108 *
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 10.13 on 26 degrees of freedom
Multiple R-squared: 0.6518, Adjusted R-squared: 0.6116
F-statistic: 16.22 on 3 and 26 DF, p-value: 3.81e-06
b.if H2S is increased by 0.01 then from equation we have 3.9118 * 0.01 = 0.039, this will decrease in the taste statistics.
c.R square = 0.65 or 65% and adjusted R square = 0.611 or 61%
d.
Analysis of Variance Table
Response: taste
Df Sum Sq Mean Sq F value Pr(>F)
Acetic 1 2314.14 2314.14 22.5481 6.528e-05 ***
H2S 1 2147.02 2147.02 20.9197 0.0001035 ***
Lactic 1 533.32 533.32 5.1964 0.0310795 *
Residuals 26 2668.41 102.63
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.