Inferential Statistics Utilities for TI-83/84
Copyright © 2008–2009 by Stan Brown, Oak Road Systems
Copyright © 2008–2009 by Stan Brown, Oak Road Systems
In the STAT TESTS menu, your TI-83 or TI-84 has
quite a range of inferential statistics procedures, but you need a few
additional ones. This page presents a
downloadable TI-83/84 program that fills in the gaps with
additional confidence intervals, hypothesis tests, and computations of
needed sample size. See the Overview below for a
full list.
Note: You may need only some of these utilities for class. Check your course materials to see which procedures you need.
Contents:
MATH200I Program Overview:
Getting the Program |
Using the Program
MATH200I Program OverviewThe Inferential Statistics Utilities program,
MATH200I, fills in some gaps in the TI-83’s or
TI-84’s coverage of inferential statistics. Check your class
requirements to determine which of these utilities you’ll need.
Program change: At the end of the Fall 2009 semester, this program and MATH200D will be withdrawn, replaced by MATH200 Utilities for TI-83/84 and Extra Statistics Utilities for TI-83/84. This will be simpler for TC3 students, with all the required utilities in one program and all the optional utilities in the other.
There are three methods to get the program into your calculator:
2nd x,T,θ,n makes LINK]
[►] [ENTER], and then on hers press
[2nd x,T,θ,n makes LINK] [3], select MATH200I,
then press [►] [ENTER].If you have a TI-83 Plus or Silver Edition, the above program version is fine for you and you should ignore this Special Note. But if you have the original TI-83, without a Plus or Silver designation, then this note applies to you.
Instead of the MATH200I program, you need M200I83. If transferring it from a colleague’s calculator, check the program name carefully. If you’re getting the program from the MATH200I.ZIP file, you need MATH200I_for_original_TI83.83P.
The two versions are functionally identical, but the “original TI-83” version uses all capital letters for prompts and displays because the original TI-83 couldn’t handle lower case in programs. (ρ and σ are replaced with RHO and σx for the same reason.) This Web page shows all screens from the TI-83 Plus or TI-84 version, because most students have a calculator that can handle it.
Press the [PRGM] key. If you can see MATH200I
in the menu, press its number; otherwise, scroll to it and press
[ENTER]. When the program name appears on your home screen,
press [ENTER] to run it.
The menu at right shows what the program can do:
Sample size:
find
the necessary sample size for a given confidence level and margin
of error for binomial data (one or two populations) or numeric data
(with population standard deviation σ known or unknown)Infer about σ:
hypothesis tests and confidence intervals for
population standard deviation and varianceGoF test:
test goodness of fit for categorical data in one
populationCorrelatn inf:
hypothesis tests and confidence intervals
for the linear correlation of a population; the hypothesis test for
correlation doubles as a hypothesis test for slope of the regression
lineRegression inf:
confidence intervals for slope of the
regression line, y intercept, and ŷ for a particular x, plus
prediction intervals for ŷ for a particular xCritical t:
find the t value that cuts the
distribution with a given probability in the right-hand tailCritical χ²:
find the χ² value that cuts the
distribution with a given probability in the right-hand tailEach procedure leaves its results in variables in case you want to use them for further computations. Please see the reference section below.
See also: How Big a Sample Do I Need? gives the statistical concepts with examples of calculation “by hand”.
Before you start gathering data, you plan for how large a sample you will need. This depends on your desired margin of error and confidence level, and on the type of the data and your prior estimates. The first utility selection pulls all this together for you for the most common cases.
When you run the MATH200I program and select
1:Sample size, you are prompted first for the desired
confidence level, then for the type of data, and finally for the
maximum margin of error and prior estimate. The program can find the
necessary sample size for binomial data for one or two populations, or
for numeric data for one population whether the population standard
deviation σ is known or not. (At present the program
can’t find sample size for numeric data for two populations.)
Caution: There are other criteria for sample size. For example, with numeric data your sample should be at least 30 unless you know that the population is normally distributed. Always check that your sample will meet the requirements before you begin gathering data.
The key here is whether you know the standard deviation of the population or not. If you don’t know σ, as usually you don’t, then you use s but the computation of sample size is different
Example 1—numeric data with known σ.
You want to estimate the average hourly output of a
machine to within ±1.5, with 90% confidence. Based on
historical data, you have reason to believe that the standard
deviation of the machine’s hourly output is 6.2. How large a
sample do you need?
Solution: Note first that this is not a realistic situation. It’s pretty unlikely that you would know the standard deviation of a population but not know the mean of that population. However, statistics texts always begin with this case because it’s the simplest way to demonstrate the principles. You leave Perfectland and enter Realityville in the other cases. With that said—
Marshal your data: 1−α = .90,
E = 1.5, and σ = 6.2.
Run the MATH200I program and select
1:Sample size. Enter .9 or 90 for C-Level, and in the
sub-menu select 1:Num known σ. Enter E and
σ. The output screen echoes back your inputs and tells you the
critical z for that confidence level as well as the minimum necessary
sample size.
Conclusion: If the standard deviation of the population is 6.2, then to get a 90% confidence interval about the population mean μ with a margin of error no greater than 1.5, you need a sample of at least 47.
Example 2—numeric data with unknown σ
This is the realistic case for estimating a population
mean. Usually you don’t know the standard deviation of the
population, and you make a small pilot study to estimate it or you use
a prior estimate.
The MATH200I program uses the method shown in
Sample
Sizes Required in NIST/SEMATECH e-Handbook of Statistical
Methods (link verified 2007-08-23).
Here’s a modified form of the previous example. You want to estimate the average hourly output of a machine to within ±1.5, with 90% confidence. A small pilot study finds a sample standard deviation of the machine’s hourly output is 6.2. How large a sample do you need?
Solution:
Marshal your data: 1−α is .90,
E is 1.5, and s (not σ) is 6.2.
Run the MATH200I program and select
1:Sample size. Enter .9 or 90 for C-Level as
before, but in the
sub-menu select 2:Num unknown σ. Enter E and
s. There may be a delay, because the program must compute one
or more inverse t numbers.
The output screen echoes back your inputs and tells you the
critical t as well as the minimum necessary
sample size.
Conclusion: If you don’t know the standard deviation of the population, but you have a prior sample with a standard deviation of 6.2, then to get a 90% confidence interval about the population mean μ with a margin of error no greater than 1.5, you need a sample of at least 49.
The program helps you find the sample size for estimating a population proportion p (some books use π) for binomial data. Use a prior estimate p̂ in this computation if you have one; if you have no idea of the population proportion then use 0.5.
Example 3—binomial data for one population, with prior estimate
What percent of the voters would vote for your
candidate if the election were held today? You want 95% confidence in
your answer, with a margin of error no more than 3.5%. Last
month’s poll showed your candidate had 42% support. How many
voters do you need to survey?
Solution: Here you have 1−α = 0.95,
E = 0.035 (careful! not 0.35), and p̂ = 0.42.
(When you have a prior estimate, use it; otherwise use 0.5.)
Run the MATH200I program and select
1:Sample size. Enter .95 or 95 for C-Level, then select
3:Binomial in the sub-menu. Enter your margin of error and
your prior estimate, and you get the output screen shown at right.
Conclusion: If the true population proportion is somewhere in the neighborhood of 42%, and you want a 95% confidence interval with a margin of error no more than 3.5%, you’ll need a sample of at least 764.
Example 4—binomial data for one population, with no prior estimate
Suppose you didn’t have any idea of the proportion of the
population that planned to vote for your candidate? In that case,
you’d use 0.5 for your prior estimate, and you’d have the
output shown at right. The necessary sample size would rise to
784.
With binomial data for two populations, you compute necessary sample size to estimate the difference between the two proportions. This is different from the sample size needed to estimate the proportion in either population on its own.
It’s not actually necessary to have the two sample sizes equal, but that’s the only way it’s possible to compute them when neither one is specified up front. Just as before, use prior estimates for the population proportions if you have them, and otherwise use 0.5.
Example 5—binomial data for difference of two population proportions, with prior estimates
Suppose you’d like to know how your candidate’s
support differs between men and women. You know that overall support
is 42%, and you think the candidate is 10 percentage points more
popular among women versus men. How many of each sex must you
survey to answer the question with 95% confidence and a margin of
error no more than 3½%?
Do you have an estimate of p1 and p2? Yes, since the overall support is 42% you expect that men’s and women’s support is not too different from that. If women are 10% higher, then you estimate women at 47% and men at 37%.)
Solution: Here you have 1−α = 0.95,
E = 0.035, p̂1 = 0.47, and
p̂2 = 0.37.
Run the MATH200I program and select
1:Sample size. Enter .95 or 95 for C-Level, then select
4:2 pop binomial in the sub-menu. Enter your margin of error and
your prior estimates, and you get the output screen shown at right.
Conclusion: If the true population proportions are somewhere in the neighborhood of 47% and 37%, and you want a 95% confidence interval on the difference with a margin of error no more than 3½%, you’ll need a sample of at least 1513 women and 1513 men.
Example 6—binomial data for difference of two population proportions, with no prior estimates
And suppose this was the first poll and you had no idea of your
candidate’s support among women and men? In that case you use
0.5 for both p̂1 and p̂2, with the results shown at right.
With no prior estimate, you’d need 1568 women and 1568 men to
get a 95% confidence interval on the difference in support, with only
a 3½% margin of error.
This part performs hypothesis tests and computes confidence intervals for the standard deviation of a population. Since variance is the square of standard deviation, it can also do those calculations for the variance of a population.
The tests on standard deviation or variance of a population require that the underlying population must be normal. They are not robust, meaning that even moderate departures from normality can invalidate your analysis. See Descriptive Statistics Utilities part 7 for procedures to test whether a population is normal by testing the sample.
Outliers are also unacceptable and must be ruled out. See Descriptive Statistics Utilities part 2 for an easy way to test for outliers.
See also: Inferences about One Population Standard Deviation gives the statistical concepts with examples of calculation “by hand” and in an Excel workbook.
You already know how to test the mean of a population with a t test, or estimate a population mean using a t interval. Why would you want to do that for the standard deviation of a population?
The standard deviation measures variability. In many situations not just the average is important, but also the variability. Another way to look at it is that consistency is important: the variability must not be too great.
For example, suppose you are thinking about investing in one of two mutual funds. Both show an average annual growth of 3.8% in the past 20 years, but one has a standard deviation of 8.6% and the other has a standard deviation of 1.2%. Obviously you prefer the second one, because with the first one there’s quite a good chance that you’d have to take a loss if you need money suddenly.
Industrial processes, too, are monitored not only for average output but for variability within a specified tolerance. If the diameter of ball bearings produced varies too much, many of them won’t fit in their intended application. On the other hand, it costs more money to reduce variability, so you may want to make sure that the variability is not too low either.
To use the program, first check the requirements for your
sample; see Cautions above.
Then run the MATH200I program and press [2] for
Infer about σ.
When prompted, enter the standard deviation and size of the sample,
pressing [ENTER] after each one. If you know the variance of
the sample rather than the standard deviation, use the square root
operation since s is the square root of the variance s² (see
example below).
The program then presents you with a five-item menu: confidence interval for the population standard deviation σ, confidence interval for the population variance σ², and three hypothesis tests for σ or σ² less than, different from, or greater than a number. Make your selection by pressing the appropriate number.
If you select one of the confidence intervals, the program will
prompt you for the confidence level and then compute the interval.
Because this involves a process of successive approximations, it can
take some time, so please be patient.
The program displays the endpoints of the interval on screen
and also leaves them in variables L and H in
case you want to use them in further calculations. You can include
them in any formula by pressing [ALPHA ) makes L] and [ALPHA ^ makes H].
If you select one of the hypothesis tests, the program will
prompt you for σ, the population standard deviation in the
null hypothesis. If your H0 is about population variance
σ² rather than σ, use the square root symbol to
convert the hypothetical variance to standard deviation.
The program then displays the χ²o test statistic, the
degrees of freedom, and the p-value. These are also left in variables
X, D, and P in case you wish to use
them in further calculations. You can include them in any formula with
[x,T,θ,n], [ALPHA x-1 makes D], and [ALPHA 8 makes P].
Example 1: A machine packs cereal into boxes, and you require a standard deviation of no more than five grams. You randomly select and weigh 45 boxes and find a sample standard deviation of 6.2 grams. Is the machine operating within specification?
You have tested the sample and find that it is normally distributed with no outliers, so you are confident that the population is also normally distributed.
Solution: n = 45, s = 6.2, σo = 5. Your hypotheses are
H0: σ ≤ 5, the machine is within spec (some books would say H0: σ=5)
H1: σ > 5, the machine is not working right
No α was specified, but for an industrial process with no possibility of human injury α = 0.05 seems appropriate.
Run the MATH200I program and select
2:Infer about σ. Enter s:6.2 and
n:45, and select 5:Test σ>const. Enter 5
for σ in H0.
The results are shown at far right. The test statistic is χ²o = 67.65 with 44 degrees of freedom, and the p-value is 0.0125.
Since p<α, you reject H0 and accept H1. At the 0.05 level of significance, the population standard deviation σ is greater than 5, and the machine is not operating within specificaton.
Example 2: You have a random sample of size 20, with a standard deviation of 125. You have good reason to believe that the underlying population is normal, and you’ve checked the sample and found no outliers. Is the population standard deviation different from 100, at the 0.05 significance level?
Solution: n = 20, s = 125, σo = 100, α = 0.05. Your hypotheses are
H0: σ = 100
H1: σ ≠ 100
This time in the INFER ABOUT σ menu you select
4:Test σ≠const.
Results are shown at right. χ²o = 29.69 with 19 degrees of freedom, and the p-value is 0.1118.
p>α; fail to reject H0. At the 0.05 significance level, you can’t say whether the population standard deviation σ is different from 100 or not.
Example 3: Of several thousand students who took the same exam, 40 papers were selected randomly and statistics were computed. The standard deviation of the sample was 17 points. Estimate the standard deviation of the population, with 95% confidence. (Recall that test scores are normally distributed.)
Solution:
Check the data and make sure there are no outliers.
Run MATH200I and select [2] in the first
menu. Enter s and n, and in the second menu select
1:σ interval with a C-level of 95 or .95.
The results screen is shown at right.
Conclusion: You’re 95% confident that the standard deviation of test scores for all students is between 13.9 and 21.8.
Remark: The center of the confidence interval is about 17.9, which is different from the point estimate s=17. This is a feature of confidence intervals for σ or σ²: they are asymmetric because the χ² distribution used to compute them is asymmetric.
Example 4: Heights of U.S. males aged 18–25 are normally distributed. You take a random sample of 100 from that population and find a mean of 65.3 in and a variance of 7.3 in². (Remember that the units of variance are the square of the units of the original measurement.)
Estimate the mean and variance of the height of U.S. males aged 18–25, with 95% confidence.
Solution for mean:
Computing a confidence interval for the mean is a straightforward
TInterval. Just remember that for Sx the
calculator wants the sample standard deviation, but you have the
sample variance, which is s². Therefore you take the square root
of sample variance to get sample standard deviation, as shown in the
input screen at near right.
The output screen at far right shows the confidence interval. You’re 95% confident that the mean height of U.S. males aged 18–25 is between 64.8 and 65.8 in.
Solution for variance:
Run the MATH200I program and select
2:Infer about σ. Enter s:√7.3 and n:100.
Select 2:σ² interval and enter C-Level:.95 (or
95). The program computes the confidence interval for population
variance as 5.6 ≤ σ² ≤ 9.9.
Notice that the output screen shows the point estimate for variance, s²,
and that as expected the confidence interval is not symmetric.
You’re 95% confident that the variance in heights of U.S. males aged 18–25 is between 5.6 and 9.9 in².
Complete answer: You’re 95% confident that the heights of U.S. males aged 18–25 have mean 64.8 to 65.9 in and variance 5.6 to 9.9 in².
The goodness-of-fit or GoF test determines how well a multinomial model (more than two categories) matches the sample data. You have to sum up the χ² contributions of all the cells. Those are found by using the formula
(Observed − Expected)² / Expected
where the Expected numbers themselves are found by
Model × ∑Observed / ∑Model
The TI-83 does none of those computations; the TI-84 computes
χ² contributions but only after you compute the Expected
numbers. The MATH200I program does all the
computations.
Before running the MATH200I program,
put your model in L1 and your Observed numbers in L2.
Then run MATH200I
and select 3:GoF test. The program will ask you to confirm
that you’ve filled the two lists, and then it will perform all
computations for the χ² goodness of fit and show the results on
a graph. The Expected numbers are left in L3, and you should
verify that they meet the requirements for a χ² test:
none of them <1, and no more than 20% of them <5.
Example 1 from Sullivan, Michael, Fundamentals of Statistics (Pearson Prentice Hall, 2008), Example 3, pages 555–556.
| Region | 2000 Census | current sample |
|---|---|---|
| Northeast | 19.0% | 274 |
| Midwest | 22.9% | 303 |
| South | 35.6% | 564 |
| West | 22.5% | 359 |
“An urban economist wonders if the distribution of residents in the United States is different today than it was in 2000. In 2000,” the proportions were as shown in the table. “The economist randomly selects 1500 households and obtains the frequency distribution shown. ... Conduct the appropriate test to determine if the distribution of residents in the United States is different today from the distribution in 2000, using the α = 0.05 level of significance.”
Solution: H0 is that the model is still good, and H1 is that the distribution of U.S. population has changed. The model is the percentages shown, and you are determining whether the current sample is enough different from the model for you to conclude that the model is no longer correct.
Put the percentages in L1; there’s no need to convert
them to decimals but if you do then you must convert all of them. The
current sample is the Observed numbers, and they go in L2. Run
the MATH200I program, select 3:GoF test, and
press [9] to confirm that you have data in the correct lists.
Caution: The Observed numbers must always be actual counts; never convert them to percentages.
Caution: Some problems will show totals, but you never enter the totals in your calculator.
The results screen is shown at right. The χ² test statistic is
8.25, with three degrees of freedom (four categories minus one). The
p-value is 0.0410.
Conclusion: Since p<α, you reject H0 and accept H1. At the 0.05 level of significance, you conclude that the regional distribution of U.S. residents is different today from what it was in 2000.
Note: Your book rounds its calculations at various stages, so its χ² test statistic may be slightly less accurate than yours. Your book also uses tables to look up p-values, where your calculator uses a more accurate method of computation. So don’t worry if your numbers don’t match the book’s exactly.
The screen also reminds you to check L3, the
Expected numbers, to make sure that the requirements for a χ²
test are met. In fact, there’s useful information in L3 through
L5, as shown at right.
L3 contains the expected numbers. Always check them after the computation to make sure that none of them are below 1 and no more than 20% of them are below 5. Here, all are well above 5.
L4 is the absolute differences between Observed and Expected. For instance, in the first category the Observed number was 11 below what would be expected if H0 is exactly true. Of course, it’s highly unusual for Observed numbers to match Expected numbers exactly. The question is how far off the numbers are, taking into account the weights of Expected numbers in the model. That’s what L5 shows, namely each category’s contribution to χ². You can see that the most important deviation is in the second category (4.78), and the least important is in the first category (0.42). The total of L5 is the χ² test statistic.
Example 2—equal frequencies from Sullivan, Michael, Fundamentals of Statistics (Pearson Prentice Hall, 2008), Example 4, pages 556–558.
| Sample of Birth Records | |
|---|---|
| Day of Week | Freq- uency |
| Sunday | 57 |
| Monday | 78 |
| Tuesday | 74 |
| Wednesday | 76 |
| Thursday | 71 |
| Friday | 81 |
| Saturday | 63 |
“An obstetrician wants to know whether or not the proportion of children born each day of the week is the same. She randomly selects 500 birth records and obtains the data shown.” Clearly the frequencies in the sample vary from day to day, but do they vary enough that you can say babies in general are born with different frequencies on different days, at the 0.05 level of signifcance?
Solution: H0 is that babies are born with equal frequency on all days of the week, and H1 is that they are not. You’re not given a numerical model because “equal frequencies” means that all model numbers are the same. Since there are seven categories, your model is seven 1’s in L2. The Observed numbers go in L2, as usual.
The results are shown at right. Here df = 6 because there
are seven categories. The χ² test statistic is 6.18, and the
p-value is 0.4029. That is greater than α, and so you fail to
reject H0.
Writing non-conclusions is problematic when p>α in a χ² test. Strictly speaking, the conclusion should be in neutral language as usual: you can’t determine from the data whether babies are born with equal frequency on all the days of the week or not. But traditionally, the conclusion is often stated in some words equivalent to “the data do not rule out the model”.
This is the scientific method. If the experiment is repeated multiple times and H0 is never rejected, we begin to have more and more confidence that H0 is actually true. We can’t accept H0 from a single experiment, but the more times it’s not rejected, the more we believe that it may never be rejected.
With linear correlation, you compute a sample correlation
coefficient r. But what can you say about the correlation in the
population, ρ? The MATH200I program
computes a confidence interval about ρ or performs a hypothesis
test to tell whether there is correlation in the population.
See also: Inferences about Linear Correlation gives the statistical concepts with examples of calculation “by hand” and in an Excel workbook.
To perform inferences about linear regression, first load your
x’s and y’s in any two statistics lists. Then run
the MATH200I program and select 5:Regression inf.
Example: The following sample of commuting distances and times for fifteen randomly selected co-workers is adapted from Johnson & Kuby Elementary Statistics (Thomson, 2004), page 623.
| Commuting Distances and Times | |||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Person | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 |
| Miles, x | 3 | 5 | 7 | 8 | 10 | 11 | 12 | 12 | 13 | 15 | 15 | 16 | 18 | 19 | 20 |
| Minutes, y | 7 | 20 | 20 | 15 | 25 | 17 | 20 | 35 | 26 | 25 | 35 | 32 | 44 | 37 | 45 |
The TI’s LinReg(ax+b) command can tell you
that the correlation of the sample is 0.88. But what can you infer
about the correlation of the population?
Enter your x’s and y’s in two statistics lists,
such as L1 and L2. Run the MATH200I program and select 4:Correlatn inf. When
prompted, enter your x list and y list, and your desired confidence
level, such as .95 or 95 for 95%.
The output screen is shown at right. For this sample of
n = 15 points, the sample correlation coefficient is
r = 0.88. For the correlation of the population (distances
and times for all commuters at this company),
you’re 95% confident that
0.67 ≤ ρ ≤ 0.96.
You can also do a hypothesis test to see whether there is any
correlation in the population. The null hypothesis H0 is that
there is no correlation in the population, ρ = 0; the
alternative H1 is that there is correlation in the population,
ρ ≠ 0.
Select your α; 0.05 is a common choice.
Run the MATH200I program and select 4:Correlatn inf. Enter your x and y
lists and enter 0 for C-Level; this tells the program that you want a
hypothesis test.
The output screen is shown at right. Sample size n = 15,
and sample correlation is r = 0.88. The t statistic for this
hypothesis test is 6.64, and with 13 (n−2) degrees of freedom
that yields a p-value of <0.0001.
p<α; reject H0 and accept H1. At the 0.05 level of significance, ρ ≠ 0: there is some correlation in the population. Furthermore, the population correlation is positive. (See p < α in Two-Tailed Test: What Does It Tell You? for interpreting the result of a two-tailed test in a one-tailed manner like this.)
Remark: When p is greater than α, you fail to reject H0. In that case, you would conclude that it is impossible to say, at the 0.05 level of significance, whether there is correlation in the population or not.
A linear regression fits an equation of the form ŷ = b1x + b0 to the sample data, but the slope b1 and the y intercept b0 are just sample statistics. If you took a different sample you would likely get a different regression line.
The MATH200I program finds
confidence intervals for the slope β1 and intercept β0
of the line that best fits the entire population of points, not just a
particular sample. It can also find a
confidence interval about the mean ŷ for a particular x
and a
prediction interval about all ŷ’s for a particular x.
The program doesn’t do any hypothesis tests on the
regression line. The standard test is to
test whether the regression line has a nonzero slope, β1 ≠ 0.
But that
test is identical to the test for a nonzero correlation coefficient,
ρ ≠ 0, which the MATH200I program performs as part of
the 4:Correlatn inf menu selection.
See also: Inferences about Linear Regression explains the principles and calculations behind inferences about linear regression; there’s even an Excel workbook.
To perform inferences about linear regression, first load your
x’s and y’s in any two statistics lists. Then run
the MATH200I program and select 5:Regression inf.
Example: Let’s use the same data on commuting distances and times that you used for Inferences about Linear Correlation.
The TI-83/84 command LinReg(ax+b)will show the best
fitting regression line for this particular sample, but what can we say about
the regression for all commuters at that company?
Solution: Enter the x’s and y’s in any two
statistics lists, such as L1 and L2. Run the MATH200I program and select
5:Regression inf. Specify the two lists and your desired confdence level,
such as .95 or 95 for 95%.
Results: The slope of the sample regression line is 1.89, meaning that on average each extra mile of commute takes 1.89 minutes (a speed of about 31 mph). But the 95% confidence interval for the slope is 1.28 to 2.51: you’re 95% confident that the slope of commuting time per distance, for all commuters at this company, is between 1.28 and 2.51 minutes per mile (46 and 23 mph).
The second section of the screen shows that the y intercept of the sample is 3.6: this represents the “fixed cost” of the commute, as opposed to the “variable cost” per mile represented by the slope. But the 95% confidence interval is −4.5 to +11.8 minutes.
Interpretation: the line that best fits the sample data is
ŷ = 1.89x + 3.6
and the regression line for the whole population is
ŷ = β1x + β0
where you’re 95% confident that
1.28 ≤ β1 ≤ 2.51 and −4.5 ≤ β0 ≤ +11.8
Let’s think a bit more about that intercept, with a 95% confidence interval of −4.5 to +11.8 minutes. This is a good illustration that it’s a mistake to use a regression line too far outside your actual data. Here, the x’s run from 3 to 20. The y intercept corresponds to x = 0, and a commute of zero miles is not a commute at all. (Yes, there are people who work from home, but they don’t get in their cars and drive to work.) While the y intercept can be discussed as a mathematical concept, it really has no relevance to this particular problem.
The first output screen was about the line as a whole; now the program turns to predictions for a specific x value. First it asks for the x value you’re interested in. This time, let’s make predictions about a commute of 10 miles.
Caution: You should only use x values that are within the domain of x values in your data, or close to it. No matter how good the straight-line relationship of your data, you don’t really know whether that relationship continues for lower or higher x values.
The program arbitrarily limits you to the domain plus or minus 15% of the domain width, but even that may be too much in some problems. In this problem, commuting distances range from 3 mi to 20 mi, a width of 17 mi. The program will let you make predictions about any x value from 3−.15*12 = 0.45 mi to 15+.15*12 = 22.55 mi, but you have to decide how far you’re justified in extrapolating.
The input and output screens are shown at right.
ŷ (y-hat) is simply the y value on the regression
line for the given x value, found by
ŷ = (slope)×10+(intercept) = 22.6. That is a
prediction for μy|x=10, the average time for many
10-mile commutes. The screen shows a 95% confidence interval for that
mean: you’re
95% confident that the average commute time for all 10-mile commutes
(not just in the sample) is between 19.3 and 25.9
minutes.
But that is an estimate of the mean. Can we say anything about individual commutes? Yes, that is the prediction interval at the bottom of the screen. It says that 95% of all 10-mile commutes take between 10.4 and 34.7 minutes.
The TI-83 doesn’t have an invT function as
the TI-84 does, but if you need to find critical t or inverse t on
either calculator you can use this part of the MATH200I program.
Caution: our notation of t(df,rtail) matches most books in specifying the area of the right-hand tail for critical t. But the TI calculator menus specify the area of the left-hand tail. Make sure you know whether you expect a positive or negative t value.
Some textbooks interchange the arguments: t(rtail,df). Since degrees of freedom must always be a whole number and the tail area must always be less than 1, you’ll always know which argument is which.
Example: find t(27,0.025), the t statistic with 27 degrees of freedom (sample size 28) for a one-tailed significance test with α = 0.025, a two-tailed test with α = 0.05, or a confidence interval with 1−α = 95%.
Solution: run the MATH200I program and select 6:Critical t. When
prompted, enter 27 for degrees of freedom and 0.025 for the area of
the right-hand tail, as shown in the first screen. After a short
pause, the calculator gives you the answer: t(27,0.025) =
2.05.
Interpretation: with a sample of 28 items (df=27), a t score of 2.05 cuts the t distribution with 97.5% of the area to the left and 2.5% to the right.
χ²(df,rtail) is the critical value for the χ²
distribution with df degrees of freedom and probability
rtail. (In the context of a hypothesis test, rtail is
α, the significance level of the test.)
In the illustration, rtail is the area of the right-hand tail, and the asterisk * marks the critical value χ²(df,rtail). The critical value or inverse χ² is the χ² value such that a higher value of χ² has only an rtail probability of occurring by chance.
You can compute critical χ² only for the right-hand tail, because the χ² distribution has no left-hand tail.
Caution: Some textbooks write the function the other way, χ²(rtail,df). Since df is a whole number and rtail is a decimal between 0 and 1, you will be able to adapt.
Example: What is the critical χ² for a 0.05 significance test with 13 degrees of freedom?
Run the MATH200I program and select
7:Critical χ². Enter the number of degrees of
freedom and the area of the right-hand tail. Be patient: the
computation is slow. But the program gives you the critical χ²
value of 22.36, as shown in the second screen.
Interpretation: For a χ² distribution with 13 degrees of freedom, the value χ² = 22.36 divides the distribution such that the area of the right-hand tail is 0.05.
Most parts of the MATH200I program leave useful results in
variables, which you can use for further calculation. Use the
[ALPHA] key. For instance,
if you want a value from variable V, press [ALPHA 6 makes V].
Also, if you’re using any variables or statistics lists
yourself, you don’t want to be surprised when the program changes
their values. Below you’ll find complete information.
1:Sample size
2:Infer about σ
3:GoF test
4:Correlatn inf
5:Regression inf
6:Critical t
7:Critical χ²
14 Nov 2009: Add note about future replacement of this program
18 Oct 2009: several small edits for clarity and to correct typos
24 Aug 2009: Protect the program to prevent accidental editing.
8 Mar 2009: In 4:Correlatn inf in the program, check for
r = ±1, which prevents doing inferences. Only the
program changed; there were no changes needed in this document.
7 Dec 2008: Add a program version that works with the original TI-83.
29 Nov 2008: several changes in the MATH200I program:
Lbl statements so that the program will run on an
original TI-83Text statements where values follow on the
same line24 Nov 2008:
MATH200I
application, and six Web pages into this one, eliminating a fair amount of
duplication; document variable usage
clearlyMATH200I program, add titles to most program screens, and change prompts to
lower case or mixed case for readability3:GoF test
part of the MATH200I program, check that L1 and L2 have equal length and
improve the captions of numbers on the results graph4:Correlatn inf part of the MATH200I program,
use input x and y lists instead of asking the user for
r and n; save results in L and H5:Regression inf part of the MATH200I program, improve
formatting and reduce the four output screens to two, and check the
entered x value for reasonableness7:Critical χ² part of the MATH200I program,
add error checkingHere’s part of the earlier history of the pages now in
this page and the programs now part of the MATH200I program:
SDINFER.MULTINOM.CORINFER.REGINFER.TInterval “back door”
called Computing Inverse t. This part of
the MATH200I program was created on 23 Nov 2008 and there never
was a separate program.INVCHI2.home page | problems with viewing?
This page is used in instruction at Tompkins Cortland Community College in Dryden, New York; it’s not an official statement of the College. Please visit www.tc3.edu/instruct/sbrown/ to report errors or ask to copy it.
For updates and new info, go to http://www.tc3.edu/instruct/sbrown/ti83/