In: Statistics and Probability
The data below represents the bacterial growth in a liquid
culture over a number of days.
Day | 0 | 4 | 8 | 12 | 16 | 20 |
Amount ×106 | 67 | 84 | 98 | 125 | 149 | 185 |
Find a best-fit equation to the above data trend using polynomial regression with parabolic model given as:
? = ?? + ?1? + ?2?2
After calculating the values of ao, a1, and a2, substitute these values in the above parabolic model. Plot the given data and the obtained parabolic model in the same plot area. Then predict the amount of bacteria after 35 days. Also find standard deviation Sy, standard error of the estimate Sy/x, and correlation coefficient r.
We’ll do all numeric calculation in R. Please ask if you don’t understand any piece of code in the comments below.
Code:
day <- seq(0, 20, by=4)
amount <- c(67,84,98,125,149,185)
fit = lm(amount ~ day + day^2)
summary(fit)
plot(fit)
The result of the regression is:-
Call: lm(formula = amount ~ day + day^2) Residuals: 1 2 3 4 5 6 7.0 0.8 -8.4 -4.6 -3.8 9.0 Coefficients: Estimate Std. Error t value Pr(>|t|) (Intercept) 60.0000 5.5686 10.78 0.000421 *** day 5.8000 0.4598 12.61 0.000227 *** --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 Residual standard error: 7.694 on 4 degrees of freedom Multiple R-squared: 0.9755, Adjusted R-squared: 0.9693 F-statistic: 159.1 on 1 and 4 DF, p-value: 0.0002274