Sovi.AI - AI Math Tutor

Scan to solve math questions

QUESTION IMAGE

6 a real estate agent plans to compare the price of a cottage, y, in a …

Question

6 a real estate agent plans to compare the price of a cottage, y, in a town on the seashore to the number of blocks, x, the cottage is from the beach. the accompanying table shows a random sample of sales and location data. write a linear regression equation that relates the price of a cottage to its distance from the beach. use the equation to predict the price of a cottage, to the nearest dollar, located three blocks from the beach.

number of blocks from the beach (x)price of a cottage (y)
0$310,000
4$204,000
2$238,000
1$275,000
7$60,800

Explanation:

Step1: Calculate means of x and y

Let $x_i$ be the number of blocks and $y_i$ be the price of the cottage.
$n = 6$
$\bar{x}=\frac{5 + 0+4 + 2+1+7}{6}=\frac{19}{6}\approx3.17$
$\bar{y}=\frac{132000 + 310000+204000+238000+275000+60800}{6}=\frac{1229800}{6}\approx204966.67$

Step2: Calculate the slope (b)

$b=\frac{\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})}{\sum_{i=1}^{n}(x_i-\bar{x})^2}$
$(x_1-\bar{x})(y_1 - \bar{y})=(5 - 3.17)(132000 - 204966.67)=1.83\times(- 72966.67)\approx - 133529.01$
$(x_2-\bar{x})(y_2 - \bar{y})=(0 - 3.17)(310000 - 204966.67)=-3.17\times105033.33\approx - 332955.66$
$(x_3-\bar{x})(y_3 - \bar{y})=(4 - 3.17)(204000 - 204966.67)=0.83\times(-966.67)\approx - 802.33$
$(x_4-\bar{x})(y_4 - \bar{y})=(2 - 3.17)(238000 - 204966.67)=-1.17\times33033.33\approx - 38648.99$
$(x_5-\bar{x})(y_5 - \bar{y})=(1 - 3.17)(275000 - 204966.67)=-2.17\times70033.33\approx - 152972.33$
$(x_6-\bar{x})(y_6 - \bar{y})=(7 - 3.17)(60800 - 204966.67)=3.83\times(-144166.67)\approx - 551158.34$
$\sum_{i = 1}^{n}(x_i-\bar{x})(y_i - \bar{y})=-133529.01-332955.66 - 802.33-38648.99-152972.33-551158.34=-1200066.66$

$(x_1-\bar{x})^2=(5 - 3.17)^2=1.83^2 = 3.35$
$(x_2-\bar{x})^2=(0 - 3.17)^2=9.99$
$(x_3-\bar{x})^2=(4 - 3.17)^2=0.69$
$(x_4-\bar{x})^2=(2 - 3.17)^2=1.37$
$(x_5-\bar{x})^2=(1 - 3.17)^2=4.71$
$(x_6-\bar{x})^2=(7 - 3.17)^2=14.66$
$\sum_{i=1}^{n}(x_i-\bar{x})^2=3.35 + 9.99+0.69+1.37+4.71+14.66=34.77$

$b=\frac{-1200066.66}{34.77}\approx - 34514.43$

Step3: Calculate the y - intercept (a)

$a=\bar{y}-b\bar{x}$
$a = 204966.67-(-34514.43)\times3.17$
$a = 204966.67+109410.74=314377.41$

The linear - regression equation is $y=-34514.43x + 314377.41$

Step4: Predict the price for x = 3

$y=-34514.43\times3+314377.41$
$y=-103543.29+314377.41$
$y = 210834.12\approx210834$

Answer:

$210834$