Answer :
Answer:
a) [tex]y=-0.317 x +46.02[/tex]
b) Figure attached
c) [tex]S^2=\hat \sigma^2=MSE=\frac{190.33}{10}=19.03[/tex]
Step-by-step explanation:
We assume that th data is this one:
x: 30, 30, 30, 50, 50, 50, 70,70, 70,90,90,90
y: 38, 43, 29, 32, 26, 33, 19, 27, 23, 14, 19, 21.
a) Find the least-squares line appropriate for this data.
For this case we need to calculate the slope with the following 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]
So we can find the sums like this:
[tex]\sum_{i=1}^n x_i = 30+30+30+50+50+50+70+70+70+90+90+90=720[/tex]
[tex]\sum_{i=1}^n y_i =38+43+29+32+26+33+19+27+23+14+19+21=324[/tex]
[tex]\sum_{i=1}^n x^2_i =30^2+30^2+30^2+50^2+50^2+50^2+70^2+70^2+70^2+90^2+90^2+90^2=49200[/tex]
[tex]\sum_{i=1}^n y^2_i =38^2+43^2+29^2+32^2+26^2+33^2+19^2+27^2+23^2+14^2+19^2+21^2=9540[/tex]
[tex]\sum_{i=1}^n x_i y_i =30*38+30*43+30*29+50*32+50*26+50*33+70*19+70*27+70*23+90*14+90*19+90*21=17540[/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}=49200-\frac{720^2}{12}=6000[/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)}=17540-\frac{720*324}{12}{12}=-1900[/tex]
And the slope would be:
[tex]m=-\frac{1900}{6000}=-0.317[/tex]
Nowe we can find the means for x and y like this:
[tex]\bar x= \frac{\sum x_i}{n}=\frac{720}{12}=60[/tex]
[tex]\bar y= \frac{\sum y_i}{n}=\frac{324}{12}=27[/tex]
And we can find the intercept using this:
[tex]b=\bar y -m \bar x=27-(-0.317*60)=46.02[/tex]
So the line would be given by:
[tex]y=-0.317 x +46.02[/tex]
b) Plot the points and graph the line as a check on your calculations.
For this case we can use excel and we got the figure attached as the result.
c) Calculate S^2
In oder to calculate S^2 we need to calculate the MSE, or the mean square error. And is given by this formula:
[tex]MSE=\frac{SSE}{df_{E}}[/tex]
The degred of freedom for the error are given by:
[tex]df_{E}=n-2=12-2=10[/tex]
We can calculate:
[tex]S_{y}=\sum_{i=1}^n y^2_i -\frac{(\sum_{i=1}^n y_i)^2}{n}=9540-\frac{324^2}{12}=792[/tex]
And now we can calculate the sum of squares for the regression given by:
[tex]SSR=\frac{S^2_{xy}}{S_{xx}}=\frac{(-1900)^2}{6000}=601.67[/tex]
We have that SST= SSR+SSE, and then SSE=SST-SSR= 792-601.67=190.33[/tex]
So then :
[tex]S^2=\hat \sigma^2=MSE=\frac{190.33}{10}=19.03[/tex]
