In: Statistics and Probability
In the datasets package, there is a dataframe ChickWeight. The weights of the chicks are recorded in gram and the variable time is measured in days. Run a regression model to show how the passage of time influences the weight of the chicks. Based on the regression results, which of the following are true? (answer may 1 or more)
a.The chicks weigh about 27 grams when they hatch.
b.We accept the null hypothesis that time has no effect on the weight of the chicks.
c.The chicks gain about 8.8 grams per day.
d.We can reject the null hypothesis that time has no effect on the weight of the chicks.
In the datasets package, there is a dataframe ChickWeight. The weights of the chicks are recorded in gram and the variable time is measured in days. Run a regression model to show how the passage of time influences the weight of the chicks. Based on the regression results, which of the following are true?
Weight is dependent variable.
Time is independent variable.
From the scatter plot we can say that there is positive relationship between weight and time.
> model= lm(weight~Time, data = a)
> model
Call:
lm(formula = weight ~ Time, data = a)
Coefficients:
(Intercept) Time
27.467 8.803
> summary (model)
Call:
lm(formula = weight ~ Time, data = a)
Residuals:
Min 1Q Median 3Q Max
-138.331 -14.536 0.926 13.533 160.669
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) 27.4674 3.0365 9.046 <2e-16 ***
Time 8.8030 0.2397 36.725 <2e-16 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 38.91 on 576 degrees of freedom
Multiple R-squared: 0.7007, Adjusted R-squared: 0.7002
F-statistic: 1349 on 1 and 576 DF, p-value: < 2.2e-16
FOr selecting option we have to test the hypothesis that,
H0 : There is no relationship between two variables.
H1 : There is some relationship between two variables.
So from the regression output we can say that there is some relationship between two variable.
d.We can reject the null hypothesis that time has no effect on the weight of the chicks.