Respuesta :
Answer:
[tex]y=-2.86 x +228.84[/tex]
Step-by-step explanation:
We assume that the data is this one:
x: 50, 55, 50, 79, 44, 37, 70, 45, 49
y: 152, 53, 22, 35, 38, 166, 13, 185, 25
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 = 50+ 55+ 50+ 79+ 44+ 37 +70+ 45+ 49=479[/tex]
[tex]\sum_{i=1}^n y_i =152 + 53 + 22 + 35 + 38 + 166 + 13 + 185 + 25=689[/tex]
[tex]\sum_{i=1}^n x^2_i =50^2 + 55^2 + 50^2 + 79^2 + 44^2 + 37^2 + 70^2 + 45^2 + 49^2=26897[/tex]
[tex]\sum_{i=1}^n y^2_i =152^2 + 53^2 + 22^2 + 35^2 + 38^2 + 166^2 + 13^2 + 185^2 + 25^2=91641[/tex]
[tex]\sum_{i=1}^n x_i y_i =50*152+ 55*53+ 50*22+ 79*35+ 44*38+ 37*166 +70*13+ 45*185+ 49*25=32654[/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}=26897-\frac{479^2}{9}=1403.56[/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}=32654-\frac{479*689}{9}=-4016.11[/tex]
And the slope would be:
[tex]m=-\frac{4016.11}{1403.56}=-2.86[/tex]
Nowe we can find the means for x and y like this:
[tex]\bar x= \frac{\sum x_i}{n}=\frac{479}{9}=53.22[/tex]
[tex]\bar y= \frac{\sum y_i}{n}=\frac{689}{9}=76.56[/tex]
And we can find the intercept using this:
[tex]b=\bar y -m \bar x=76.56-(-2.86*53.22)=228.84[/tex]
So the line would be given by:
[tex]y=-2.86 x +228.84[/tex]