In: Statistics and Probability
Solve the following question.
No of Customers |
15 |
9 |
40 |
20 |
25 |
25 |
15 |
35 |
Weekly Sales |
06 |
04 |
16 |
06 |
13 |
09 |
10 |
16 |
We should build simple linear regression model by considering "Weekly sales" as dependent variable and "Number of customers" as independent variable.
I have to used R code to solve this question.
GIVEN:
The 8 week sales data for a Kashmiri tea house comprising the number of customers (in hundreds) and weekly sales (in thousand SRs).
R CODE:
#SIMPLE LINEAR REGRESSION MODEL
Model=lm(Weekly_sales ~ No_of_customers, data=data)
summary(Model)
SIMPLE LINEAR REGRESSION MODEL OUTPUT:
(a) ESTIMATED REGRESSION EQUATION:
The estimated simple linear regression equation of weekly sales over number of customers is given by,
where
is the predicted dependent variable "weekly sales".
is the intercept.
is the slope coefficient of the independent variable "Number of customers".
is the independent variable "Number of customers".
(b) PREDICTED SALES OF NINTH WEEK GIVEN THAT AVERAGE NUMBER OF CUSTOMERS IS 30:
The estimated simple linear regression equation of weekly sales over number of customers is given by,
If the average number of customers is 30, the predicted sales of ninth week is given by,
Thus the predicted sales of ninth week if the average number of customers is 30 is (in thousand SRs).