# Choosing the proper quantile for prediction

To give a simple hypothetical example, suppose one was interested in using linear regression to predict how horses would perform in a race. Let's suppose the race includes 10 horses and that I have a variety of potential explanatory effects for all of them (e.g. weight, age, record, jockey, and so on) as well as a data set with a year's worth of past results and those same explanatory effects. Let's also suppose that I am only interested in predicting a top three finish; outcomes outside of the top three are of no importance to me.

My first instinct is that ordinary least squares would be inappropriate for this situation because OLS is used to predict the conditional mean, whereas I am interested in predicting a conditional quantile (the 70th percentile, essentially). Am I even correct in thinking that quantile regression is the proper technique for this purpose?

Assuming my choice of quantile regression is appropriate, my primary question is this: which quantile ought I to aim for if attempting to identify a horse that finishes in at least the top three positions?

I might attempt to predict at the 70th percentile, operating under the logic that this is the threshold I am interested in the horse crossing, however that would seem to leave little margin for error, as I'd be predicting right on the boundary of success and failure. Would it be more prudent to predict the 75th, or perhaps even the 90th percentile, operating under the logic that even if the horse predicted to achieve at that level underperforms, there is margin for error because I'm setting the bar higher than necessary?

My first inclination is to go the former route, because I feel like there would have to be some trade-off with predicting a higher quantile than necessary, but I can't identify what that trade-off is. Surely there is a sound reason for not simply attempting to predict the 1st place finisher when a 3rd place finish is equally satisfying to me, no?

Is there a more proper alternative entirely, like composite quantile regression, perhaps? I'm interested to hear how one would approach this situation, as I normally read about quantile regression in the context of comparing the influence of effects across quantiles rather than using quantile regression for prediction per se.

The first thing that comes to mind as potentially useful is work on link relevance in search. That is, if you Google a term, Google has a vast ocean of links that it could give you in response, but has to decide which ones it thinks are best.

Typical simple systems to approach this provide a score for each option, sort the list of scores, and then return the top n. It sounds like you could do a similar thing--if you have finish times for every horse, just try to regress on the continuous finish time variable for all horses, and then determine whether the predicted finish time is in the top three.

(If you can predict a distribution of finish times, then you can compute a probability it will be in the top three, instead of a flat yes/no, which will be a major improvement. Interaction effects between horses also seem potentially important.)

If you only have categorical data to begin with--which horse finished in what place for each race--it seems like you can still build a regression model, but a weaker one which doesn't take into account the magnitude of differences between finishing times. (If you have data from enough races, this should be alright, though you own't be able to distinguish between mean differences and variability differences except indirectly.)

• Thank you for the response, Matthew. I totally get your point about modeling the continuous finish times as opposed to place/rank. Let's assume I have the continuous times as you describe. You suggest to "regress" on the finish time, however the type of regression to use is unclear. What if the conditions for OLS are violated? What if certain variables are more or less predictive at certain quantiles? Was my inclination to use quantile regression here off base? I could still use some clarification in that department. Aug 8, 2016 at 21:36
• @maximalc: Whatever method looks like it'll work best; maybe it's not OLS, maybe it's a decision tree or neural network based method. I think that quantile regression could also work, and you may actually want to try both methods and compare the results. Aug 8, 2016 at 22:28