Log Mode

Enabling log mode changes the strategy that the calculator uses to fit regression parameters. By default, regression parameters are chosen to minimize the sum of the squares of the differences between the data and the model predictions. When log mode is enabled, a transformation that makes the model linear is applied to both the data and the model before fitting the parameters.

Log Mode Enabled With Exponential Equation. Screenshot.

 

Log mode can be enabled for models of the following forms:

  • Exponential: \(y_{1}\sim ab^{x_{1}}\), \(y_{1}\sim a\exp\left(bx_{1}\right)\), \(y_{1}\sim2^{ax_{1}+b}\)
  • Power Law: \(y_{1}\sim ax_{1}^{b}\)
  • Logarithmic: \(y_{1}\sim a\ln\left(x_{1}\right)+b\)

When log mode is enabled, the \(r\) and \(r^{2}\) statistics are calculated according to the transformed data, but the residuals are calculated according to the untransformed data.

Compatibility with other tools

Several other math software systems use procedures similar to log mode by default. For example, TI calculators use logarithmic transformations for ExpReg, PwrReg, and LnReg, Geogebra uses logarithmic transformations for FitExp, FitGrowth, FitLog, and FitPow, and Excel uses logarithmic transformations in its Exponential, and Power regression lines. Enabling log mode in Desmos makes it easier to compare answers with these other systems.

Why doesn't Desmos use log mode by default?

Many math software systems only allow regressing a handful of models and have different function names for each model, for example, ExpReg, PwrReg, LnReg, etc.

Desmos is significantly more flexible: any relation between lists of data can be used as a regression model. For example, after regressing a model of the form

\(y_{1}\sim ax_{1}^{b}\)

you can immediately check the effect of adding a constant by changing the model to

\(y_{1}\sim ax_{1}^{b}+c\)

The first model can be linearized by a logarithmic transformation, but the second model cannot. Desmos defaults to using least squares regression without transforming the data so that the procedure used to fit these two models is the same.

 

Learn More

Please write in with any questions or feedback to support@desmos.com.