Tutorials › AP Statistics › Using the T-Test Function on a Calculator

One-sample t hypothesis tests · Tutorial 668 of 1000

Using the T-Test Function on a Calculator

Practice entering raw observations or summary statistics into T-Test, then check and explain the calculator’s results.

Intermediate 9 min read

What You'll Learn

  • Choose Data or Stats mode for a one-sample T-Test
  • Enter the null mean and the alternative that matches the research question
  • Read the reported test statistic, p-value, sample mean, sample standard deviation, and sample size
  • Check calculator results using the one-sample t statistic and degrees of freedom
  • Identify which study conditions the calculator cannot verify

Using T-Test to Run a One-Sample t Test

In “The One-Sample t Test Statistic,” “Why the t Test Uses n Minus 1 Degrees of Freedom,” and “Finding a P-Value Using tcdf,” you learned how a one-sample t test uses the sample mean, sample standard deviation, sample size, and null mean. A calculator’s T-Test function combines those calculations: it reports the observed \(t\) statistic and the p-value for the alternative you select.

T-Test does not decide whether a test is appropriate for your study. You must still define the population mean, state the hypotheses, and check the conditions, as discussed in the earlier tutorials on mean inference. It also does not choose the alternative for you. The selected alternative must match the research question.

Definition: The one-sample T-Test function uses sample data to test a null hypothesis about a population mean \(\mu\). Depending on the calculator mode, you provide either the individual observations or the sample mean, sample standard deviation, and sample size.

Choose Data Mode or Stats Mode

On a TI-84, open the STAT menu, choose TESTS, and select T-Test. The calculator asks whether to use Data or Stats. These choices provide the same test when the inputs describe the same sample.

  • Data mode: Use this when you have the individual observations. Choose the list containing the data, usually \(L1\), and enter a frequency list if the observations are recorded with frequencies. If every observation appears once, use a frequency of 1.
  • Stats mode: Use this when you already have the sample mean \(\bar{x}\), sample standard deviation \(s\), and sample size \(n\), but not the individual observations. Enter those three summary statistics directly.

In either mode, enter the null-hypothesis value \(\mu_0\), then choose the alternative: \(\mu<\mu_0\), \(\mu>\mu_0\), or \(\mu\ne\mu_0\). Select Calculate to run the test. Check the screen before calculating: a correct list with the wrong null mean or alternative still gives an answer to the wrong test.

Key output: The calculator reports \(t\), \(p\), \(\bar{x}\), \(Sx\), and \(n\). Here, \(t\) is the observed test statistic, \(p\) is the p-value for the selected alternative, \(\bar{x}\) is the sample mean, \(Sx\) is the sample standard deviation, and \(n\) is the sample size. For a one-sample t test, \(df=n-1\), even if degrees of freedom are not displayed on the screen.

The calculator’s \(Sx\) is the sample standard deviation \(s\), not a population standard deviation \(\sigma\). In Data mode, it calculates \(\bar{x}\) and \(Sx\) from the list. In Stats mode, it uses the values you enter. In either case, the test statistic is based on

$$ t=\frac{\bar{x}-\mu_0}{s/\sqrt{n}}. $$

The sign of \(t\) tells you whether the sample mean is above or below the null value. The p-value depends on both \(t\) and the selected alternative. This is why checking only the displayed p-value, without checking the alternative, is not enough.

A Reliable Calculator Routine

Use this routine to connect what you enter with what the calculator reports. It also makes it easier to catch input errors before writing an answer.

1
Set up the test.
Define \(\mu\), write \(H_0\) and \(H_a\), and identify the null value and test direction.
2
Check the conditions.
Use the study description and data displays as appropriate. The calculator cannot determine whether the sample was random or whether the conditions for inference are met.
3
Enter the sample information.
Select Data for individual observations or Stats for \(\bar{x}\), \(s\), and \(n\). Enter \(\mu_0\) and the alternative that matches \(H_a\).
4
Check and interpret the output.
Read \(t\), \(p\), \(\bar{x}\), \(Sx\), and \(n\). Confirm that they agree with the sample and the test setup, then state what the p-value means in context.

