Say I have 2 arrays, one with a range of values for the slope of a graph, and another one for the chi squared values graphing them produces the following image
plt.figure(figsize=(8,6))
plt.plot(maybe_slopes, chi2, c = 'grey')
plt.grid(True)
Slope vs Chi squared
How can I find the slope corresponding to the minimum chi square without having to explore the whole grid of parameters? (since for this examples, there are 50 values per, but if I had 100 or 1000 values, there is more data to sift through) For this example, the slope is close to -2 And the lowest chi squared is around 20K Sorry, I'm new with matplot, and yes this is for a class project
