Our previous discussion about the construction of a confidence interval for population mean
when the population standard deviation sigma is assumed to be known was primarily for pedagogical
purposes to introduce the elements of a confidence interval for a set of data. It’s included
in all stats textbooks. However, realistically, when would we ever need to estimate a population
mean based on a sample but we somehow know what the population standard deviation is?
We don’t know mu for sure, but we know sigma? We don’t know average performance, but we
know the dispersion of performance? This situation would generally not occur. We usually have
to estimate the standard deviation of the population with a sample, using s as an estimator
for sigma.
You can imagine that if you seek to estimate the mean repair time of a brand new circuit
board design, you’ll have to collect a sample of circuit boards, compute a sample mean and
sample standard deviation, and use those sample statistics to construct a confidence interval
for the mean repair time of the population of circuit boards. Luckily for us, at the
turn of the 20th century, a British statistician named William S. Gosset found that a probability
distribution similar to, but a little different than, the standard normal distribution was
more effective at interval estimation.
Gosset, who had a terrific mustache, was employed at Guinness Brewery, where he worked in quality
control, or studying the effects of different variables on the quality of beer produced
at the brewery. Naturally, he encountered situations where the population standard deviation
was unknown and where using a sample standard deviation produced incorrect results with
the inferential statistics methods known at the time. Using a sample standard deviation
was especially problematic when sample sizes were small.
As Guinness prevented him from publishing what might be considered trade secrets, Gosset
published his alternative to the standard normal distribution under the pseudonym “Student.”
His distribution was the Student’s t-distribution, and it’s still referred to with this name
today, or by the abbreviated name, the t-distribution.
The t-distribution is similar to the standard normal distribution in several respects. It
has the same bell shape, it is symmetric about the mean which is zero, and naturally, the
total area under the curve is one. The difference is that the t-distribution is flatter than
the standard normal distribution: its peak is not as high, and it has a larger standard
deviation. The t-distribution has one parameter describing its shape, the degrees of freedom.
The degrees of freedom parameter, df, for the t-distribution is df = n -1. Briefly on
the concept of the degrees of freedom, recall the calculation of sample variance. We know
that the sum of y_i minus y-bar summed from i equals 1 to n equals 0, and we need to know
y-bar to make this calculation. Therefore, we can say that n - 1 of the sample values
are free to vary. That is, n-1 of the sample values can take on any value, but that nth
value must be specific in order to attain the sample mean, y-bar. That’s a simple
explanation of where the n-1 degrees of freedom comes from.
As such, there exists a different t-distribution curve for each possible degrees of freedom,
and the standard deviation of the t-distribution is calculated as the square root of degrees
of freedom divided by degrees of freedom minus two, which is always greater than 1, which
is the standard deviation of the standard normal distribution. However, as sample size
increases, the t-distribution approaches the standard normal distribution.
We should always use a confidence interval based on the t-distribution when looking to
estimate population means. The notation for a value on the t-distribution axis associated
with a particular degrees of freedom and alpha over two in the upper tail is t degrees of
freedom alpha over two.
Let’s familiarize ourselves with the t-distribution lookup table, often found in the appendix
or inside cover of a statistics textbook. The lookup tables in most textbooks generally
look the same. As there is a different curve for every degrees of freedom, the number of
t values that can be published in a lookup table is limited. Most lookup tables provide
t values for right tail areas of 0.10, 0.05, 0.025, 0.01, 0.005, and 0.001, as these are
the most typical alpha or alpha over two values that one would encounter. The number of degrees
of freedom provided varies from textbook to textbook. If the textbook you’re using doesn’t
provide the particular degrees of freedom that you need to solve your problem, round
down to the next closest value. Rounding down results in a more conservative estimate.
Let’s take a look at a few examples. What is the value on the t axis associated with
0.01 in the upper tail when degrees of freedom are 14? What is negative t with degrees of
freedom 30 with 0.05 in the tail?
How different is z of 0.025 from t with degrees of freedom 18 0.025?
We can also use Microsoft Excel to lookup values on the t-distribution axis with the
T-inverse function. So if we type in T-inverse, we see that excel wants to read in the probability
and degrees of freedom associated with that distribution. That is, we provide the probability
associated with the two-tailed t-distribution and the degrees of freedom that characterize
the distribution, and Excel returns the associated value on the t-distribution axis. Note that
the T-inverse function requires the two-tailed probability, so, for example, if you’d like
to know the value on the axis associated with 0.01 in the upper tail when the degrees of
freedom are 14, you have to supply 2 times 0.01 or 0.02 as the two-tailed probability.
And if you look up the T-inverse function in the Excel help file, you get a better sense
for what all is going on behind the scenes whenever Excel is using this function. The
Excel function allows us to look up values that we can’t find exactly in the lookup
table. For example, say we have a pretty big sample size, therefore pretty big degrees
of freedom not contained in the table. Let’s say n equals 127, therefore the degrees of
freedom would be 126. If we want a 95 percent confidence interval, we’d need a value on
the t axis associated with 126 degrees of freedom and 0.05. Remember, this is a two-tailed
probability that we have to insert into the T-inverse function. So we would enter T-inverse
of 0.05 and degrees of freedom 126 to find the value on the t axis. When we do that we
get the value of 1.979. So this would be the t-value we would use in a confidence interval
for example whenever we have 126 degrees of freedom and we want a 95 percent confidence
interval.
With Excel we’re not limited to the traditional values in the tail that are found in the lookup
tables. For example, if for some crazy reason, we wanted a 93 percent confidence interval,
we’d look up a two-tailed probability of 0.07. For example, if degrees of freedom are
71, we could insert the T-inverse function into Excel, look up a probability of 0.07,
that’s a two tail probability, and use degrees of freedom 71. And this would be our value
that we could include in our confidence interval 1.839. And again, we’re not going to find
that in a lookup table.
Let’s do a couple other examples. Some of the examples that we looked up in the previous
lookup table just to make sure that we got the same values. So previously we looked up
a value on the t axis associated with 0.01 in the upper tail when the degrees of freedom
were 14. So we use the T-inverse function. If we want 0.01 in the upper tail, we would
have to insert 0.02 as the two-tail probability, that’s what Excel wants to see, and our
degrees of freedom are 14. And here is our value on the t-distribution axis, 2.624. That
was very similar to what we looked up in the lookup table.
Another one we may be interested in negative t when degrees of freedom are 30 and we have
0.05 in the upper tail. Okay. So if we wanted a negative value that is to the left of the
mean use the T-inverse function. If we want 0.05 in the tail, that means we need 0.1 as
the two-tailed probability and degrees of freedom are 30 in this case. And this gives
a value of -1.697.
And finally we wanted to know how different is z of 0.025 from t of 0.025 when the degrees
of freedom are 18. So again, the T-inverse function in Excel is really helpful for whenever
we have a particular value that’s just not found in the lookup tables. And we’ll see
some more Excel examples later on whenever we talk about some other distributions. Excel
is very helpful tool for this case.