Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Use R studio and also give out proper solutions. Plastic Hardness. Experience wi

ID: 3202984 • Letter: U

Question

Use R studio and also give out proper solutions.

Plastic Hardness. Experience with a certain type of plastic indicates that a relation exist between the hardness (in Brinell units) of items molded from the plastic (Y ) and the elapsed time (in hours) since termination of the molding process (X). Data on X and Y from 16 items molded from 16 batches of plastic can be found on the course web page. It is proposed to study the relation between X and Y by means of regression analysis. Assume that the simple linear regression model is appropriate for this data.

a) Obtain the estimated regression function.

b) Construct a 98% confidence band for the estimated regression line. Construct a scatterplot of the data. Overlay a plot of the estimated regression line and a plot of the 98% confidence band on the scatterplot of the data. 1

c) The plastic manufacturer has stated that the mean hardness should increase by 2 Brinell units per hour. Conduct a two-sided test to decide whether this standard is being satisfied. State the null and alternative hypotheses, compute the test statistic and p-value of the test.

d) How much of the variation in hardness is explained by the fitted regression model?

Data:

Explanation / Answer

m=c(199,205,196,200,218,220,215,223,237,234,235,230,250,248,253,246)
m
p=c(16,16,16,16,24,24,24,24,32,32,32,32,40,40,40,40)
p
h=data.frame(m,p)
h
z=lm(m~p,data=h)
z
newdata=data.frame(p)
summary(z)
plot(z)
preds<-predict(z,newdata,interval = "confidence",level=0.98)
preds
newdata1=data.frame(p,preds)
library(arm) #install package boot ,matrix ,arm,lme4
yhat <- invlogit(newdata1$fit)
yhat
upper <- invlogit(newdata1$upr)
upper
lower <- invlogit(newdata1$lwr)
lower
plot(yhat) #please plot everything on one graph together using points () function
lines(newdata1, upper, lty = 2)
lines(newdata1, lower, lty = 2)

Output:

Regression coefficients:

Call:
lm(formula = m ~ p, data = h)

Residuals:
Min 1Q Median 3Q Max
-5.1500 -2.2188 0.1625 2.6875 5.5750

Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 168.60000 2.65702 63.45 < 2e-16 ***
p 2.03438 0.09039 22.51 2.16e-12 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1

Residual standard error: 3.234 on 14 degrees of freedom
Multiple R-squared: 0.9731,   Adjusted R-squared: 0.9712
F-statistic: 506.5 on 1 and 14 DF, p-value: 2.159e-12

Predicted values:

fit lwr upr
1 201.150 197.5993 204.7007
2 201.150 197.5993 204.7007
3 201.150 197.5993 204.7007
4 201.150 197.5993 204.7007
5 217.425 215.1006 219.7494
6 217.425 215.1006 219.7494
7 217.425 215.1006 219.7494
8 217.425 215.1006 219.7494
9 233.700 231.3756 236.0244
10 233.700 231.3756 236.0244
11 233.700 231.3756 236.0244
12 233.700 231.3756 236.0244
13 249.975 246.4243 253.5257
14 249.975 246.4243 253.5257
15 249.975 246.4243 253.5257
16 249.975 246.4243 253.5257

I am unable to copy and paste graph

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Chat Now And Get Quote