# Appropriate regression when multiple dependent values for same independent value

I have a data set which looks as following:

    Y
1   2
1   1.5
1   2.5
2   5
2   3
3   5.2
3   6
3   6.8
4   6
4   7


And the corresponding plot is:

What kind of regression is appropriate for the above kind of data ?

• I think OLS should work fine on this. Effectively it will try to fit a line through the "midpoints" of the cluster of y values having the same x value, with a bigger weight for the bigger clusters. Presumably that is what you want. Apr 26 '20 at 12:58

As noob2 suggested, you run a simple OLS regression (in Excel). You get the estimation result $$\hat{y}_i=0.63+1.61x_i$$ with an $$R^2=0.84$$. That seems to do the job!
You may want to read this about aggregating the $$y_i$$ values for the same $$x_i$$ observation.