One- and two-tailed tests

In the earlier telepathy example, the null hypothesis parameter value was that the probability of correctly picking the shape on a card was a third. The alternative hypothesis was that telepathy had occurred and this probability was higher,

Since the alternative hypothesis only involves parameter values on one side of the null hypothesis value, this is called a one-tailed test. In other situations, the alternative hypothesis allows for parameter values on either side of the null hypothesis value, such as

where \(\pi_0\) is some constant (such as \(\diagfrac {\small 1} {\small 3}\)). This is called a two-tailed test.

P-value for two-tailed test

A two-tailed test is usually based on the same test statistic that would be used for the corresponding one-tailed test — its value is affected by the parameter being tested and its distribution is fully known when the null hypothesis is true. However values in both tails of its distribution usually give support to the alternative hypothesis and this must be taken into account when evaluating the p-value for the test.

The p-value is double the smaller tail area of the test statistic, to take account of the fact that values in the opposite tail of the distribution would give equally strong evidence against H0.

This is most clearly explained in an example.

Example: Ethics codes in companies

In 1999, The Conference Board surveyed 124 companies and found that 97 had their own ethics codes ("Business Bulletin", Wall Street Journal, Aug 19, 1999). In 1997, it was believed that 72% of companies had ethics codes, so is there any evidence that the proportion has changed?

This question is equivalent to asking whether a sample proportion of 97 out of 124 is consistent with sampling from a population with π = 0.72. This can be expressed as the hypotheses

If H0 is true, we would expect about (0.72 × 124) = 89 of the companies to have ethics codes. A sample count that is either much greater than 89 or much less than 89 would suggest that the probability had changed. If the null hypothesis is correct, the number with an ethics code will be

\[ X \;\;\sim\;\; \BinomDistn(n=124, \pi = 0.72) \]

This distribution is shown in the bar chart below.

Drag the slider to x = 97. The probability of getting as many as 97 companies with ethics codes is 0.0718. Since this is a 2-tailed test, we must also take account of the probability of getting a count that is as unusually low, so the p-value is twice this, 0.1436.

Getting 97 companies with ethics codes is therefore not unlikely, so we conclude that there is no evidence from these data of a change in the proportion of companies with ethics codes since 1997.