Single Sample t Test


Menu location: Analysis_Parametric_Single Sample t.


This function gives a single sample Student t test with a confidence interval for the mean difference.


The single sample t method tests a null hypothesis that the population mean is equal to a specified value. If this value is zero (or not entered) then the confidence interval for the sample mean is given (Altman, 1991; Armitage and Berry, 1994).


The test statistic is calculated as:

- where x bar is the sample mean, s² is the sample variance, n is the sample size, µ is the specified population mean and t is a Student t quantile with n-1 degrees of freedom.


Power is calculated as the power achieved with the given sample size and variance for detecting the observed mean difference with a two-sided type I error probability of (100-CI%)% (Dupont, 1990).



Test workbook (Parametric worksheet: Systolic BP).


Consider 20 first year resident female doctors drawn at random from one area, resting systolic blood pressures measured using an electronic sphygmomanometer were:

128 127
118 115
144 142
133 140
132 131
111 132
149 122
139 119
136 129
126 128


From previous large studies of women drawn at random from the healthy general public, a resting systolic blood pressure of 120 mm Hg was predicted as the population mean for the relevant age group. To analyse these data in StatsDirect first prepare a workbook column containing the 20 data above or open the test workbook and select the single sample t test from the parametric methods section of the analysis menu. Select the column marked "Systolic BP" when prompted and enter the population mean as 120.


For this example:


Single sample t test

Sample name: Systolic BP

Sample mean = 130.05

Population mean = 120

Sample size n = 20

Sample sd = 9.960316


95% confidence interval for mean difference = 5.388429 to 14.711571


df = 19

t = 4.512404


One sided P = .0001

Two sided P = .0002


Power (for 5% significance) = 98.71%


A null hypothesis of no difference between sample and population means has clearly been rejected. Using the 95% CI we expect the mean systolic BP for this population of doctors to be at least 5 mm Hg greater than the age and sex matched general public, lying somewhere between 125 and 135 mm Hg.


P values

confidence intervals



Copyright © 2000-2016 StatsDirect Limited, all rights reserved. Download a free trial here.