In: Statistics and Probability
The price of a molasses crop is determined by percent of sugar in the molasses. An independent laboratory assays each crop for its sugar content and a price is agreed upon based on the results. An analyst is interested in investigating this relationship. The following data are known:
Price
(cents/pound) 25 35 45 55 65 75 85
Percent
sugar
50 54 60 68 78 82 84
We would like to conduct a hypothesis to determine if the regression line is useful (a good predictor), that is if knowledge of the independent variable, x, gives us knowledge of the dependent variable, y. The proper set of hypotheses used to conduct this test is
A. |
Ho: beta0 = 0 |
|
B. |
H0: beta1<=0 |
|
C. |
H0: beta1=0 |
|
D. |
H0: beta1>=0 |
The set of hypotheses used to determine if the regression line is useful (a good predictor), that is if knowledge of the independent variable, x, gives us knowledge of the dependent variable y.
The hypothesis testing problem is given by:
c)
### By using R command
> x=c(50,54,60,68,78,82,84)
> x ## Percentage of Sugar
[1] 50 54 60 68 78 82 84
> y=c(25,35,45,55,65,75,85)
> y #### Price
[1] 25 35 45 55 65 75 85
> fit=lm(y~x)
> summary(fit)
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4 5 6 7
-2.113e+00 1.690e+00 2.394e+00 -6.825e-16 -5.493e+00 -1.690e+00
5.211e+00
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -50.3521 7.8559 -6.409 0.00137 **
x 1.5493 0.1136 13.644 3.79e-05 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 3.827 on 5 degrees of freedom
Multiple R-squared: 0.9738, Adjusted R-squared: 0.9686
F-statistic: 186.2 on 1 and 5 DF, p-value: 3.793e-05
Here p-value: 3.793e-05 =0.00 which indicates that we reject the null hypothesis at 5% level of significance.
Therefore the regression coefficient is significant in the model. That is Percent of sugar is a good predictor of Price.