Let say I have following simple linear regression
$y = \alpha + \beta X + \epsilon$
Here $X$ is ordered categorical variable, let say with categories represented by 1 to 1012.
Now in typical regression equation, we predict the value of $y$ from $X$ as
$\hat{y} = \hat{\alpha} + \hat{\beta}X$
However here my problem is different, given a value of $y$ I want to predict possible value of $X$.
For this I think I need to construct coontinuous and non-overlapping interval for possible $y$ values for each category of $X$ i.e. there will be 10 overlapping intervals of $y$ e.g.
if $y_{Val}$ falls within $ \left( -\inf, y_1 \right]$ then I would predict the value of $X = 1$ if $y_{Val}$ falls within $ \left( y_1, y_2 \right]$ then I would predict the value of $X = 2$ so on
My goal is to BEST estimate the value of $y_1, y_2, ..,y_9$.
My data looks like below