Goal: estimate unknown population parameters using sample statistics as point estimates for the unknown population parameters
Continuous data: the unknown population parameter is often \(\mu\), which we estimate with \(\bar{x}\)
Categorical data: the unknown population parameter is often \(p\), which we estimate with \(\hat{p}\)
Requires that we account for sampling variation, which we do by estimating the standard deviation of the sampling distribution (SE)
\(SE(\bar{x})=\frac{s}{\sqrt{n}}\), where \(s\) is the sample standard deviation and \(n\) is the sample size
\(SE(\hat{p})=\sqrt{\frac{\hat{p}(1-\hat{p})}{n}}\), where \(\hat{p}\) is the proportion of successes in the sample and \(n\) is the sample size
Statistical Inference for One Population (Proportion)
Are greenhouse gases, such as those resulting from the combustion of coal, oil, natural gas, and other materials, causing average global temperatures to rise?
Statistical Inference for One Population (Proportion)
H: More than 50% of Oklahoma residents believe that greenhouse gases are causing average global temperatures to rise
\(H_0: p = 0.50\)
\(H_A: p > 0.50\)
Point estimate: \(\hat{p}=0.571\)
Standard error: \(SE(\hat{p})=\sqrt{\frac{0.571(1-0.571)}{2547}}=0.007\)
On a scale from zero to ten, where zero means no risk and ten means extreme risk, how much risk do you think global warming poses for people and the environment?
Difference of Means
On a scale from zero to ten, where zero means no risk and ten means extreme risk, how much risk do you think global warming poses for people and the environment?
survey_data %>%drop_na(gender, glbcc_risk) %>%group_by(gender) %>%summarise(n =n(), mean =mean(glbcc_risk), s =sd(glbcc_risk), se = s / (sqrt(n)))
# A tibble: 2 × 5
gender n mean s se
<dbl> <int> <dbl> <dbl> <dbl>
1 0 1512 6.13 2.98 0.0767
2 1 1023 5.67 3.18 0.0994
Difference of Means (Math)
\(H_0: \bar{x}_1-\bar{x}_2 = 0\)
\(H_A: \bar{x}_1-\bar{x}_2 \neq 0\)
Point estimate: \(\bar{x}_1-\bar{x}_2=6.13-5.67=0.46\)
Standard error: \(SE(\bar{x}_1-\bar{x}_2)=\sqrt{(0.077^2+0.099^2}=0.125\)
Are greenhouse gases, such as those resulting from the combustion of coal, oil, natural gas, and other materials, causing average global temperatures to rise?
Difference of Proportions
Are greenhouse gases, such as those resulting from the combustion of coal, oil, natural gas, and other materials, causing average global temperatures to rise?
Welch Two Sample t-test
data: survey_data$glbcc_risk by survey_data$gender
t = 3.6927, df = 2097.5, p-value = 0.0002275
alternative hypothesis: true difference in means between group 0 and group 1 is not equal to 0
95 percent confidence interval:
0.2174340 0.7099311
sample estimates:
mean in group 0 mean in group 1
6.134259 5.670577