# Hypothesis Testing In this chapter, you will learn about • the language of hypothesis testing • how to perform a test

for the parameter p, μ and λ for the Binomial, Normal and Poisson distributions respectively. • Type I and Type II errors associated with hypothesis tests. Hypothesis Testing or Significance Testing is the process of testing the validity of an assumption made about a population parameter. Using statistical theory, we are able to back up our argument and conclusions concerning the validity of the assumption made. To do this, information from samples are used as information in making decisions as to whether the assumption made about the population parameter is correct or not. Steps In Conducting Hypothesis Testing STEP 1: Define the variable X, the binomial variable or the Poisson variable or the Normal variable being considered and the general form of its distribution, for example X ∼ Bin(12, p), X ∼ Po(2) or X ∼ N(20, 5). STEP 2: Formulating the hypothesis (State Ho and H1).

State the null hypothesis, Ho and alternative hypothesis, H1. Null Hypothesis is the assumed or hypothesized value of the population parameter before sampling is done. It is the hypothesis that one is interested in testing and tries to reject. In short, what is claimed by someone is categorized under null hypothesis. Alternative Hypothesis is the opposite of the null hypothesis. It describes the situation if Ho is not true. There are three different rules to be considered when formulating the null and alternative hypothesis. Ho : µ = µo H1 : µ ≠ µo Ho : p = po Ho : λ = λo H1 : p ≠ po H1 : λ ≠ λo

indicates a two-tailed test (both tail ends considered for critical regions)

Ho : µ = µo H1 : µ > µo

Ho : p = po Ho : λ = λo H 1 : p > p o H o : λ > λo

indicates a one-tailed test (upper tail considered for critical region)

Ho : µ = µo H1 : µ < µo

Ho : p = p o H 1 : p < po

Ho : λ = λo H o : λ < λo

indicates a one-tailed test (lower tail considered for critical region)

Note: i) H1 cannot have an “= “sign. It can only take " ≠ " , " < " or " > " sign. ii) The values of µo ,po and λo are the same for µ1,p1 and λ1.

**STEP 3: State the distribution according to Ho.
**

Examples: If Ho is true, then X ∼ Bin(20, 0.25) If Ho is true, then X ∼ Po(2) If Ho is true, then X ∼ N(20, 5)

STEP 4: State level and type of test (Optional)

1

Determine whether the test is a one-tail test or a two-tail test. To determine whether the test is a one-tailed or a two-tailed test, consider the alternative hypothesis. If the test follows Rule 1, then the test is a two-tailed test. If the test follows Rule 2 and Rule 3 , then the test is a one-tailed test. In a one-tailed test, the alternative hypothesis specifies a definite increase or decrease in the parameter being tested.

**STEP 5: State the rejection criteria.
**

To determine the critical regions (rejection regions) and the critical values, we must consider Step 2 and the level of significance, α. The significance level α is the probability that the test statistic lies in the critical region.

STEP 6: Calculate the required probability (for the Binomial and the Poisson distributions) or the z-value (for the Normal distribution).

To determine the required probability (for the Binomial and the Poisson distributions) or the z-value (for the Normal distribution), different formulae will be used for different situations. For Binomial distribution use P(X= x ) = n C x p x q n − x For Poisson distribution use P(X = x) = For Normal distribution use z =

x−µ

σ

n

e −λ λx x!

or z =

x−µ

ˆ σ n

**STEP 7: Making Conclusion
**

If the test statistic lies in the rejection region, then we conclude that the null hypothesis is rejected at the α% level. Otherwise, it is not rejected.

Hypothesis Test For A Binomial Proportion, p (small sample size) 1. A student is examining the probabilities associated with a traditional drawing pin. She has read in a book that the probability, p, that a drawing pin lands ‘point up’ when dropped onto a table is 0.35. She decides to test this theory and drops a drawing pin 10 times. The pin ‘point up’ on 8 occasions. Test, at the 5% level, whether or not there is evidence that p is greater than 0.35.

Step 1: Step 2: Step Step Step Step 3: 4: 5: 6: X – the number of times the pin lands ‘point up’ out of the 10 trials. Ho: p = 0.35 (probability, p that a drawing pin lands ‘point up’ is 0.35) H1: p > 0.35 (probability, p that a drawing pin lands ‘point up’ is > 0.35) If Ho is true, then X ∼ Bin(10, 0.35) Use a one-tailed test (Upper tail) at the 5% test Reject Ho if P(X ≥ 8) < 0.05 P(X ≥ 8) = P(X = 8) + P(X = 9) + P(X = 10) =

10 10

C8 (0.35) 8 (0.65) 2 + 10 C 9 (0.35) 9 (0.65)1 +

C10 (0.35)10 (0.65) 0

Step 7:

