Stats, Linear Algebra.
import numpy as np # Input data sizes = np.array([1000, 1500, 1200, 1800, 1350]) prices = np.array([300000, 450000, 360000, 540000, 405000]) # Create a design matrix X = np.vstack([sizes, np.ones(len(sizes))]).T # Use least squares to obtain the regression coefficients coefficients =