Book: Analysing Data Using Linear Models
Chapter 2.9, 2.10
Chapter 2.9: Constructing confidence intervals
The 95% confidence interval is the most widely used, but other intervals are also seen. For instance, the
99% confidence interval and the 90% confidence interval. A 99% confidence interval is wider than a 95%
confidence interval, which in turn is wider than a 90% confidence interval. The width of the confidence
interval also depends on the sample size.
As we discussed for the 95% interval above, we looked at the t-distribution of
3 degrees of freedom because we had a sample size of 4 elephants. Suppose we
have a sample size of 200, then we would have to look at a t-distribution of 200−1
= 199 degrees of freedom. Table 2.2 shows information about a couple of t-
distributions with different degrees of freedom. In the first column, cumulative
probabilities are given, and the next column gives the respective quantiles. For
instance, the column ’norm’ shows that a cumulative proportion of 0.025 is
associated with a quantile of -1.96 for the standard normal distribution. This means
that for the normal distribution, 2.5% of the observations are smaller than -1.96. In
the same column we see that the quantile 1.96 is associated with a cumulative
probability of 0.975. This means that 97.5% of the observations in a normal
distribution are smaller than 1.96. This implies that 100% - 97.5% = 2.5% of the
observations are larger than 1.96. Thus, if 2.5% of the observations are larger than
1.96 and 2.5% of the observations are smaller than -1.96, then 5% of the
observations are outside the interval (-1.96, 1.96), and 95% are inside this interval.
With a 90% confidence interval, 10% lies outside the interval. We can divide that equally
to 5% on the low side and 5% on the high side. We therefore have to look at cumulative probabilities 0.05
and 0.95 in Table 2.2. The corresponding quantiles for the normal distribution are -1.64 and 1.64, so we
can say that for the normal distribution, 90% of the values lie in the interval (-1.64, 1.64). For a t-
distribution with 9 degrees of freedom, we see that the corresponding values are -1.83 and 1.83. Thus we
conclude that with a t-distribution with 9 degrees of freedom, 90% of the observed values lie in the
interval (-1.83, 1.83).
Constructing confidence intervals -
1. Compute the sample mean ¯y.
2. Estimate the population variance s 2 = Σi(yi−y¯) n−1 .
3. Estimate the standard error ˆσy¯ = q s 2 n .
4. Compute degrees of freedom as n − 1.
5. Look up t 1−x 2 . Take the t-distribution with the right number of degrees of
freedom and look for the critical t-value for the confidence interval: if x is the
confidence level you want, then look for quantile 1−x 2 . Then take its absolute
value. That’s your t 1−x 2 .
6. Compute margin of error (MoE) as MoE = t 1−x 2 × σˆy¯.
7. Subtract and sum the sample mean with the margin of error: (¯y−MoE, y¯+ MoE).
The benefits of buying summaries with Stuvia:
Guaranteed quality through customer reviews
Stuvia customers have reviewed more than 700,000 summaries. This how you know that you are buying the best documents.
Quick and easy check-out
You can quickly pay through credit card or Stuvia-credit for the summaries. There is no membership needed.
Focus on what matters
Your fellow students write the study notes themselves, which is why the documents are always reliable and up-to-date. This ensures you quickly get to the core!
Frequently asked questions
What do I get when I buy this document?
You get a PDF, available immediately after your purchase. The purchased document is accessible anytime, anywhere and indefinitely through your profile.
Satisfaction guarantee: how does it work?
Our satisfaction guarantee ensures that you always find a study document that suits you well. You fill out a form, and our customer service team takes care of the rest.
Who am I buying these notes from?
Stuvia is a marketplace, so you are not buying this document from us, but from seller kayleighdebruin1. Stuvia facilitates payment to the seller.
Will I be stuck with a subscription?
No, you only buy these notes for $3.20. You're not tied to anything after your purchase.