Home page for accesible maths 2.9 Hypothesis testing

Style control - access keys in brackets

Font (2 3) - + Letter spacing (4 5) - + Word spacing (6 7) - + Line spacing (8 9) - +

2.9.5 Two-sided hypothesis testing with p-values

We now consider how to compute a p-value for a two-sided test. In one-sided tests, we shade the single tail in the direction of the alternative hypothesis. For example, when the alternative had the form μ>7.45, then the p-value was represented by the upper tail (Figure LABEL:pValueOneSidedSleepStudyExplained). When the alternative was μ<46.99, the p-value was the lower tail (Exercise 2.9.10). In a two-sided test, we shade two tails since evidence in either direction is favourable to HA.



Caution: One-sided hypotheses are allowed only before seeing data After observing data, it is tempting to turn a two-sided test into a one-sided test. Avoid this temptation. Hypotheses must be set up before observing the data. If they are not, the test must be two-sided.