= 0.004281 + 0.0005123 + 0.00002759 = 0.004796 = 0.00480 < 0.05 Since P(X ≥ 8) < 0.05, we reject Ho and conclude that there is evidence that p is greater than 0.35

2

2. The probability that an oyster larva will develop in unpolluted water is 0.9, while in polluted water this probability is less than 0.9. An oyster breeder put 20 larvae in a sample of water and observed that only 16 of them develop. Use a 10% significance level to determine whether the breeder would be justified in concluding that the water is polluted.

Step 1: Step 2: X – the number of oyster larva will develop in unpolluted water Ho: p = 0.90 (the probability that an oyster larva will develop in unpolluted water is 0.9) H1: p < 0.90 (the probability that an oyster larva will develop in unpolluted water is less than 0.9) If Ho is true, then X ∼ Bin(20, 0.9) Use a one-tailed test (Lower tail) at the 10% test Reject Ho if P(X ≤ 16) < 0.10 P(X ≤ 16) = 1 – P(X ≥ 17) = 1 – 0.86705 = 0.132953323 = 0.133 > 0.10 Since P(X ≤ 16) > 0.10, we accept Ho and conclude that the breeder is not justified in concluding that the water is polluted.

Step Step Step Step

3: 4: 5: 6:

Step 7:

3. A schoolgirl made this statement: “My grandfather said that in his days 80% of people agreed that mathematics is not a woman’s subject, but in my class of 20, 19 pupils agreed that mathematics is not a woman’s subject, so this shows that opinions have changed.” Assuming that it is valid to perform a hypothesis test based on these figures, show that there is evidence at the 5% level of significance that opinions have changed.

Step 1: Step 2: X – the number of oyster larva will develop in unpolluted water Ho: p = 0.80 (opinions have not changed) H1: p ≠ 0.80 (opinions have changed) If Ho is true, then X ∼ Bin(20, 0.80) Use a two-tailed test (Lower tail) at the 10% test Reject Ho if P(X ≥ 19 ) < 0.025 P(X ≥ 19) = 0.0692 > 0.025 Since P(X ≥ 19) > 0.025, we accept Ho and conclude that opinions have not changed.

Step Step Step Step

3: 4: 5: 6:

Step 7:

Consider X ∼ Bin (8, 0.4). Suppose we wish to test, at the 5% level of significance, on the basis of a sample observation of x, whether p is 0.4 or whether p > 0.4. The sample value obtained is x = 7. 5. A coin is tossed 6 times. Test, at the 5% level, whether the coin is biased towards heads if (a) 6 heads are obtained (b) 5 heads are obtained. 6. Records kept in a hospital show that 3 out of every 10 casualties who come to the casualty department have to wait more than half an hour before receiving medical attention. Therefore the hospital decided to increase the staff of the department member and it was found that of the next 20 casualties 2 had to wait more than half an hour for medical attention. Test at the (a) 2%, (b) 5% level whether the new staffing decreased the number of casualties who have to wait more than half an hour for medical attention. 7. In a test of 10 true-false questions a student gets 8 correct. The student claims she was not guessing. Test this claim at the 5% level.

4.

3

8. The probability that a certain type of seed germinating is 0.7. The seeds undergo a new treatment, and when a packet of 10 seeds is tested 9 germinate. Is this evidence, at the 5% level, of an increase in the germination rate? 9. An article in a newspaper claimed that only 40% of people agree with proposals for a new bypass. A skeptical reader thought that the true figure was more than 40%. She asked 10 friends and 7 agreed with the proposals. As a result, she wrote to the newspaper to argue her case. Formulate suitable null and alternative hypotheses, and test, at the 10% significance level, the newspaper’s claim. Comment on the validity of this test in the context of this particular sample. 10.It has been established that 35% of children at a particular school reach a given reading standard by the age of 7. Following the introduction of a new reading scheme, the teacher wants to know whether it makes any difference to the proportion. Find the critical values she should use for a class of 10 in order to reject the hypothesis p = 0.35 in favor of the alternative hypothesis p ≠ 0.35. Use a 5% level of significance. 11.The standard drug for treating a certain medical condition causes serious side effects with 40% of patients. A new drug is introduced which, according to its manufacturer, gives a reduced risk of serious side effects. (a) State suitable null and alternative hypotheses to test the manufacturer’s claim. (b) A hospital consultant agrees to use the new drug to treat a random sample of 20 patients, all of whom consent. The consultant decides to accept the manufacturer’s claim if fewer than four patients suffer serious side effects. State the critical region and find the significance level of the test. (c)The test assumes that the effect of the drug on one patient is independent of its effect on other patients. Give one reason why this may not be true. Textbook: Exercise 10a Page 494 - 495 Miscellaneous Exercise 10c Page 504 – 506 Mixed Test 10A Page 506 Answer