A useful check is to calculate \(df=n-1\) and substitute the reported \(\bar{x}\), \(Sx\), and \(n\) into the t-statistic formula. Your result should match the calculator’s \(t\), apart from display rounding. If it does not, check the list, frequency, summary inputs, or null value.

Worked Examples

Worked Example: Running T-Test From Raw Data

A fictional horticulture group randomly selects 3 seedlings from a group of 60 and records the number of days until each shows a new leaf: 18, 19, and 20 days. The group wants to test whether the true mean time for seedlings in this group is less than 20 days. Run T-Test in Data mode and explain its output.

State. Let \(\mu\) be the true mean number of days until seedlings in this group show a new leaf. The hypotheses are \(H_0:\mu=20\) days and \(H_a:\mu<20\) days. This is a lower-tailed test.

Plan and check conditions. The seedlings were randomly selected, supporting the Random condition. The 10% condition is met because \(0.10(60)=6\) and \(3\leq6\), so independence is reasonable for sampling without replacement. Since \(n=3<30\), the large-sample route is not met. The group states that times in this population are approximately Normally distributed, supporting the Normal/Large Sample condition for this small sample.

Do. On the TI-84, choose STAT, TESTS, then T-Test. Choose Data, select the list containing 18, 19, and 20, use frequency 1, enter \(\mu_0=20\), choose the lower-tailed alternative, and calculate.

The calculator reports \(\bar{x}=19\), \(Sx=1\), and \(n=3\). These sample statistics can be checked from the data: the mean is \((18+19+20)/3=19\) days, and the sample standard deviation is 1 day. The degrees of freedom are \(df=3-1=2\). The standard error is \(1/\sqrt{3}\) days, so the t statistic is

$$ t=\frac{19-20}{1/\sqrt{3}}=-\sqrt{3}\approx -1.732. $$

For the selected lower-tailed alternative, T-Test reports the area to the left of this statistic. Its p-value is approximately \(0.1127\). This agrees with finding the lower-tail area using tcdf with \(t=-1.732\) and \(df=2\).

Conclude. Assuming the true mean time is 20 days, the probability of obtaining a t statistic of \(-1.732\) or less is about \(0.1127\). This is the p-value for testing whether the mean time is less than 20 days. The calculator’s output alone does not establish convincing evidence for the alternative; any decision also depends on the stated significance level.

Worked Example: Running T-Test From Summary Statistics

A fictional packaging facility takes a random sample of 16 containers from a shipment of 240. The sample mean volume is 52 milliliters, and the sample standard deviation is 4 milliliters. The facility tests whether the true mean volume in this shipment is greater than 50 milliliters. Run T-Test in Stats mode.

State. Let \(\mu\) be the true mean volume, in milliliters, of containers in this shipment. The hypotheses are \(H_0:\mu=50\) milliliters and \(H_a:\mu>50\) milliliters.

Plan and check conditions. The containers were randomly sampled, supporting the Random condition. For the 10% condition, \(0.10(240)=24\), and \(16\leq24\), so independence is reasonable. Since \(n=16<30\), the large-sample route is not met. The facility states that container volumes in this shipment follow an approximately Normal distribution, supporting the Normal/Large Sample condition.

Do. Choose Stats in the T-Test menu. Enter \(\mu_0=50\), \(\bar{x}=52\), \(Sx=4\), and \(n=16\); select the upper-tailed alternative and calculate. The degrees of freedom are \(df=16-1=15\). The standard error is \(4/\sqrt{16}=1\) milliliter, so

$$ t=\frac{52-50}{4/\sqrt{16}}=2.00. $$

For \(t=2.00\), \(df=15\), and the upper-tailed alternative, the calculator reports \(p\approx0.0320\), rounded to four decimal places. Its other sample-statistic outputs should be \(\bar{x}=52\), \(Sx=4\), and \(n=16\), matching the entries.

