- hypothesis testing: use a sample statistic to test a claim about a population parameter
- null hypothesis : the status quo, no effect, fixes the value or ( “p naught” )
- alternative : the change or effect you’re looking for
- the whole question is how far the statistic sits from the null value, or
- small difference: natural sampling variability, “could happen by chance alone”
- big difference: the statistic isn’t behaving the way says it should
- distance is counted in standard errors, that’s the test statistic ( for a mean, with degrees of freedom )
- p-value ( P-Value ): probability of a test statistic at least this extreme if is true
- not the probability is true, it’s how surprising the data would be if it were
- p-value : reject ; p-value : fail to reject, the test is inconclusive ( not proof of )
- type I error: rejecting a true ( happens at rate ); type II error: failing to reject a false
- a two sided test at level agrees with a confidence interval: reject exactly when falls outside it
example: salt per storm
Example
Civil engineers collected data from one area of Wisconsin on the amount of salt (tons) used to keep highways drivable during a snowstorm. Historic use of salt in that area was 2000 tons per storm. The amount of salt for storms has tons and tons. Test the claim that the mean salt use per storm has decreased.
- means, not proportions, so a test: , , ,
- ( no decrease ), ( decrease )
- p-value on the TI-84:
tcdf(-1E99, -2.015, 44), about 1 in 40 - , so reject at 5%, but it’s only moderate evidence, and then the decision gets contextual
- David, environmental lobbyist at “Save the Earth”: “any victory, no matter how small, is a victory for the environment”, takes it as enough
- Alex, DPW budget analyst: “we can’t afford to waste money on unnecessary environmental programs”, wants more before acting
Python
Output