Respuesta :
Answer:
a) [tex]y=-6.254 x +75.064[/tex]
b) r =-0.932
The % of variation is given by the determination coefficient given by [tex]r^2[/tex] and on this case [tex]-0.932^2 =0.8687[/tex], so then the % of variation explained by the linear model is 86.87%.
Step-by-step explanation:
Assuming the following dataset:
Monthly Sales (Y) Interest Rate (X)
22 9.2
20 7.6
10 10.4
45 5.3
Part a
And we want a linear model on this way y=mx+b, where m represent the slope and b the intercept. In order to find the slope we have this formula:
[tex]m=\frac{S_{xy}}{S_{xx}}[/tex]
Where:
[tex]S_{xy}=\sum_{i=1}^n x_i y_i -\frac{(\sum_{i=1}^n x_i)(\sum_{i=1}^n y_i)}{n}[/tex]
[tex]S_{xx}=\sum_{i=1}^n x^2_i -\frac{(\sum_{i=1}^n x_i)^2}{n}[/tex]
With these we can find the sums:
[tex]S_{xx}=\sum_{i=1}^n x^2_i -\frac{(\sum_{i=1}^n x_i)^2}{n}=278.65-\frac{32.5^2}{4}=14.5875[/tex]
[tex]S_{xy}=\sum_{i=1}^n x_i y_i -\frac{(\sum_{i=1}^n x_i)(\sum_{i=1}^n y_i){n}}=696.9-\frac{32.5*97}{4}=-91.225[/tex]
And the slope would be:
[tex]m=\frac{-91.225}{14.5875}=-6.254[/tex]
Nowe we can find the means for x and y like this:
[tex]\bar x= \frac{\sum x_i}{n}=\frac{32.5}{4}=8.125[/tex]
[tex]\bar y= \frac{\sum y_i}{n}=\frac{97}{4}=24.25[/tex]
And we can find the intercept using this:
[tex]b=\bar y -m \bar x=24.25-(-6.254*8.125)=75.064[/tex]
So the line would be given by:
[tex]y=-6.254 x +75.064[/tex]
Part b
For this case we need to calculate the correlation coefficient given by:
[tex]r=\frac{n(\sum xy)-(\sum x)(\sum y)}{\sqrt{[n\sum x^2 -(\sum x)^2][n\sum y^2 -(\sum y)^2]}}[/tex]
[tex]r=\frac{4(696.9)-(32.5)(97)}{\sqrt{[4(278.65) -(32.5)^2][4(3009) -(97)^2]}}=-0.937[/tex]
So then the correlation coefficient would be r =-0.932
The % of variation is given by the determination coefficient given by [tex]r^2[/tex] and on this case [tex]-0.932^2 =0.8687[/tex], so then the % of variation explained by the linear model is 86.87%.