An experiment was conducted to investigate the effect of extrusion pressure (P)
ID: 3315162 • Letter: A
Question
An experiment was conducted to investigate the effect of extrusion pressure (P) and temperature at extrusion (T) on the strength y of a new type of plastic. Two plastic specimens were prepared for each of five combinations of pressure and temperature. The specimens were then tested in a random order and the breaking strength for each specimen was recorded. The independent variables were coded (transformed) as follows to simplify the calculations: x,-(P-200) 10. x,-(T-400) 25. The n=10 data points are listed in the table 2 2 5.2 0.3 0.1 1.2 1.1 2.2 2 6.2 2 2 (a) Find the least-squares regression equation of the form11 A A1 1 + x2 + (you may use a calculator or any software that can perform operations with matrices) (b) Does the model contribute information for the prediction of? Test using -0.05 (c) Suppose that we are interested in an interval estimate for the strength of plastic for the following combination of pressure and temperature: x/--1 and x2-1. Would a confidence interval or a prediction interval be more appropriate in this situation? Calculate this interval using a-0.05.Explanation / Answer
we shall do this using the open source statistical package R , the complete R snippet is as follows
y<- c(5.2,5,.3,-.1,-1.2,-1.1,2.2,2,6.2,6.1)
x1<- c(-2,-2,-1,-1,0,0,1,1,2,2)
x2 <- c(2,2,-1,-1,-2,-2,-1,-1,2,2)
## create a dataframe
data.df <- data.frame(y,x1,x2)
## fir the model
fit <- lm(y~., data=data.df)
## summarise the model
summary(fit)
newdat<- data.frame(x1=-1,x2=1)
## predict
predict(fit,newdata=newdat,interval = "prediction")
The results are
summary(fit)
Call:
lm(formula = y ~ ., data = data.df)
Residuals:
Min 1Q Median 3Q Max
-0.5357 -0.3893 -0.2221 0.2814 0.9443
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 2.4600 0.1866 13.186 3.37e-06 ***
x1 0.4100 0.1319 3.108 0.0171 *
x2 1.6143 0.1115 14.479 1.79e-06 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 0.5899 on 7 degrees of freedom
Multiple R-squared: 0.9691, Adjusted R-squared: 0.9602
F-statistic: 109.7 on 2 and 7 DF, p-value: 5.205e-06
as the r2 value is 0.9691 , this means that the model is able to explain about 96.91% variation in the data
Hence the regression fit the data well
The regression equation is
the regression equation is
y = 2.46 + 0.40*x1 +1.614*x2
The prediction interval is given as
> predict(fit,newdata=newdat,interval = "prediction")
fit lwr upr
1 3.664286 2.145253 5.183319
we know that the confidence interval of the prediction presents a range for the mean rather than the distribution of individual data points.
A prediction interval is a range that is likely to contain the response value of a single new observation given specified settings of the predictors in your model.
Hence we shalluse a prediction interval in this case
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.