ECON 3209 · Week 14, Lecture 3 · Kerala Agricultural University
Autumn 2026
By the end of this lecture, you will be able to:
numpy.polyfitscipy.optimize.curve_fitstatsmodelspolyfit / curve_fit\[AIC = n \ln\left(\frac{SSE}{n}\right) + 2k\] \[BIC = n \ln\left(\frac{SSE}{n}\right) + k\ln(n)\]
where \(SSE\) is the sum of squared errors and \(k\) is the number of estimated parameters.
We compare: - a linear fit - a quadratic fit - a nonlinear saturation curve
This is useful when modelling diminishing returns to fertilizer or technology adoption.
A common nonlinear form is
\[Y = \frac{aX}{b + X} + c\]
polyfitcurve_fitstatsmodels when you need regression tables and inference.numpy.polyfit for quick polynomial approximation.curve_fit for nonlinear functions that are not linear in parameters.The best model is not the fanciest one; it is the one that balances fit, interpretation, and economic plausibility.
✅ Python offers several complementary approaches to curve fitting.
✅ numpy.polyfit is convenient for linear and polynomial approximations.
✅ curve_fit handles genuinely nonlinear parameterizations.
✅ AIC and BIC help compare fit while penalizing extra complexity.
✅ Model choice should reflect both the data and the economics of the problem.
Course Next Step
We will cover: - review Weeks 10–14 as a connected block - see how these tools modify the basic OLS framework - prepare for later topics such as qualitative response and specification tests - practice interpreting models, not just running code
ECON 3209 — Kerala Agricultural University