Is it possible that quantile regression estimates coincides with OLS estimates? Let $Y_i$ and $X_i$ be random variables. Under the linear regression specification, we have
$Y_i = X_i \beta + \epsilon_i$, where $\mathbb{E}[\epsilon_i | X_i] = 0$. For this model, we may obtain the OLS estimate of $\beta$ by minimizing
$$\sum_{i=1}^{N}(y_i - x_ib)^2.$$
On the other hand, under the quantile regression specification, we have
$Q_{Y_i}(u|X_i) = X_i \beta(u)$ for $u \in (0,1)$, which is equivalent to
$Y_i = X_i \beta(u) + \epsilon_i(u)$ with the assumption that $P(\epsilon(u)<0 | X_i) = u $ almost surely. For this model, we may obtain the QR estimate of $\beta(u)$ by minimizing
$$\sum_{i=1}^{N}\rho_u(y_i - x_ib),$$
where $\rho_u(x) = x(u-I\{x<0\})$.
I'm wondering if there is any particular data structure such that OLS estimates will be the same as quantile regression estimates.
 A: Suppose we strengthened mean independence to full independence, $\epsilon_i \perp X_i$. I also will assume you only care about slopes and not about intercepts, and will explicitly write
$$Y_i = \alpha + X_i\beta + \epsilon_i$$
In this case, we have $Q_{Y}(Y|X) = \alpha + X_i\beta + Q_\epsilon(u)$. In particular, we have that $Q_{Y}(u|X_i) = (\alpha + Q_\epsilon(u)) X_i'\beta \equiv \alpha'(u) + X_i'\beta$. Thus, with independence, all slope parameters will be the same as the OLS slope parameter (although of course, the specific parameters in finite sample may not be identical), although different quantiles clearly shift the intercept up and down.
A: *

*In quantile regression you can change some of the values $y_i$ without changing the solution.


*In least squares regression a small change of a value $y_i$ will always have an effect on the end result.
Therefore the two functions for the estimates can never be the same.*
When you consider random situations of the values, e.g. the median and mean for a specific sample, then it can occur by some chance that the middle value is equal to the mean. An example is when you have a sample of a discrete distribution, then the sample mean may coincide with the sample median or with some other quantile.

*An exception is when you only have two data points, then the median and mean coincide. This is not a contradiction, in this case with two data points the first bulletpoint about quantile regression is not valid.
