The regression analysis is used for determining or estimating model parameters. The starting point are measured values and a model that the measured values should be based on. Since the measured values generally subject to fault optimizes the regression analysis, the model parameters to optimal adaptation. The basic procedure is the method of least squares.
The method of least squares, a method of compensation calculation. With the method, an optimum compromise is calculated, in which the squares of the deviations are minimized by the model function.
With respect to the measured values (xi, yi) and the model function f is the quadratic deviation is minimized. To achieve this, the parameters ai of the model function are determined so that the following condition is satisfied.
For the determination of the regression line is a linear model function f is used for the least squares method.
The deviation of the regression line to the measured values is then given as follows.
The goal now is the sum of squares of the deviations from a straight line r to make as small as possible.
The extremum is determined by the partial derivatives with respect to a 0 and a be set 1 zero.
The resolution of the equation system provides the parameters a0 and a1 of the regression line.
Online-Calculator:
Online-Calculator: Fitting linear lineIf the measured values is an exponential relationship is based can also be used for the best fit straight line linear model. Therefore it is necessary to take the logarithm, the measured values, because then gives a linear equation by substitution.
Logarithm leads to a linear equation.
With the logarithm of measured values y' and the substitutions a' = ln a and b'= ln b is present, the linear model.
The approximation of a power function is performed by returning to the linear model function.
Logarithm leads to a linear equation.
With the logarithmic measurement values y' and the substitutions a' = ln a and x' = ln x is the linear model before.
Online-Calculator:
Online-Calculator: Power functionThe Gaussian distribution or normal distribution is defined as follows:
The fitting of the Gaussian distribution to the measured values takes place by forming the weighted mean value of the measured values. The weighted mean value corresponds to the μ In the Gaussian distribution. The standard deviation of the measured values from the mean value is the σ in the normal distribution.
Online-Calculator:
Online-Calculator: Normal distribution Normal Distribution PlotMeasured values can also be approximated by the periodic functions. The procedure for this is the development of a Fourier series. The elements of the Fourier series are sine and cosine functions. The development takes place in ascending order of frequencies.
The Fourier series is:
with the Fourier coefficients ak und bk and ω = 2π/T. This is the period T = b - a with the initial interval a and the end of interval b.
The Fourier coefficients ak und bk satisfy the least squares condition for the associated sine or cosine function. The coefficients are calculated as follows.
Online-Calculator:
Online-Calculator: Fourier approximationThe linear approximation problem is solved by the QR decomposition. The calculator determines the coefficients of the n-th degree polynomial.
The starting point is the over-determined system of equations:
The QR decomposition leads to the factorization of the matrix A:
This applies to the compensation problem:
here R and Q are reduced to the relevant proportion. That is, R* is the upper triangular matrix of R and QT* contains the corresponding rows of Q.
Replacing A by the Vandermond matrix with the corresponding measured values xi and b by the measured values yi yields the coefficients of the compensating polynomial as the solution of the equation system.
Online-Calculator:
Online-Calculator: Polynomial fittingThe arithmetic means
Standard deviation from the mean
For the standard deviation of the regression line of the average value of x of the relevant function value of the straight line is to be replaced.
The weighted average μ is formed by multiplying the measured values by their respective weight yi.
In the standard deviation, the respective weights yi must also be considered.
Here is a list of of further useful sites:
The Online-Calculator The online calculator performs a least squares compensation calculation for the following functions: Equalization line, power approximation, equalization polynomial, normal distribution and Fourier approximation. The input of the measured values can be done with a table or alternatively the data can be read in from a file. The parameters of the compensation function are calculated and the function is displayed graphically.
Online-Calculator:
Curve fitting for: linear line, power function, polynomial, normal distribution, Fourier series Fourier series calculatorList of further sites:
Index Trigonometric calculations Normal Distribution Plot NxN Gauss method Derivation rules