This lecture reviews the concepts of statistical estimation and inference:
There is an interactive widget in this lecture’s slides – please see class website :)
point estimate
A point estimate is a sample statistic that estimates the value of a population parameter; this estimate is based on the sample data.
Sample statistics estimate population parameters.
confidence interval
A confidence interval is a range of plausible values for the parameter under investigation; this estimate is based on the sample data.
Lower bound: minimum plausible value for the parameter according to the data
Upper bound: maximum plausible value for the parameter according to the data
Confidence intervals are found for population parameters.
level of estimation
The level of estimation is the expected proportion of intervals that will contain the true value of the population parameter if the population is repeatedly sampled.
A common level of estimation is 95%.
\text{point estimate} \ \pm \ \text{margin of error}
Lower bound = point estimate - margin of error
Upper bound = point estimate + margin of error
The margin of error is the critical value \times standard error.
The critical value will depend on the level of confidence and the sampling distribution of the point estimate.
The standard error corresponds to the point estimate.
The Ponyville Spa claims average wait time for a treatment with Rarity and Fluttershy is 8 minutes, but guests believe it is longer.
Analyst determines that the 95% CI for \mu is (8.09, 11.91).
We are 95% confident the true average wait time at the Ponyville Spa during the summer rush is between 8.09 and 11.91 minutes.
Takeaway: because the interval is larger than 8, the average wait time is likely longer than 8 minutes.
Ponyville wonders if the nightly campfire sing-alongs are less popular at Sweet Apple Acres than at the Ponyville Schoolhouse.
Analyst determines that the 95% CI for \pi_{\text{Acres}} - \pi_{\text{School}} is (– 0.321, 0.021).
We are 95% confident the true difference in campfire attendance proportions (Acres – School) is between –0.321 and 0.021.
Takeaway: because the interval contains 0, we cannot conclude that one location’s campfire is more popular than the other.
hypothesis testing
Hypothesis testing is a statistical procedure that allows us to make inferences about population parameters based on sample data.
General steps:
Make a statement about the nature of the population.
Collect evidence to test the statement.
Analyze the data to determine the plausibility of the statement.
hypothesis
A statistical hypothesis is a statement regarding the population parameter.
We will be stating two hypotheses: the null and the alternative.
H_0: null hypothesis a mathematical statement about the population parameter; this hypothesis is assumed true until evidence indicates otherwise.
H_1: alternative hypothesis a statement about the population parameter that contradicts the null hypothesis; this is also called the research hypothesis.
Note! H_0 + H_1 should cover the real line, \mathbb{R}.
One sample tests
Examples:
Two sample tests
Examples:
“Ponies spend more at the Crystal Empire fair than at the Ponyville fair”
“The proportion of ponies who purchase VIP cloud-seats differs between season-pass holders and single-day ticket holders”
“The wait time for a ride is different in the morning vs. the afternoon on the same day”
Once we have the alternative hypotheses, we know the null hypothesis is in the “opposite direction.”
After stating our hypotheses, we will construct an appropriate test statistic.
The choice of test statistic depends on:
The hypotheses being tested.
Assumptions made about the data.
The value of the test statistic depends on the sample data.
p-value
The p-value is the probability of observing our test statistic or one more extreme.
Mathematically,
Right-tailed test: P[\text{distribution} \ge \text{test statistic}]
Left-tailed test: P[\text{distribution} \le \text{test statistic}]
Two-tailed test: P[\text{distribution} \ne \text{test statistic}]
We use rejection regions to determine if we reject the null or fail to reject the null.
Classical approach: critical values and statistical tables.
Modern approach: p-values.
All rejection regions will take the same form:
Wait, what is \alpha?
A Type I error (\alpha) means that we reject the null when we should not.
A Type II error (\beta) means that we fail to reject the null when we should not.
We should choose \alpha based on the level of error we are willing to withstand.
The \alpha that is commonly used is \alpha=0.05.
Sometimes, smaller \alpha is used. e.g., clinical trial \to \alpha=0.01.
We draw a conclusion by following the instructions of our rejection region.
If p < \alpha, we reject the null hypothesis.
If p \ge \alpha, we fail to reject the null hypothesis.
Note the language – “fail to reject” is not the same as “accept.”
We will always report our results in the context of the problem.
Examples:
There is sufficient evidence to suggest that the average daily spending of ponies at the Crystal Empire fair is greater than 50 bits.
There is not sufficient evidence to suggest that the proportion of ponies who purchase VIP cloud-seats differs between season-pass holders and single-day ticket holders.
For class purposes, you will be reporting all hypothesis test pieces.
The Ponyville Spa claims average wait time for a treatment with Rarity and Fluttershy is 8 minutes, but guests believe it is longer.
Hypotheses
Test Statistic and p-Value
The Ponyville Spa claims average wait time for a treatment with Rarity and Fluttershy is 8 minutes, but guests believe it is longer.
Test Statistic and p-Value
Rejection Region
Conclusion and Interpretation
Ponyville wonders if the nightly campfire sing-alongs are less popular at Sweet Apple Acres than at the Ponyville Schoolhouse.
Hypotheses
Test Statistic and p-Value
Ponyville wonders if the nightly campfire sing-alongs are less popular at Sweet Apple Acres than at the Ponyville Schoolhouse.
Test Statistic and p-Value
Rejection Region
Conclusion and Interpretation
For the purpose of ribbon distribution, the lead organizer at the Ponyville Fair asks if cabin type (Cutie Mark Crusaders, Element of Harmony, Wonderbolts, or Crystal Empire) affects meadow preference (Sweet Apple Orchard, Everfree Edge, or Sparkle Springs).
Hypotheses
Test Statistic and p-Value
For the purpose of ribbon distribution, the lead organizer at the Ponyville Fair asks if cabin type (Cutie Mark Crusaders, Element of Harmony, Wonderbolts, or Crystal Empire) affects meadow preference (Sweet Apple Orchard, Everfree Edge, or Sparkle Springs).
Test Statistic and p-Value
Rejection Region
Conclusion and Interpretation
Hypothesis testing depends on sample size.
We must ask ourselves if the value we are testing against makes practical sense.
Would you care about a new weight loss medication where the average amount of weight lost was 1 lb over 6 months?
Would you care about a new teaching method that only raised final exam scores by 2 points?
point estimation: best guess at the population parameter.
interval estimation: range of plausible values of the population parameter.
hypothesis testing: formal way to evaluate evidence against a claim.
As we move forward, we will see how all of these concepts are connected.
Both confidence intervals and hypothesis tests are based on the same sampling distributions of point estimates.
In statistical theory, interval estimates are derived from test statistics.