Overview
Univariate regression is an area of curve-fitting which, given a function

depending on some parameters, finds the parameters such that

provides the best fit to a series of two-dimensional data points, in a certain sense. It is called univariate as the data points are supposed to be sampled from a one-variable function. Compare this to multivariate regression, which aims at fitting data points sampled from a function of several variables.
Formally speaking, consider a series of

data points

and, for the sake of simplicity, consider that

, i.e. the points are distinct and are in increasing order with respect to

. By doing least squares fitting on these data points we mean finding the parameters

of a function
![f_{\displaystyle \alpha_1, \alpha_2, \ldots, \alpha_k} : [x_1, x_n] \to \mathbb{R}](/images/eqns/0938075d157df003b121f44fedcd0923.gif)
such that the sum of squared residuals
is minimized. Provided that

depends linearly on its parameters, the method is called
linear regression, otherwise it is called
nonlinear regression. For example, straight line regression, parabolic regression and polynomial regression are all linear regression models since the function

is of the form
which clearly depends linearly on its parameters. As opposed to this, logistic regression, for example, is a nonlinear regression model since the fitting function is of the form
which is a nonlinear function of

and

.
In the following, let us consider each case and briefly explain how the corresponding optimal parameters can be derived.