Difference between revisions of "TI-BASIC:Diagnosticon"
(Initial automated import) |
(Automated superscript correction) |
||
Line 13: | Line 13: | ||
}} | }} | ||
− | After the DiagnosticOn command is executed, all regression commands found in the STAT>CALC menu, as well as [[TI-BASIC:Linregttest|LinRegTTest]], will display the correlation statistics r and r² (or R | + | After the DiagnosticOn command is executed, all regression commands found in the STAT>CALC menu, as well as [[TI-BASIC:Linregttest|LinRegTTest]], will display the correlation statistics r and r² (or R<sup>2</sup> for regressions that are not linear). This is turned off by default, but there is no disadvantage whatsoever to turning it on. To reverse this command, execute the [[TI-BASIC:Diagnosticoff|DiagnosticOff]] command. |
The statistic r, known as the Pearson correlation coefficient, measures the strength and direction of any linear relationship in the data. If r is close to 1, then the relationship is strong, and positive (that is, the variables increase and decrease together). If r is close to -1, then the relationship is strong, and negative (that is, as one variable increases, the other decreases). If r is close to 0, there is no linear relationship. | The statistic r, known as the Pearson correlation coefficient, measures the strength and direction of any linear relationship in the data. If r is close to 1, then the relationship is strong, and positive (that is, the variables increase and decrease together). If r is close to -1, then the relationship is strong, and negative (that is, as one variable increases, the other decreases). If r is close to 0, there is no linear relationship. |
Latest revision as of 22:24, 24 February 2016
Command Summary
Changes settings so that the correlation variables, r and r² (or R²), are displayed when calculating a regression
Command Syntax
DiagnosticOn
Menu Location
Press:
- 2ND CATALOG to access the command catalog
- D to skip to commands starting with D
- Scroll down and select DiagnosticOn
(The DiagnosticOn command can't be found outside the catalog)
TI-83/84/+/SE
2 bytes
After the DiagnosticOn command is executed, all regression commands found in the STAT>CALC menu, as well as LinRegTTest, will display the correlation statistics r and r² (or R2 for regressions that are not linear). This is turned off by default, but there is no disadvantage whatsoever to turning it on. To reverse this command, execute the DiagnosticOff command.
The statistic r, known as the Pearson correlation coefficient, measures the strength and direction of any linear relationship in the data. If r is close to 1, then the relationship is strong, and positive (that is, the variables increase and decrease together). If r is close to -1, then the relationship is strong, and negative (that is, as one variable increases, the other decreases). If r is close to 0, there is no linear relationship.
The statistic r² or R², known as the coefficient of determination, is equal to the square of the above value (when it exists), and is also a measure of the strength of a relationship. Specifically, it represents the proportion of variance in the dependent variable that is accounted for by the regression model. If this value is close to 1, there is a strong relationship; if it's close to 0, there is either no relationship or the regression model is not appropriate for the data.
Advanced
Although these statistics are a good indication of whether a regression curve is good or not, they are not infallible. For example, the initial portion of data that actually correlates exponentially may well appear linear, and have a high correlation coefficient with a linear fit.
Another good way to check a regression curve is to look at the plot of the residuals vs. the x-values. If the regression curve is a good fit, then this plot should appear random in going from positive to negative. However, should you see a distinct pattern - say, if you tried a linear fit but the residual plot looks vaguely parabolic - you know you should try a different regression curve.
You should also consider what your regression line implies about the nature of the data, and vice versa. For example, if you're comparing the height of release of a ball to the time it takes to fall, a natural assumption is that the regression curve should pass through (0,0), and a curve that doesn't do that may be incorrect. However, take this advice with a grain of salt: if your curve fits the data points you put in but not such natural-assumption points, that may simply mean that the curve works on a limited domain. Or, it may mean your assumptions are wrong.
Command Timings
Although the correlation statistics are displayed with DiagnosticOn, they are calculated in either case. This means that DiagnosticOn and DiagnosticOff will not change how fast regressions are calculated.