4. P(X ≥ 7) = 0.00852 < 0.05; Reject Ho . We can conclude that p > 0.4 5. (a) P(X = 6) = 0.015625 < 0.05; Reject Ho . We can conclude that the coin is biased towards heads (b) P(X ≥ 5) = 0.109375 > 0.05; Accept H o . We can conclude that the coin is not biased towards heads 6. (a) P(X≤ 2) = 0.0355 > 0.02; Accept Ho. We can conclude that there is no evidence of a decrease in the number of casualties who have to wait more than half an hour for medical attention. (b) P(X≤ 2) = 0.0355 < 0.05; Reject H o. We can conclude that the new staffing has decreased the number of casualties who have to wait more than half an hour for medical attention. 7. P(X ≥ 8) = 0.3828 > 0.05; Accept Ho. We can conclude that she was guessing. 8. P(X ≥ 9) = 0.149 > 0.05; Accept Ho. We can conclude that there is no evidence of an increase in the germination rate. 9. P(X ≥ 7) = 0.0548 < 0.10; Reject H o . We can conclude that the newspaper’s claim is not correct.

10. p ( X = 10) = C (0.35)10 (0.65) 0 = 0.00002759 ; p ( X = 9) = C (0.35) 9 (0.65)1 = 0.0005123 10 10 10 9

4

8 2 7 3 p ( X = 8) =10 C8 (0.35) (0.65) = 0.004281 ; p ( X = 7 ) =10 C 7 (0.35) (0.65) = 0.02120 p(X ≥ 7) = 0.0260 > 0.025 0 10 p ( X = 0) =10 C 0 (0.35) (0.65) = 0.01346 1 9 p ( X = 1) =10 C1 (0.35) (0.65) = 0.07249 p(X ≤ 1) = 0.0860 > 0.025 Therefore, critical values: X ≥ 8 or X = 0 11.(b) p ( X = 0) = C (0.40) 0 (0.60) 20 = 0.00003656 20 10 1 19 p ( X = 1) = 20 C1 (0.40) (0.60) = 0.0004875 2 18 p ( X = 2) = 20 C 2 (0.40) (0.60) = 0.003087 3 17 p ( X = 3) = 20 C 3 (0.40) (0.60) = 0.01235 4 16 p ( X = 4) = 20 C 4 (0.40) (0.60) = 0.03499 Critical region: X < 4. Significance level = P(X ≤ 4) = 0.05095 = 0.0510 = 5.10%

**To test the population proportion, p, of a binomial distribution when the sample size is large z=
**

(p s ± 1 2n n ) − po

po q o

z=

(x ± 0.5) − np

npq

1. In the recent poll, only voters who had actually voted at the previous election were interviewed and out of a random sample of 850 such people, 324 said that they intended to support Party X. At the previous election the percentage of voters supporting the party was 41%. Test, at the 5% level of significance, whether support for the party among previous voters had decreased since the last election, stating your conclusions clearly.

Ho : p = 0.41 (support for the party had not decreased) H1 : p < 0.4 (support for the party had decreased) Reject Ho if z < − 1.645 324 1 [ + ] − 0.41 (324 + 0.5) − 850(0.41) 850 2(850) z= = −1.674 z= = −1.674 (0.41)(0.59) 850(0.41)(0.59) 850 Since z < − 1.645, we reject Ho . We can conclude that the newspaper’s claim is not correct.

2.

The manufacturer of ‘Chummy Morsels’ claims that 8 out of 10 dogs chose his product rather than that produced by a rival firm. In a random sample of 200 dogs, 152 chose Chummy Morsels, and the

5

rest chose the rival brand. Comment on the manufacturer’s claim at the 5% level of significance. 3. A large college claims that it admits equal numbers of men and women. In a random sample of 500 students at the college there were 267 males. Is there evidence, at the 5% level, that the college population is not evenly divided into males and females? 4. In an investigation into ownership of calculators, 200 randomly chosen school students were interviewed, and 143 of them owned a calculator. Using the evidence of this sample, test, at the 5% level of significance, the hypothesis that the proportion of school students owning a calculator is 75% against the alternative hypothesis that the proportion is less than 75%. 5. A student is examining the probabilities associated with a traditional drawing pin. She has read in a book that the probability, p, that a drawing pin lands ‘point up’ when dropped onto a table is 0.35. She decides to test this theory and drops a drawing pin 400 times. The pin ‘point up’ on 153 occasions. Test, at the 5% level, whether or not there is evidence that p is greater than 0.35. Textbook: Exercise 11c Page 532 - 533 Answer

2. z = −1.325; Since z > − 1.645, we accept Ho. The manufacturer’s claim is correct. 3. z = 1.48; Since − 1.645 < z < 1.645 we accept Ho. The college population is evenly divided into males and females 4. z = − 1.061; Since z > − 1.645, we accept Ho. The proportion of school students owning a calculator is 75% 5. z = 1.31; Since z < 1.645, we accept Ho. p > 0.35.

6