In: Statistics and Probability
Promotional expenses(x) | Sales(y |
7 | 12 |
10 | 14 |
9 | 13 |
4 | 5 |
11 | 15 |
5 | 7 |
3 | 4 |
a) draw the scatter plot and draw the line of best fit
b) Calculate and interpret the correlation between promotional expenses and sales
C) Calculate the regression equation( calculate the slope and intercept of the regression line
d)Interpret the slop coefficient of regression equation
e)Using the regression equation calculate the sales volume with respect to promotional expense of 4.
f) Obtain the coefficient of determination (how much of the variability of sales is predicted by promotional expenses) and interpret the results
(a) The scatter plot and the line of best fit is as follows.
....................
(b) The correlation coefficient of the aforesaid variables is found to be 0.9787083 (in the R software).
R code:
x=c(7,10,9,4,11,5,3)
y=c(12,14,13,5,15,7,4)
cor(x,y)
A high and positive value of the correlation means the two variables are closely linearly related and one increases with the another more or less.
................................
(c) The regression equation is calculated in the R software by the following commands.
Model<-lm(y~x)
summary(Model)
Output:
Call:
lm(formula = y ~ x)
Residuals:
1 2 3 4 5 6 7
2.0000 -0.2931 0.1379 -0.7069 -0.7241 -0.1379 -0.2759
Coefficients:
Estimate Std. Error t value Pr(>|t|)
(Intercept) -0.01724 1.01585 -0.017 0.987115
x 1.43103 0.13422 10.662 0.000126 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
Residual standard error: 1.022 on 5 degrees of freedom
Multiple R-squared: 0.9579, Adjusted R-squared: 0.9494
F-statistic: 113.7 on 1 and 5 DF, p-value: 0.0001256
That is the estimated slope coefficient is 1.43103 and the
estimated intercept is -0.01724, and the regression line is
Y=-0.01724 + 1.43103X.
Since the slope coefficient is too far from 0 and the null hypothesis that slope=0 is rejected with a p-value of 0.000126 (*** marked in the aforesaid output), we can conclude that the model is significant.