One-sample t Test

Statistics > Basic Statistics > 1-sample t


Tests whether the mean of a single variable differs from a specified constant.

Use One-sample t Test to compute a confidence interval and perform a hypothesis test of the mean when the population standard deviation, s, is unknown. For a two-sided one-sample t,

H0: µ = µ0   versus   H1: µ ≠ µ0

where µ is the population mean and µ0 is the hypothesized population mean.

The main assumption in a t-test is that the data comes from a Gaussian (normal) distribution. If this is not the case, then a nonparametric test, such as the Wilcoxon signed-rank test, may be a more appropriate test of location.


Dialog box items

Samples in columns:
Choose if you have entered raw data in columns.

oSamples: Enter the columns containing the sample data.

Summarized data: Choose if you have summary values for the sample size, mean, and standard deviation.

oSample size: Enter the value for the sample size.

oSample Mean: Enter the value for the sample mean.

oSample Std Dev: Enter the value for the sample standard deviation.

The display of outputs of VisualStat.



Data column must be numeric. You can generate a hypothesis test or confidence interval for more than one column at a time. Missing values are ignored.



Displays a histogram, a histogram with a normal curve, and a boxplot.

Choose to display a histogram for each variable

Histogram with Normal Curve:
Choose to display a histogram with a normal curve for each variable

Boxplot of data:
Choose to display a boxplot for each variable

Choose the options you want.

oExclude missing values: Check to excludes rows that have missing values.

oInverted Bar: Check to reverse the axes.



Hypothesized mean:
Enter the test mean µ0

Alternative Hypothesis:
Enter Two-sided, Upper One-sided, or Lower One-sided. If you choose an One-sided hypothesis test, an upper or lower confidence bound will be constructed, respectively, rather than a confidence interval.

Confidence Level:
Enter the level of confidence desired. Enter any number between 0 and 100. Entering 90 will result in a 90% confidence interval. The default is 95%.



This data set was collected by Bob Zarr of NIST in January, 1990 from a heat flow meter calibration and stability analysis. The response variable is a calibration factor. The motivation for studying this data set is to illustrate a well-behaved process where the underlying assumptions hold and the process is in statistical control.


1.Open the DataBook compare.vstz

2.Select the sheet zarr13

3.Choose the tab Statistics, the group Basic Statistics and the command 1-Sample t

4.Select group Samples in columns

5.In Sample, select Calib.

6.Click Options page. In Hypothesized mean, enter 9.265.

7.Click OK


Report window output


One-sample t Test


Test of mu = 9.265 vs not = 9.265

alternative hypothesis: true mean is not equal to 9.265


        N    Mean   StDev  SE Mean  95% Conf Interval        t   Proba  Alt Hypothesis

Calib  195  9.2615  0.0228   0.0016   [9.2582; 9.2647]  -2.1687  0.0313          Accept



Interpreting the results


We are testing the hypothesis that the population mean is 9.265. The alternative hypothesis is that the population mean is not equal to 9.265. The test statistic t is calculated as 2611.2857.

The p-value of this test, or P-value the probability of obtaining more extreme value of the test statistic by chance if the null hypothesis was true, is 0.0313. This is called the attained significance level, or p-value. Therefore, reject the null hypothesis if your acceptable a level is greater than the p-value, or 0.0313.




See Also:

Two-Sample t Test | Two-Sample Paired t Test | Report | Numeric Formats

Web Resource: NIST e-Handbook of Statistical Methods, 2006 | Probability and statistics EBook