96.6k views
2 votes
Using simple linear regression, calculate the trend line for the historical data. say the x axis is april = 1, may = 2, and so on, while the y axis is demand. (round your intercept value to the nearest whole number and slope value to 2 decimal places.

1 Answer

2 votes
Given a table of historical demand for a product as follows:


\begin{tabular} c &Demand\\[1ex] April&60\\ May&55\\ June&75\\July&60\\August&80\\September&75\\ \end{tabular}

The linear regression equation is given by


\hat{Y}=bx+a

where:


b= (n\Sigma xy-\Sigma x\Sigma y)/(n\Sigma x^2-(\Sigma x)^2)
and

a= (1)/(n) (\Sigma y-b\Sigma x)

We calculate the required values using the following table, where
April = 1, May = 2, and so on.


\begin{tabular} c X &Y&X^2&XY\\[1ex] 1&60&1&60\\ 2&55&4&110\\ 3&75&9&225\\ 4&60&16&240\\ 5&80&25&400\\ 6&75&36&450\\[1ex] \Sigma X=21&\Sigma Y=405&\Sigma X^2=91&\Sigma XY=1,485 \end{tabular}

Thus,


b= (6(1,485)-21(405))/(6(91)-(21)^2) \\ \\ = (8,910-8,505)/(546-441) = (405)/(105) \\ \\ \approx3.86

and


a= (1)/(6) (405-(3.86)(21)) \\ \\ = (1)/(6) (405-81)= (1)/(6) (324) \\ \\ =54

Therefore, the trend line for the historical data is given by
\hat{Y}=3.86x+54
User Sunil Pachlangia
by
7.6k points