How to use Curve Fit Online Tool?
This is an online tool for curve fitting.
1. Type X and Y values. You can add rows to the table by using the button below the table.
2. Choose fit method using the dropdown menu.
3. Results are generated automatically.
- export the report to PDF using "GENERATE PDF" button.
- export the report to TXT using "EXPORT TXT" button.
- manipulate diagram (for example zoom in or out)
- save diagram as PNG.
Curve Fitter Documentation
Table of contents
- Fit methods
- Least squares method
- Measures of goodness
Linear fit (linear regression calculator)
It is a type of statistical method used to find a linear relationship between two variables - independent and dependent one. This method is also called "simple linear regression". There is also multiple linear regression - when the linear relationship is to be found between more than one independent variables and one dependent variable.
The best-fitting line is obtained by minimizing the sum of the squared errors, that is differences between the predicted and the actual values.
Chart of regression line fitted to data
a - intercept
b - slope
x - independent variable
y - dependent variable
You can use our tool as linear regression calculator by choosing "Linear fit" from the dropdown menu ("Choose fit method"). The calculator will automatically determine the regression equation with coefficients.
How to calculate linear regression?
The regression coefficient b is given by:
and a is calculated in terms of b as
The relationship between the independent variable x and the dependent variable y is in the form of an nth degree polynomial of x.
Polynomial regression can so be categorized as follows for n from one to three:
- Linear – if degree is 1. The equation of fit curve is:
- Quadratic – if degree is 2. The equation of fit curve is:
- Cubic – if degree is 3. The equation of fit curve is:
and so on. The order of polynomial can be generally n.
Illustration of 4th order polynomial fit
In exponential regression the following equation is used:
An exponential function is used to describe processes with rapid growth of decay of some quantity. Examples include growth of bacteria, radioactive decay, chemical reaction kinetics.
Exponential fit illustration
The following function is used for the fitting:
Four parameters logistic regression
Four parameters logistic regression (4PL) is often used in modelling of many biological systems. As the result of fitting, S shaped curve is obtained. The formula used for fitting is following:
a - the minimum value that can be obtained (y at at x = 0)
b - Hill’s slope of the curve
c - the point of inflection (i.e. the point on the curve halfway between a and d)
d - the maximum value that can be obtained (y at at x tending to infinity)
Least squares method
Least squares method is a mathematical procedure for finding the best-fitting curve to a given set of points. It is based on minimizing the sum of the squares of the the residuals of the points from the curve (SSE - Sum of Squared Error). The sum of squared errors is defined as:
- value of y at point i
- predicted value of y at point i
The function SSE is minimized to find the best fit line.
The condition for SSE to be a minimum is:
for i = 1,...,n
Measures of goodness
Coefficient of determination also denoted is a statistical measure which shows how well the regression model fits the data. It represents the proportion of variance in the dependent variable that can be explained by the independent variable. The formula for calculating is:
Typically, is in the range of 0 and 1. A higher value (closer to one) imply that more variation is explained by the model. An of 1 indicates that the model predictions perfectly fit the observed data. It is worth to note that the coefficient of determination is the square of the correlation coefficient.
Sum of Squared Errors (SSE)
The sum od squared errors is defined as:
The value of SSE is minimized in order to find coefficients of a best-fitting curve.