0

Attached image. How would you find the relationship between independent variable (x) and dependent variable (y)? Is it linear or non-linear? What would the function looks like?

P.S. I believe this is a non-linear regression problem as we are trying to fit a model (function) to this data. I just can't figure out the function. It seems like a mix of positive and negative sigmoid? or quadratic?

Updated plot

Here is my code I am trying to recreate the plot I saw before:

import pandas as pd

#create DataFrame df = pd.DataFrame({'x': [0, 1, 2, 3, 11, 12.2, 12.4, 13.9, 14, 15, 4, 10.7, 12.6, 8, 8.5, 9, 13.5, 13.1, 12.8, 5, 15, 14.5, 6, 6.3, 6.6, 7, 7.4, 5.4, 4.4, 3.5, 2.5, 1.5, 0.5], 'y': [0, 3, 7, 8, 25, 40, 15, 105, -10, -20, 12, 60, 80, 37, 40, 46, 100, 66, 5, 16, 120, 28, 22, 24, 26, 30, 32, 18.5, 14.3, 9.8, 8, 5.2, 1.8]})

#view DataFrame print(df)

import matplotlib.pyplot as plt

#create scatterplot plt.scatter(df.x, df.y) plt.ylabel('Dependent Variable') plt.xlabel('Independent Variable') plt.title('Function?') plt.show()

DLCVIP007
  • 1
  • 1

0 Answers0