Set S of coordinates (x,y), and am estimating f(x)=ax+b where a>0. ∀x,y((x,y)∈S⟹y<f(x)). ∑

agdv9m

agdv9m

Answered question

2022-05-24

set S of coordinates ( x , y ), and am estimating f ( x ) = a x + b where a > 0. I also happen to know that x , y ( ( x , y ) S y < f ( x ) ).
The question is how I can utilize this knowledge of the upper bound on values to improve the regression result?
My intuition is to run a "normal" linear regression on all coordinates in S giving g ( x ) and then construct g ( x ) = g ( x ) + c, with c being the lowest number such that x , y ( ( x , y ) S y g ( x ) ), e.g. such that g ( x ) lies as high as it can whilst still touching at least point in S. I do, however, have absolutely no idea if this is the best way to do it, nor how to devise an algorithm that does this efficiently.

Answer & Explanation

rideonthebussp

rideonthebussp

Beginner2022-05-25Added 10 answers

Your suggestion to do an ordinary regression and then move it up is a fine way to go about it. This is pretty easy, especially if you have a decent statistics library:
1. Fit the regression.
2. Calculate the residuals, the difference between the y coordinate of each point and the y coordinate of the line at that point, given by β ^ 0 + β ^ 1 x i , where x i is the x coordinate of the point. There may be a built-in way to do this. There are matrix-algebra representations as well.
3. Find the largest residual. Not largest in absolute value, just straight-up largest.
4. Add the value of the largest residual to the intercept β ^ 0 of your regression model.
Your regression line now passes through the highest point and is above all the other points.

Do you have a similar question?

Recalculate according to your conditions!

New Questions in Inferential Statistics

Ask your question.
Get an expert answer.

Let our experts help you. Answer in as fast as 15 minutes.

Didn't find what you were looking for?