[1] -2.109816
Confidence Intervals
Intro to OLS Regression
POLS 3316: Statistics for Political Scientists
2023-11-12
if the test score is greater than the critical value, reject the null
The critical value is minimum
Above that value, the probability that the null hypothesis is true is equal to or less than the target so we reject
This all leads to confidence intervals
# Confidence intervals
## What is a confidence interval?
For small samples or uncertain population standard deviation we use t-scores to adjust for these uncertainties
- If we wanted to get a 95% confidence interval with 68-95-99, we would look for a value 2 standard deviations either side of the statistic we want to find a CI for
- With t-test scores we divide the standard deviation by the square root of sample size and multiply times a t-table critical value instead.
- We can get the critical value using the qt() function in R as in the examples
\(CI_\mu\) Confidence interval of the population mean
\(CI_\mu\) = \(\bar{x} \pm t \frac{\sigma_{s}}{\sqrt{n}}\)
Where:
The 68-95-99 rule gives an oversimplified CI.
For normal distributions, the actual formula is:
\(CI_\mu\) Confidence interval of the population mean
\(CI_\mu = \bar{x} \pm z \frac{\sigma}{\sqrt{n}}\)
Where:
\(\bar{x}\) Sample mean \(\sigma\) population standard deviation \(n\) is the sample size
We’ll go through a couple of example computations, then I’ll provide you some sample R lab scripts (Quarto files).
We need the t-score for a two-tailed test:
Then we can fill in the formula:
Using the z-score:
Sample mean: 50
Population standard deviation: 5
Sample size: 500
We need a z-score for 95% (.025% above and .025% below):
Then we apply the formula:
\(CI_\mu = \bar{x} \pm z \frac{\sigma}{\sqrt{n}}\)
NO!
The biggest use I see of confidence intervals is confidence intervals for regression coefficients
If we find that the \(\beta\) in the equation defining the relationship between our explanatory (x) and dependent (y) variables is 0.9, the confidence interval can tell us that it’s actually 95% likely that the true relationship is between 0.88 and 0.92.
Even better, we can graph it…
https://www.statisticshowto.com/probability-and-statistics/confidence-interval/#WhatisCI
https://www.statisticshowto.com/probability-and-statistics/statistics-definitions/confidence-level/
https://www.statisticshowto.com/95-percent-confidence-interval/
## Authorship, License, Credits
Author: Tom Hanna
Website: tomhanna.me
License: This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.
POLS3316, Fall 2023, Instructor: Tom Hanna