Conclude. Assuming the true mean volume is 50 milliliters, the probability of obtaining a t statistic of 2.00 or greater is about \(0.0320\). This is the p-value for the test of whether the mean volume exceeds 50 milliliters.

Worked Example: Checking a Two-Sided Test Output

A fictional recreation program randomly selects 9 participants from a group of 120 and records their weekly practice time. Summary statistics are \(\bar{x}=8.4\) hours and \(s=1.2\) hours. The program tests whether the true mean practice time differs from 8 hours per week. Suppose the population distribution of practice times is approximately Normal.

State and plan. Let \(\mu\) be the true mean weekly practice time, in hours, for participants in this group. The hypotheses are \(H_0:\mu=8\) hours and \(H_a:\mu\ne8\) hours. This is a two-sided test. Random selection supports the Random condition. The 10% condition is met because \(0.10(120)=12\) and \(9\leq12\), supporting independence. Since \(n=9<30\), the large-sample route is not met; the stated approximately Normal population supports the Normal/Large Sample condition.

Do. In Stats mode, enter \(\mu_0=8\), \(\bar{x}=8.4\), \(Sx=1.2\), and \(n=9\), then select the two-sided alternative. The degrees of freedom are \(df=9-1=8\). The standard error is \(1.2/\sqrt{9}=0.4\) hours, giving

$$ t=\frac{8.4-8}{1.2/\sqrt{9}}=1.00. $$

Because the alternative is two-sided, the p-value includes both tails at least as far from 0 as \(1.00\) and \(-1.00\). T-Test reports \(p\approx0.3466\), rounded to four decimal places. The sample-statistic outputs should be \(\bar{x}=8.4\), \(Sx=1.2\), and \(n=9\). If the program uses a significance level of \(0.05\), then \(0.3466>0.05\), so it fails to reject \(H_0\). The data do not provide convincing evidence that the true mean weekly practice time differs from 8 hours.

Common Mistakes and AP Exam Tips

  • Choosing the wrong mode. Data mode requires individual observations; Stats mode requires \(\bar{x}\), \(s\), and \(n\). Do not enter \(s\) as a list of observations or use a population standard deviation in place of \(Sx\).
  • Selecting the wrong alternative. The alternative must come from the research question, not from the sign of the observed \(t\). A negative \(t\) does not automatically mean the test is lower-tailed.
  • Misreading the output labels. \(Sx\) is the sample standard deviation, and \(p\) is the p-value for the alternative currently selected. Check both against the test setup.
  • Assuming the calculator checked conditions. T-Test performs calculations, but it cannot verify random selection, independence, or an appropriate population shape. State the evidence for each relevant condition in your written solution.
  • Reporting a number without context. A full-credit response identifies what \(\mu\) represents, states the hypotheses, gives the p-value, and explains the probability it describes assuming \(H_0\) is true. If asked for a decision, compare the p-value with the stated significance level and conclude in context.
Key takeaway: Choose Data mode for individual observations and Stats mode for \(\bar{x}\), \(s\), and \(n\). Enter the correct null mean and alternative, then check \(t\), \(p\), \(\bar{x}\), \(Sx\), and \(n\). The calculator supplies numerical results; you supply the conditions and the contextual interpretation.

Check Your Understanding

Answer each question using the T-Test routine and the meanings of its output.

  1. You have 12 individual measurements and no summary statistics. Which mode should you choose, and what should you enter for the frequency if each value appears once?
  2. A Stats-mode test uses \(\bar{x}=31\), \(s=6\), \(n=9\), and \(\mu_0=29\). What are \(df\) and the observed \(t\) statistic?
  3. A calculator reports \(t=-1.4\) and \(p=0.09\). What additional information do you need before you can interpret the p-value correctly?
  4. In a test of whether a mean is greater than its null value, the calculator reports \(p=0.03\). State what this p-value means, assuming the null hypothesis is true.
  5. Name one study condition that the T-Test function cannot verify and explain what study information could support checking it.