# Predict price from extrapolation from data set of home sales prices in nbhd

#### jaredcolbert1

##### New member
Hi there - I'm having trouble figuring out a problem. Here is the question:

You have a data set consisting of the sales prices of houses in your neighborhood, with each sale time-stamped by the month and year in which the house was sold. You want to predict the average value of houses in your neighborhood over time, so you fit a simple regression model with average house price as the output and the time index (in months) as the input. Based on 10 months of data, the estimated intercept is $4569 and the estimated slope is 143 ($/month). If you extrapolate this trend forward in time, at which time index (in months) do you predict that your neighborhood's value will have doubled relative to the value at month 10? (Round to the nearest month).

I have a feeling that I am misinterpreting what is being asked because it seems this is a simple extrapolation:

y = mx + b

y should be set equal to double the intercept (9138)

9138 = slope(x) + intercept

9138 = 143(x) + 4569

x = 4569 / 143

x = 31.95

Can anyone gently nudge me in the right direction as this answer is not correct.
Much appreciated!!

#### auyuga

##### New member
did you resolve this problem

did you resolve this problem?

#### Ramzan Shahid

##### New member
Hi there - I'm having trouble figuring out a problem. Here is the question:

You have a data set consisting of the sales prices of houses in your neighborhood, with each sale time-stamped by the month and year in which the house was sold. You want to predict the average value of houses in your neighborhood over time, so you fit a simple regression model with average house price as the output and the time index (in months) as the input. Based on 10 months of data, the estimated intercept is $4569 and the estimated slope is 143 ($/month). If you extrapolate this trend forward in time, at which time index (in months) do you predict that your neighborhood's value will have doubled relative to the value at month 10? (Round to the nearest month).

I have a feeling that I am misinterpreting what is being asked because it seems this is a simple extrapolation:

y = mx + b

y should be set equal to double the intercept (9138)

9138 = slope(x) + intercept

9138 = 143(x) + 4569

x = 4569 / 143

x = 31.95

Can anyone gently nudge me in the right direction as this answer is not correct.
Much appreciated!!

Here is the solution
Firstly, you need to write down the linear regression model that you are given.
Y=4569+143X

Where Y denote the Price ($) and X the time (months), Now, substitute X=10, find Y10, double Y10and find X that corresponds to 2Y10. If this is not clear you can see the below results: Y10=4569+14310=4569+1430=$5999 and now you need to find X like that 2.5999 = 4569 + 143X -> X` = 11998- 4569/143 =51.95 so 52 months rounded to near integer.