Difference between revisions of "TI-BASIC:Linreg Error"

From Learn @ Cemetech
Jump to navigationJump to search
(Initial automated import)
 
Line 35: Line 35:
 
For the fitting equation ''y''=''a''//x''+''b'',
 
For the fitting equation ''y''=''a''//x''+''b'',
  
[[TI-BASIC:Math|Math]]
+
<math>
 
\definecolor{darkgreen}{rgb}{0.90,0.91,0.859}\pagecolor{darkgreen}
 
\definecolor{darkgreen}{rgb}{0.90,0.91,0.859}\pagecolor{darkgreen}
 
\begin{align*}
 
\begin{align*}
Line 41: Line 41:
 
\sigma_b&=\sigma_a\sqrt{\frac{\Sigma x^2}{n}}
 
\sigma_b&=\sigma_a\sqrt{\frac{\Sigma x^2}{n}}
 
\end{align*}
 
\end{align*}
[[TI-BASIC:/math|/math]]
+
</math>
  
 
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.
 
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.
Line 51: Line 51:
 
= Reference =
 
= Reference =
  
Lichten, William. ''Data and Error Analysis''., 2nd. ed., Prentice Hall:  Upper Saddle River, NJ, 1999.[[Category:TI-BASIC]]
+
Lichten, William. ''Data and Error Analysis''., 2nd. ed., Prentice Hall:  Upper Saddle River, NJ, 1999.
 +
[[Category:TI-BASIC]]
 
[[Category:TIBD]]
 
[[Category:TIBD]]

Revision as of 19:17, 24 February 2016

File:@@

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 Author

@@Authors

@@URL: [@@] Download

[@@]

: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 b (σ,,a,, and σ,,b,,, respectively) for the regression equation y=a//x+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=a//x+b,

<math> \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*} </math>

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.