Start With the Forecasting Question
A model intended to forecast a house price must use information that would actually be in hand when the forecast is made. That requirement sounds simple, but housing records often contain a mixture of listing details, later sale information, and database fields used only to identify records. Including a variable merely because it appears in the historical file can make a model impossible to use honestly at listing time.
Consider a clearly hypothetical task: use historical listings in one metropolitan area to predict the eventual transaction price for a residential home that sells within 180 days of its first listing. The forecast is made at the time of that first listing. This defines the target population and forecast horizon. A model for this task does not predict whether a listing will sell within 180 days; it predicts the transaction price conditional on that sale occurring within the stated horizon.
The outcome is observed later, but that does not make it an impermissible outcome: it is what the model is meant to predict. The essential timing rule applies to the predictors. Each value used to produce a forecast must be available by the forecast origin, not learned from the subsequent sale process.
State the Candidate Model and Its Conditions
Suppose the hypothetical archive contains 1,200 eligible historical sales and records the information shown below. Let \(Y_i\) be the eventual transaction price for home \(i\), measured in thousands of dollars. Predictors are recorded from the first listing, with the stated units. A simple candidate model represents the conditional mean transaction price as a linear combination of these terms.
Before using the model for forecasts, check the conditions that give its terms a meaningful interpretation and make it relevant to the intended task:
- Consistent target: historical outcomes must use the same transaction-price definition, 180-day horizon, and eligible-listing rule as the forecast task. Because the model is trained on completed sales, it is a price model for listings that sell within the horizon, not a model of sale probability.
- Available predictors: each predictor value must be captured by the initial listing timestamp. Later revisions or records created after that point cannot be substituted for the initial values.
- Adequate conditional-mean form: the chosen terms must be a reasonable representation of how the conditional mean varies over the ranges and categories that will be forecast. This is a modeling judgment to assess, not a guarantee supplied by the equation.
- Relevant future setting: the future listings should be comparable to the historical target population. Changes in the market, data definitions, or listing practices can weaken that connection.
For ordinary least-squares inference, assumptions about error independence and variance are also relevant. Repeated listings of the same property, or strong clustering by location and time, may make errors dependent. Such issues should be checked when fitting and evaluating the model. A normal error distribution is not required just to calculate a fitted conditional-mean forecast, and no assumption here turns an observational association into a causal effect.
Decide Which Information Exists at Listing
A useful audit asks when each field becomes known, not just whether it is numerical or strongly related to price. The following hypothetical listing has an initial list price of $400,000 on October 3 and a completed sale on November 12. The elapsed time is \(31-3+12=40\) days: 28 days from October 3 to October 31, then 12 more days. The sale is within the 180-day target horizon, but its final price and sale date were not known on October 3.
Worked Example: Audit a Listing-Time Record
At the October 3 forecast origin, the hypothetical record contains initial asking price, living area, bedroom and bathroom counts, neighborhood, and listing date. It also contains final transaction price, closing date, final price revision, and a unique record number. Which fields belong in a listing-time candidate specification?
Use listing-time fields. The initial asking price, area, room counts, neighborhood, and listing date are known on October 3. Listing season can be derived from the listing date; October is in fall under the four-season classification used here.
Exclude later fields. The final transaction price is the outcome, not a predictor. The closing date and final price revision occur after the forecast origin. Even if they are strongly associated with the eventual price, using them would give the forecast information unavailable when it is supposed to be made.
Exclude the record number as a predictor. It identifies this row; it is not a general housing characteristic. It can still be useful for linking or auditing records without entering the prediction formula.
The same timing rule applies to less obvious fields. “Current asking price” is not necessarily safe if the file contains a revision made weeks after initial listing. For this task, the candidate term must be the initial asking price. The exact timestamp and definition of a field matter.
Build a Core and an Extended Candidate
For this hypothetical specification, let \(A_i\) be finished living area in thousands of square feet, \(B_i\) the number of bedrooms, and \(H_i\) the number of full bathrooms. Let \(G_i\) be home age in decades and \(Q_i\) lot area in thousands of square feet. Let \(L_i\) be the initial asking price in thousands of dollars. Neighborhood has five categories, with neighborhood 1 as the reference category; \(D_{ij}=1\) if home \(i\) is in neighborhood \(j\), and 0 otherwise. Listing season has four categories, with winter as the reference; \(S_{ir}=1\) if the listing is in season \(r\), and 0 otherwise. Thus the reference neighborhood and winter are represented by all-zero indicators for their respective category sets.
A core candidate includes area, bedrooms, bathrooms, and neighborhood. An extended candidate adds age, lot area, initial asking price, and listing season. These are alternative planned specifications, not a claim that every added term must improve forecasts. The expanded expression is:
The core version omits the \(G_i\), \(Q_i\), \(L_i\), and \(S_{ir}\) terms. The extended version has 14 coefficients: one intercept, six numeric predictor coefficients, four neighborhood contrasts, and three season contrasts. In this example, 1,200 historical records are a starting point for considering that complexity, not proof that every term can be estimated reliably. Category counts, missingness, the observed predictor ranges, and repeated properties still need inspection.
Worked Example: Count and Read the Candidate Terms
Suppose the hypothetical archive has five neighborhoods and four listing seasons. The core candidate has an intercept, three numeric terms, and one contrast for each nonreference neighborhood. Its coefficient count is \(1+3+(5-1)=8\).
The extended candidate adds two numeric terms for age and lot area, one for initial asking price, and three nonreference season contrasts. Its count is \(8+2+1+(4-1)=14\). The four neighborhood contrasts and three season contrasts use reference categories, so the equation does not include an indicator for every category as well as an intercept.
This count makes the specification concrete: it has 14 estimated coefficients, not 14 predictors in addition to an intercept. It also makes the category coding auditable. If the archive instead had hundreds of sparsely represented neighborhoods, this particular fixed set of neighborhood indicators would require reconsideration rather than automatic use.
The units make coefficient meanings precise. For example, \(\beta_A\) is measured in thousands of dollars per additional 1,000 square feet of living area. A neighborhood coefficient \(\gamma_j\) is measured in thousands of dollars relative to neighborhood 1, conditional on the other included terms. A season coefficient \(\delta_r\) compares that season with winter, conditional on the other terms.
Interpretation Follows From the Equation
The additive equation implies those comparisons directly. Hold the other predictors fixed and compare two homes whose living areas differ by one unit of \(A\). The predicted conditional means differ by:
Since one unit of \(A\) is 1,000 square feet and \(Y\) is measured in thousands of dollars, this is a conditional predicted difference in thousands of dollars per additional 1,000 square feet. It is not automatically the price change caused by enlarging a house: other differences and the way homes enter the data may affect the observed association.
Reference categories matter as well. For a home in neighborhood \(j\), its neighborhood contribution is \(\gamma_j\); for a home in neighborhood 1, that contribution is zero. The contrast is therefore relative to neighborhood 1, holding the modeled predictors fixed. The intercept is the model’s predicted conditional mean for the reference neighborhood and winter when every numeric predictor is zero. If that combination is unrealistic, the intercept may have little practical meaning even though the model’s other predictions can still be useful.
Calculate an Illustrative Listing-Time Forecast
The specification defines which information can enter a forecast; fitted coefficient estimates are needed to calculate one. The next example uses invented coefficients solely to demonstrate the arithmetic. They are not estimated from an actual housing study and do not establish that this candidate predicts accurately.
Worked Example: Forecast a Hypothetical Listed Home
Suppose the extended candidate has the following hypothetical estimated coefficients, all in the model’s stated units: intercept \(85\), \(\hat\beta_L=0.72\), \(\hat\beta_A=68\), \(\hat\beta_B=-4\), \(\hat\beta_H=12\), \(\hat\beta_G=-2.5\), \(\hat\beta_Q=1.8\), an East-neighborhood contrast of \(25\), and a summer contrast of \(4\). Consider a home listed in East in summer with an initial asking price of $400,000, 2,000 square feet of living area, three bedrooms, two full bathrooms, age 20 years, and a 6,000-square-foot lot. It is in the reference season comparison only if it is winter; here it is summer, and its neighborhood is not the reference neighborhood.
Convert measurements to the defined units: \(L=400\), \(A=2.0\), \(B=3\), \(H=2\), \(G=20/10=2\), and \(Q=6\). The relevant indicators are \(D_{\text{East}}=1\) and \(S_{\text{summer}}=1\). Other neighborhood and season indicators are zero. Substituting gives:
The point forecast is \(555.8\) thousand dollars, or $555,800. It is the fitted conditional-mean forecast for a listing with these values under this hypothetical model. An individual home’s eventual price need not equal that forecast; the calculation alone gives no measure of its prediction uncertainty.
Common Pitfall: Letting the Archive Set the Forecast Date
A tempting but incorrect argument is: “Closing date and final sale-to-list ratio are in the historical file and help explain price, so include them.” The correction is to apply the forecast-origin rule. If the forecast is made at initial listing, the closing date and final sale-to-list ratio are not yet known. A model using them would answer a different question: what price is associated with a completed sale after later events have occurred?
A unique property or record identifier causes a different problem. A model might appear to fit historical rows when it uses an ID that happens to track the order in which records were entered. That does not make the ID a reusable home characteristic for a new listing. A neighborhood category, by contrast, can represent a location characteristic shared by many homes; it is not the same as a unique identifier. Keep IDs for record management, and include a predictor only when it has a substantive, reproducible definition and is available at the forecast origin.
Check Your Understanding
For each question, explain your reasoning using the 180-day, initial-listing forecast defined above.
- A listing’s initial asking price is $350,000, but it is reduced after three weeks. Which asking-price value is available for this forecast, and why?
- Why does a model trained only on homes that sell within 180 days not, by itself, predict the probability that a new listing will sell within 180 days?
- In the stated model, what does the East-neighborhood coefficient compare, and what are its units?
- Why may a neighborhood category be a candidate predictor while a unique property ID is excluded?
- For a home listed in winter in neighborhood 1, what values do its season and neighborhood indicators take under the stated reference coding?