In the preceding discussion we have been using s, the population standard deviation, to compute the standard error. However, we don"t really know the population standard deviation, since we are working from samples. To get around this, we have been using the sample standard deviation (s) as an estimate. This is not a problem if the sample size is 30 or greater because of the central limit theorem. However, if the sample is small (t score instead of a z score, and note that the t-value will depend on the degrees of freedom (df) as a reflection of sample size. When using the t-distribution to compute a confidence interval, df = n-1.
You are watching: The t value with a 95% confidence and 24 degrees of freedom is
Calculation of a 95% confidence interval when n
One way to think about the t-distribution is that it is actually a large family of distributions that are similar in shape to the normal standard distribution, but adjusted to account for smaller sample sizes. A t-distribution for a small sample size would look like a squashed down version of the standard normal distribution, but as the sample size increase the t-distribution will get closer and closer to approximating the standard normal distribution.
The table below shows a portion of the table for the t-distribution. Notice that sample size is represented by the "degrees of freedom" in the first column. For determining the confidence interval df=n-1. Notice also that this table is set up a lot differently than the table of Z scores. Here, only five levels of probability are shown in the column titles, whereas in the table of Z scores, the probabilities were in the interior of the table. Consequently, the levels of probability are much more limited here, because t-values depend on the degrees of freedom, which are listed in the rows.
Two-sided test p-values
One-sided test p-values
Degrees of Freedom (df)
Notice that the value of t is larger for smaller sample sizes (i.e., lower df). When we use "t" instead of "Z" in the equation for the confidence interval, it will result in a larger margin of error and a wider confidence interval reflecting the smaller sample size.
With an infinitely large sample size the t-distribution and the standard normal distribution will be the same, and for samples greater than 30 they will be similar, but the t-distribution will be somewhat more conservative. Consequently, one can always use a t-distribution instead of the standard normal distribution. However, when you want to compute a 95% confidence interval for an estimate from a large sample, it is easier to just use Z=1.96.
Because the t-distribution is, if anything, more conservative, R relies heavily on the t-distribution.
Using the table above, what is the critical t score for a 95% confidence interval if the sample size (n) is 11?", CAPTIONSIZE, 2, CGCOLOR, "#c00000", PADX, 5, 5, PADY, 5, 5,BUBBLECLOSE, STICKY, CLOSECLICK, CLOSETEXT, "
Then, to compute the 95% confidence interval we could plug t=2.144787 into the equation:
Confidence Intervals from Raw Data Using R
It is also easy to compute the point estimate and 95% confidence interval from a raw data set using the " t.test" function in R. For example, in the data set from the Weymouth Health Survey I could compute the mean and 95% confidence interval for BMI as follows. First, I would load the data set and give it a short nickname. Then I would attach the data set, and then use the following command:
The output would look like this:
One Sample t-test
data: bmit = 228.5395, df = 3231, p-value alternative hypothesis: true mean is not equal to 095 percent confidence interval:26.66357 27.12504sample estimates:mean of x 26.8943
R defaults to computing a 95% confidence interval, but you can specify the confidence interval as follows:
This would compute a 90% confidence interval.
See more: What Is The Year Of Our Lord : Meaning & Origin + 3 Example Sentences
Lozoff and colleagues compared developmental outcomes in children who had been anemic in infancy to those in children who had not been anemic. Some of the data are shown in the table below.
|Mean + SD|
Anemia in Infancy
Non-anemic in Infancy
Gross Motor Score
Source: Lozoff et al.: Long-term Developmental Outcome of Infants with Iron Deficiency, NEJM, 1991