Linear Regression — Linearisable Models
Fit your (x, y) dataset by least squares: linear, exponential, logarithmic, or power — with R², RMSE, and a LaTeX-rendered equation.
1.986
a0.1
b0.9993
fit0.09258
y unitsFit your (x, y) dataset by least squares: linear, exponential, logarithmic, or power — with R², RMSE, and a LaTeX-rendered equation.
1.986
a0.1
b0.9993
fit0.09258
y unitsLinear regression is the workhorse method for describing the relationship between two numerical variables. It assumes y depends on x proportionally. We pick the line that best represents the trend by reducing the accumulated squared error of all points to its minimum.
General Model
Residual Minimization
We seek the estimators a and b that make the vertical distances (residuals) between each observed datum and the curve as small as possible.
Since regression (or Ordinary Least Squares) is a strictly quadratic problem, it has a closed-form analytical solution calculated from the means and variances of descriptive statistics; meaning, it does not require an iterative approximation to deduce the coefficients:
Slope (a)
Intercept (b)
Although born as a straight-line method, it is possible to adapt families of curves (such as exponential growth, decay, or logarithmic saturation) so that they are solved as a classical regression plane. This is achieved by introducing logarithms in the independent axis, the dependent one, or both.
Distorted Error Consideration: By clearing using logarithms, we convert a curve fit into traditional least squares on transformed variables. The constraint here is that the organic error structure is deformed; statistically giving a different weight to outliers than they correspond to on the natural linear scale.
Every model needs tools to validate how closely the synthetic numbers describe the natural case: R-Squared () and the Root Mean Square Error ().
indicates that the model explains almost all the variability of your data; instead, an R² close to 0 will mathematically warn you about the inability of the algorithm to predict on that point cloud.
On the other side, rescues the idea measuring in "the same units as y". So the evaluator has a natural physical human understanding of the average error.
Beyond the coefficients, it is worth asking how much confidence they deserve. The standard error of the slope measures its uncertainty; the statistic and its p-value test the null hypothesis that the true slope is zero (no relationship). A small p-value (< 0.05) means the observed trend is unlikely to be due to chance. The 95% confidence interval bounds the plausible range of each coefficient.
Standard error
t statistic
95% CI
The Residuals tab plots the gap between each data point and the line: if the fit is good, residuals scatter randomly around zero, with no pattern or funnel shape. Points that stray too far from the trend (studentized residual ) are flagged as outliers; they are worth reviewing, as they may be measurement errors or genuinely different cases.
Which space it is measured in. R² and RMSE are reported in the original variables (what you see on the chart). Inference (standard error, p-value, CI) is computed in the linearised space , where least squares assumes constant, normal error. For the non-linear modes, then, the significance and intervals refer to the already-transformed model, not to the coefficients in their original form.
The four modes above are special cases of one idea: transform one or both axes until the relationship becomes a straight line, fit by least squares in that transformed plane, and read off the slope and intercept . The Custom mode lets you choose those transforms freely. Match the mathematical form of your model in the table and apply the corresponding transform — the module assumes no domain: you write the axis labels yourself to document your experiment.
| If your model has the form… | Transform x | Transform y | Resulting linear equation |
|---|---|---|---|
| identity | identity | (= Linear) | |
| identity | (= Exponential) | ||
| identity | (= Logarithmic) | ||
| (= Power) | |||
| identity | |||
| identity | |||
| identity | |||
| identity |
Separable linearisations only. Each axis is transformed independently (x by a function of x, y by a function of y). Linearisations where one axis mixes both variables at once fall outside this mode and require nonlinear regression.
Careful with . Squaring is not globally invertible: returning to original variables assumes the positive branch (). As with logarithms, transforming the axes distorts the error structure, weighting outliers differently than the original scale.
Automatic domain cropping. When using transforms like or , the module will automatically ignore points that fall outside the valid mathematical domain (for example, ) to avoid errors.