Statistics, Part II
CONFIDENCE INTERVALS, AND HYPOTHESIS TESTING
LECTURE 10
PSTAT 100: Spring 2024
Instructor: Ethan P. Marzban
2
AGENDA
Quick Recap
3
Population
(µ, σ, m, etc.)
Sample
(X1, X2, …, Xn)
Observed Instances
(x1, x2, …, xn)
DRAW
INFER
Estimation Terminology
Sample
(X1, X2, …, Xn)
Observed Sample Values
(x1, x2, …, xn)
θ̂n := g(X1, …, Xn)
θ̂n(x1, …, xn)
Estimator
Estimate
Confidence Intervals
Using only a point estimate is like fishing in a murky lake with a spear. We can throw a spear where we saw a fish, but we will probably miss. On the other hand, if we toss a net in that area, we have a good chance of catching the fish.
(page 181)
Confidence Intervals
Confidence Intervals
(estimate) ± (margin of error)
(estimate) ± c * sd(estimator)
Confidence Interval for a Proportion
�
Confidence Interval for a Proportion
Confidence Interval for a Proportion
Confidence Interval for a Mean
Hypothesis Testing
12
https://media2.giphy.com/media/v1.Y2lkPTc5MGI3NjExNXBnYTA4eXJvaHp0bXVzMWNuMzBnMWg4eGtmbTgyMGh4cG4xOGF5NCZlcD12MV9pbnRlcm5hbF9naWZfYnlfaWQmY3Q9Zw/gw3IWyGkC0rsazTi/giphy.gif
Hypothesis Testing
Image Source: https://www.treehugger.com/thing-didnt-know-polydactyl-cats-4864197
Hypothesis Testing
Null and Alternative Hypotheses
H0: p = 0.1
Null and Alternative Hypotheses
H0: p = p0
Null and Alternative Hypotheses
H0: µ = µ0
Test for a Proportion
H0: p = p0
HA: p ≠ p0
IF P̂ is far away from p0 (in either the negative or positive direction), REJECT H0 in favor of HA.
Test for a Proportion
IF P̂ is far away from p0 (in either the negative or positive direction), REJECT H0 in favor of HA.
IF |P̂ – p0| > c , REJECT H0 in favor of HA.
Errors
| State of H0: | ||
| | True | False |
Reject H0 | | | |
Fail to Rej. H0 | | |
Result of test
Errors
| State of H0: | ||
| | True | False |
Reject H0 | BAD | GOOD | |
Fail to Rej. H0 | GOOD | BAD |
Result of test
Errors
| State of H0: | ||
| | True | False |
Reject H0 | Type I Error | GOOD | |
Fail to Rej. H0 | GOOD | Type II Error |
Result of test
Errors
Level of Significance
Critical Value
–c
c
Two-Sided Test for a Hypothesis
H0: p = p0
HA: p ≠ p0
Demo: Are We Bikers?
27
Article Source: https://dailynexus.com/2024-02-16/navigating-the-bike-friendly-campus-challenges-and-solutions-at-ucsb/
Summary: Tests for Proportions
p-Value
Summary: Tests for Means
Summary: Tests for Means
Caution!