How to create a optimization where for value of x I get y such that y is minimum and x is maximum

26 Views Asked by At
X= [23, 174, 3, 38, 22, 97, 11, 5, 36, 94, 25]
y = [8, 58, 2, 13, 8, 86, 5, 2, 23, 60, 20]

Now using linear regression I got coefficient = 0.46 y intercept 4 Now I need to find the optimum proportion of y and x

I am not sure if linear regression can be of help. is there any optimization process that can take all this into consideration or the coefficient itself gives that value

1

There are 1 best solutions below

0
On BEST ANSWER

To help shed light onto the data, Seaborn's regression plot might help:

import seaborn as sns
import matplotlib.pyplot as plt

X = [23, 174, 3, 38, 22, 97, 11, 5, 36, 94, 25]
y = [8, 58, 2, 13, 8, 86, 5, 2, 23, 60, 20]

sns.regplot(X, y)
plt.show()

resulting plot