Linear Regression Standard Error

We're glad you came by, but you might find what you're looking for elsewhere.

TI-Basic Developer is not the site it once was. While its information on commands and other calculator features remains almost second-to-none, its forum, archives, and even hosting service, Wikidot, have been decaying for years. The calculator community would love to see what you're working on, or help you in your next coding adventure, but TI-Basic Developer is no longer the place to do it.

Instead, you should head over to Cemetech (primarily American) or TI-Planet (primarily international). Both are active, well-established forums with their own archives, chatrooms, reference material, and abundant coding tools and resources. We'll see you there, we hope.

Routine Summary

Calculates the standard error associated with linear regression coefficients.

Inputs

L₁ - values of the independent variable
L₂ - values of the dependent variable

Outputs

Ans - a 2-element list containing the standard errors

Variables Used

L₁, L₂,

Calculator Compatibility

TI-83/84/+/SE

:2-Var Stats
:LinReg(ax+b)
:a√((r²ֿ¹−1)/(n-2)){1,√(Σx²/n)}

This routine computes the standard error (uncertainty) associated with the linear regression coefficients a and ba and σb, respectively) for the regression equation y=ax+b. Precisely stated, the true value of the coefficient a is expected to be within the interval a±σa, and similarly for b.

The routine returns a two-element list; σa is the first element, and σb is the second element.

If one prefers to use the function LinReg(a+bx) instead of LinReg(ax+b), the appropriate routine is:

:2-Var Stats
:LinReg(a+bx)
:b√((r²ֿ¹−1)/(n-2)){√(Σx²/n),1}

(note that the meanings of σa and σb have now interchanged).

In both routines, r², a, b, n, and Σx² are statistical variables.

Formulas

For the fitting equation y=ax+b,

(1)
\begin{align} \definecolor{darkgreen}{rgb}{0.90,0.91,0.859}\pagecolor{darkgreen} \begin{align*} \sigma_a&=a\sqrt{\frac{\frac1{r^2}-1}{n-2}} \\ \sigma_b&=\sigma_a\sqrt{\frac{\Sigma x^2}{n}} \end{align*} \end{align}

where n is the number of data points, r² is the coefficient of determination, and Σx² is the sum of squares of the independent variable values.

Error Conditions

Reference

Lichten, William. Data and Error Analysis., 2nd. ed., Prentice Hall: Upper Saddle River, NJ, 1999.

.

Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-Noncommercial 2.5 License.