Calculate price score I want to create an algorithm/calculation that helps me figure out if the price on a used vehicle is high or low.
My thoughts are that to calculate this i need a critical mass of previous vehicle sales with the same characteristics; manufacturer, model, year and trim. Having this data I must figure out each sale’s raw price. (The sale price divided into the mileage the vehicle had driven). Working on with the raw price of each previously sold car, i can then calculate the average price, this being the “market price”.
Finally using the market price i must be able to answer my initial question if a price is too high or low compared to the market price.
Take notice that this doesn’t include a vehicle's color, extra equipment etc. Some colors are more sought for, and some equipment adds value to a vehicle. I would calculate this by fixed values at the end of my calculation.
Any help on how to construct this formula is appreciated.. Its been a long time since thinking in terms of calculations!
Thanks,
Kristian
 A: You may just want to run a regression on price relative to the values you care about such as millage.  You can then use the equation you estimate to see if the predicted value of the car you are looking at is larger or smaller to the price they are actually charging. 
A: I would also suggest running a regression. With ordinary least squares regression, you explain the observed price (of past sales) as linear combination of car characteristics. For example, an equation you estimate could be (for a particular model)
$$price_i=\beta_0+\beta_1 LowMiles_i+\beta_2 MidMiles_i+\beta_3 HighMiles_i+\beta_4 Engine_i+\varepsilon_i.$$
But before you jump in, you should think about which data you have and which you need to predict the price. Miles driven seems to be a major factor; instead of using it as continuous variable, I would divide the miles driven into ranges (no miles (new) is the omitted category contained in $\beta_0$, LowMiles with very few driven, etc.), and create dummy variables for that. We would expect the estimates to be $0>\beta_1\ge\beta_2\ge \beta_3$---if it doesn't come out like this, maybe you forgot some other relevant predictor. Depending on the model, there may be relevant extras that drive selling price. For example, some models offer versions with a more powerful engine, this can also be included as dummy. Or maybe some models have convertible versions, in which case you should also add a dummy for that. In order to predict the price, you simply use your estimated coefficients. With the above equation, a car of the model with few miles and a bigger engine would have a price of $\beta_0+\beta_1+\beta_4$. If the price you observe deviates, then the car may be over- or underpriced (or your statistical model is wrong).
You can also estimate one big equation for several models, which would also allow you to estimate the effect of "color". For example, you have model A and model B, then
$$price_i=\beta_0+\beta_1 LowMiles_i+\beta_2 MidMiles_i+\beta_3 HighMiles_i+\beta_4 Engine_i+\beta_5 B_i+\beta_6 LowMiles_i*B_i+\beta_7 MidMiles_i*B_i+\beta_8 HighMiles_i*B_i+\beta_9 Engine_i*B_i+\beta_{10} RedColor_i+\beta_{11} BlackColor+\varepsilon_i.$$
In this specification, the $\beta_{10}$ coefficient is the average price premium for a car of red color, compared to all other colors except black, after the effects of miles driven and engine are taken out. Note that this estimate will be driven by the model you have more observations for. You can prevent that by estimating the color premium for each model separately, using interactions like with miles.
If you want the price of model B with many miles driven an red color, you calculate $\beta_0+\beta_5+\beta_3+\beta_8+\beta_{10}$. You can see that, the more models you add, the more parameters you have to estimate. This is not a problem if you have enough data. But you can also generalize by assuming, for example, that the effect of miles driven is the same for all models (then you do not have to estimate $\beta_6-\beta_8$ in the above example). While this is implausible in general, it might be useful for models that are very similar in price and characteristics.
