## Introduction

Least squares problems fall into two categories: linear or
ordinary least squares and nonlinear least squares, depending
on whether or not the residuals are linear in all unknowns.
The linear least-squares problem occurs in statistical
regression analysis; it has a closed-form solution.

Non-linear least squares is the form of least squares analysis
used to fit a set of m observations with a model that is
non-linear in n unknown parameters (m ≥ n). It is used in
some forms of nonlinear regression.

In statistics, nonlinear regression is a form of regression
analysis in which observational data are modeled by a
function which is a nonlinear combination of the model
parameters and depends on one or more independent variables.
The data are fitted by a method of successive approximations
(iterations).

Using a spline Example

Using a Model/Function

## Project #1

Create a bell curve data set (x,y). Add a small random amount
to each y value. Fit a curve to the data. Plot the data points
and the curve.

## Equation for the X,Y Coordinates of a Bell Curve

Y = Ke^{-(X-M)2/(2σ2)}

X,Y | are the curve's x,y coordinates (used for plotting, etc.) |

K | is the maximum Y coordinate; used to scale the Y coordinates
(height in Y units) |

M | is the curve's mathematical mean
(X coordinate of the mean) |

σ | is the curve's standard deviation;
determines how fat or skinny the curve is (width in X units) |

e | is Euler's number; is a constant; is an irrational number
(defined in the Python **numpy** module and other libraries) |

*From: math.stackexchange.com*
## Links

Least squares
(Wikipedia)

Non-linear least squares
(Wikipedia)

Nonlinear Regression
(Wikipedia)

Python for Data Analysis - Using scipy for data fitting

Is there a way to plot a curve of best fit without function? Python