SOC 221 • Lecture 6
Wednesday, July 10, 2024
\(\bar{X}\) —INFERENCE–> \(\mu_x\)
Sample statistic: The characteristic of the sample that we actually observe (i.e. the mean study time of a SAMPLE of UW students)
For example: draw a random sample of 100 students and observe \(\bar{X} = 14.5\)
Population parameter: The characteristic of the population that we are interested in knowing (i.e. the mean study time of all UW students)
Our goal: Estimate the unknown population parameter \(\mu_x = ?\)
Sampling Distribution
A theoretical probability distribution of all possible sample values for the statistic in which we are interested.
Allows us to think about how our one single sample result relates to all possible sample results and, by extension, the population we are interested in drawing inferences about.
Standard error:
The the standard deviation
in the sampling distribution
(in this case, of all
possible sample means)
If, 95% of the samples are within 1.96 standard errors of the true population mean . . .
. . . then for 95 samples out of 100, we will find the true population mean if we look within 1.96 standard errors of the sample mean.
\(\bar{X}\) —INFERENCE–> \(\mu_x\)
Sample statistic: The characteristic of the sample that we actually observe (i.e. the mean study time of a SAMPLE of UW students)
For example: draw a random sample of 100 students and observe \(\bar{X} = 14.5\)
Population parameter: The characteristic of the population that we are interested in knowing (i.e. the mean study time of all UW students)
Our goal: Estimate the unknown population parameter \(\mu_x = ?\)
\[ \bar{X} \]
Create a range of scores, centered on the sample mean, in which we think the population mean is likely to be located
Building a margin of error around our sample mean
Confidence interval:
\(\text{sample statistic} \pm \text{margin of error}\)
⬅️
All confidence intervals take this form
\[ \bar{X} \]
Confidence interval:
\(\text{sample statistic} \pm \text{margin of error}\)
\(\text{sample statistic} \pm z \text{(standard error)}\)
\(\bar{X} \pm z(\sigma_{\bar{X}})\)
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
To create a \(95\%\) confidence interval, go out \(1.96\) standard errors on each side of the sample mean
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
\[ \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}} \]
Example: Say you know that your sample of 100 people comes from a population with a standard deviation of 8.0
\[ \sigma_{\bar{X}} = \frac{\sigma}{\sqrt{n}} = \frac{8.0}{\sqrt{100}} = 0.8 \]
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
Margin of error = how far out on each side of the sample mean we need to go to define our confidence interval
\[ \text{margin of error} = z(\sigma_{\bar{X}}) = z(\frac{\sigma}{\sqrt{n}}) \]
Margin of error for our example:
\[ z(\frac{\sigma}{\sqrt{n}}) = (1.96)(0.8)= 1.57 \]
Interpretation:
Need to go out 1.57 hours on each side of the sample mean to be 95% confident that we have captured the true population mean.
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
Confidence interval:
\(\text{sample statistic} \pm \text{margin of error}\)
Example:
\[ 14.5 + 1.57 = 16.07 \]
\[ 14.5 - 1.57 = 12.93 \]
\(95\%\) confidence interval:
\(12.93\) to \(16.07\) hours
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
Example:
\(95\%\) confidence interval:
\(12.93\) to \(16.07\) hours
We are \(95\%\) confident that the true average number of hours studied for the population of UW students is between \(12.93\) to \(16.07\) hours
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
\(\text{sample statistic} \pm \text{margin of error}\)
\(\text{sample statistic} \pm \text{margin of error}\)
\(90\%\) confidence interval:
\(4.09\) to \(4.91\) hours
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
\(\text{sample statistic} \pm \text{margin of error}\)
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
All else being equal, the second one is preferable because it is more precise
(narrower, with smaller margin of error)
\[ \text{margin of error} = z(\frac{\sigma}{\sqrt{n}}) \]
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
Example:
\[ \widehat{p} \]
Create our 95% confidence interval by going 1.96 standard errors on each side of the sample proportion
Building a margin of error around our sample proportion
Confidence interval:
\(\text{sample statistic} \pm \text{margin of error}\)
Step 1: Decide on a confidence level and corresponding z-score
Step 2: Calculate the standard error
Step 3: Calculate the margin of error
Step 4: Calculate the confidence interval
Step 5: Interpret the results
50% | 60% | 70% | 80% | 90% | 95% | 96% | 98% | 99% | 99.5% | 99.9% | |
---|---|---|---|---|---|---|---|---|---|---|---|
Z* | 0.674 | 0.841 | 1.036 | 1.282 | 1.645 | 1.960 | 2.054 | 2.326 | 2.576 | 2.807 | 3.291 |
To create a \(95\%\) confidence interval, go out \(1.96\) standard errors on each side of the sample mean
\[ \sigma_{\widehat{p}} = \sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}} \]
where \(\widehat{p}\) = sample proportion
\(n\) = sample size
Example: With sample size of 200 and sample proportion of 0.42
\[ \sigma_{\widehat{p}} = \sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}} = \sqrt{\frac{0.42(1-0.42)}{200}} = 0.035 \]
Margin of error = how far out on each side of the sample mean we need to go to define our confidence interval
\[ \text{margin of error} = z(\sigma_{\widehat{p}}) = z(\sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}}) \]
Margin of error for our example:
\[ z(\sqrt{\frac{\widehat{p}(1-\widehat{p})}{n}}) = (1.96)(0.035) = 0.069 \]
Interpretation:
Need to go out 0.069 in each direction of the sample proportion to be 95% confident that we have captured the true population proportion.
Confidence interval:
\(\text{sample statistic} \pm \text{margin of error}\)
Example:
\[ 0.42 + 0.069 = 0.489 \]
\[ 0.42 - 0.069 = 0.351 \]
\(95\%\) confidence interval:
\(0.351\) to \(0.489\)
Example:
\(95\%\) confidence interval:
\(0.351\) to \(0.489\)
We are \(95\%\) confident that between \(35.1\%\) and \(48.9\%\) of the population of students are employed during the school year.