I'm using multiple linear regression to describe relationships between Y and X1,X2. From
From theory I understood that multiple regression assumes linear relationships between Y and each of X (Y and X1, Y and X2). I'm not using any transformation of X. So
So, I got the model with R=0.45 and all significant X (P<0.05). Then I plotted Y against X1. I don't understand why red-colored circles that are predictions of the model do not form a line. As I said before, I expected that each pair of Y and X is fitted by a line.
The plot is generated in python this way:
fig, ax = plt.subplots()
plt.plot(x['var1'], ypred, 'o', validation['var1'], validation['y'], 'ro');
ax.set_title('blue: true, red: OLS')
ax.set_xlabel('X')
ax.set_ylabel('Y')
plt.show()