Download presentation

Presentation is loading. Please wait.

Published byMarianna Morton Modified over 5 years ago

1
The smokers’ proportion in H.K. is 40%. How to testify this claim ?

2
The smokers’ proportion in H.K. is 40%. What kind of hypothesis ? Hypothesis Testing Statistical hypothesis assumption about parameter of population, e.g. It’s impractical to investigate the whole population, we just select a sample and base on the information yielded to perform testing. This kind of testing is called

3
Two kinds of Hypothesis John: The coin I am holding is fair. May: I don’t believe. I want to test. Let p = probability that obtaining a head. We have two kinds of hypothesis. (1) The coin is fair, p = 0.5. (2) The coin is not fair, p 0.5. is called the null hypothesis. is called the alternative hypothesis. Denoted as H 0 Denoted as H 1 “null” means nothing, for this e.g., the coin is fair, nothing special. H 0 : p = 0.5 H 1 : p 0.5 We write

4
Two kinds of Testing H 0 : = 0 H 1 : 0 Two-tailed test H 0 : = 0 H 1 : > 0 One-tailed test H 0 : = 0 H 1 : < 0 One-tailed test OR

5
Decision making Before testing, choose a level of significance, For this level of significance, we can find a corresponding critical value z c. In AL, we need to test involving normal distribution only. Test statistic z = Estimate: a sample parameter to estimate that of population. e.g. sample mean is an estimate for population mean. Hence estimate is normally distributed in A.L. in general. z ~ N(0,1) What’s the relation between and z c ?

6
N(0,1) zczc /2 zczc zczc N(0,1) zczc For One-tailed Test OR For Two-tailed Test If the test statistic lies in the shaded region, we reject H 0, otherwise, accept. H 0 : = 0 H 1 : > 0 H 0 : = 0 H 1 : < 0 H 0 : = 0 H 1 : 0

7
Test statistic z = The test is OK if population data has normal distribution and any sample size, population data has any distribution and sample size is large, (n > 30) OR

8
E.g. 39 Given : I.Q. of children is H.K. ~ N(100,20). A group of 62 children has mean I.Q. = 102.6. Is the sample group more intelligent than population? Let x be the sample mean, then Given (significance level) = 0.05 Estimate = 102.6 Test statistic z = = 1.02 We want to test whether the group is more intelligent or not. The null hypothesis is: the group is nothing special!In symbol,H 0 : x = 100 H 1 : x > 100The alternative hypothesis is: the group is more intelligent!In symbol, This is a one-tailed test N(0,1) zczc = 0.05 By table, z c = 1.645 Since 1.02 < 1.645, i.e. The test statistic z doesn’t lie in shaded region! z Conclusion: we accept H 0 at a significance level of 0.05 Caution: we are NOT saying that H 0 is true!!

9
E.g. 41 A lathe is adjusted so that dimension mean = 20 cm. A sample of 40 is selected and sample mean = 20.1 cm and s.d. = 0.2 cm. Do the results, test at 0.05 significance level, indicate that the machine is out of adjustment ? H 0 : the machine is nothing special, not out of adjustment. Let x = sample mean, then H 0 : x = 20 H 1 : the machine is special, it is out of adjustment. H 1 : x 20 Estimate = 20.1 Test statistic z = This is a two-tailed test N(0,1) /2 zczc zczc = 3.16 = 0.05 By table, z c =1.96 Since 3.16 > 1.96, i.e. The test statistic z does lie in shaded region! z Conclusion: we reject H 0 at a significance level of 0.05 Caution: we are NOT saying that H 0 is untrue!!

10
x is a random variable, so is the test statistic z. The test statistic z is normally distributed. Reject H 0 H 0 is false Hence z can lie on any region in ( , ) z lies in the “rejecting region”, either N(0,1) /2 zczc zczc z N( ,1) z You’re lucky! z has small chance to lie in the region and you got it. However, the mean = 0 may be true, i.e. H 0 may be true! A OR The sample selected is ordinary. z doesn’t lie in extreme regions, indicating that the true mean is (>0) i.e. the mean = 0 is untrue, i.e.H 0 is false! B In hypothesis testing, we adopt the concept B.

11
E.g. 46 In a chemical plant the acid content of the effluent from the factory is measured frequently. From 400 measurements the acid content in gram per 100 liters of effluent is recorded in the following frequency distribution. Acid content1213141516 Frequency5522357434 (a) Find the mean acid content and the standard error of the mean. = 14.2 s= 0.815 (b) Assuming a normal distribution of acid content, give 95% confidence limits for the mean acid content of the effluent. 95% confidence limits for mean are s.e. = = 14.12 and 14.28

12
(c) Is the result consistent with a mean acid content of 14.13 g per 100 litres obtained from tests over several years ? H 0 : = 14.13 H 1 : 14.13 Estimate = 14.2 Test statistic z = = 1.72 = 0.05 This is a two-tailed test By table, z c = 1.96 Since 1.72 < 1.96, Conclusion: we accept H 0 at a significance level of 0.05 N(0,1) /2 zczc zczc z Hence at 5% significant level, the result is consistent. Caution: The level of significance must be stated! It’s meaningless in saying accept or reject H 0 alone.

13
Test statistic z = The test is OK if sample size is large (n 30), and np 10 and nq 10 for small sample size, use binomial. in calculation of P s, continuity correction must be made in passing from discrete to continuous variable.

14
Continuity Correction Sample size = n Success no. = m P s = m/n H 1 : p > p 0 adjusted P s = (m 0.5)/n H 1 : p < p 0 adjusted P s = (m+0.5)/n Believe me, I’ll tell you why later.

15
E.g. 48 Last month unemployed rate = 7.1 %. This month, someone discovers 350 are unemployed in a random sample of 5000. Has the unemployment decreased this month ? = 0.05 H 0 : p = 7.1% H 1 : p < 7.1% P s = (Continuity correction) Test statistic z = = 0.248 = 0.0701 = 0.05 By table, z c = 1.645 Since 0.248 > 1.645, we accept H 0 at 5% level of significance. i.e. No change in unemployment rate this month. N(0,1) zczc z

16
E.g. 49 A standard medication reduces pain in 80% of patients treated. A new medication for the same purpose produces 90 patients relieved among the first 100 tested. Does this new medication relieve more patients than before ? ( = 1%) H 0 : p = 80% H 1 : p > 80% N(0,1) zczc P s == 0.895 Test statistic z = = 2.375 = 0.01 z c = 2.33 z > z c Thus, reject H 0 at 1% level of significance. i.e. New medication relieves more patients than before.

17
E.g. 53 A manufacturer claims that less than 2% of the women use his birth control pill suffer from side effects. We have a feeling that this estimate is too low. We decide to test his claim at the 0.01 significance level using a sample of 900 randomly selected women. Find the decision rule. Let p = probability that a randomly selected user has side effect. H 0 : p = 2% H 1 : p > 2% N(0,1) zczc = 0.01 z c = 2.33 z = For rejecting H 0, set z > z c, > 2.33 z yielding P s > 0.0309 Let m = no. of “side effect” users in the sample, then m > 28.3 Hence the rule is: if there are more than 28 “side effect” users, we say that the claimed rate is too low, otherwise, fail to reject the claim.

18
E.g. 55 John tells you that he can control the tosses of fair coin. To see if he is right you take two ordinary coins and give him one. You toss one and ask him to toss the same thing. You repeat this experiment 18 times and John succeeds in tossing the same as you 15 times. Is John usual ? = 0.05. Note: the no. of trials = 18 is too small to use normal distribution.Note: we use binomial instead. Let p = probability that tossing the same as you. H 0 : p = 0.5 H 1 : p > 0.5 P(15 or above success) =(0.5) 18 [ 18 C 15 + 18 C 16 + 18 C 17 + 18 C 18 ] = 0.0038< 0.05 Conclusion: John is usual at 0.05 significance level. (The chance of having 15 or more success is very small!)

19
E.g. 57 A coin which is tossed n times comes up heads n times. What’s the min. n for which we can conclude at 0.01 significance level that the coin is not fair ? Consider two cases: one-tailed and two-tailed. H 0 : p = 0.5 H 1 : p > 0.5 One-tailed test Let p = probability of getting head in each toss. X = no. of heads in n tosses, then X ~ B(n,0.5) n heads turn up. And we want to reject H 0 at = 0.01 X = n should lie in the rejecting region. Thus P(X = n) < 0.01 min. n =7. = 0.01... nn-1n-2 X P(X)P(X) Similarly, for Two-tailed test, we set min. n =8.

20
Remarks On Continuity Correction For one-tailed testing about proportion. H 0 : p = p 0 H 1 : p > p 0 We consider sample size n with no. of success X. To decide whether we reject H 0 or not, Suppose that in a sample, we find m success out of n. we look into the chance that X is m or above, see whether this chance is too small. (i.e. less than or not.) Hence we concern P(X m) X is discrete and if we use continuous variable to approximate it, continuity correction must be carried out. That’s why we use the adjusted sample proportion (m 0.5)/n as the test statistic instead of m/n. P(X m) = Try to “prove” the case for H 1 : p < p 0 on your own.

21
Sorry for the hurry lessons and I haven’t got much time on preparing these slides, please read the following on you own: E.g. 58, 61, 63, 65 Please do the following as your class work/ homework: 3(c) 4, 9, 11, 15, 22, 24, 26, 28, 31, 33, 36, 39 3(d) 1, 2, 3, 4, 17, 19, 25, 26, 27, 28, 34, 39

Similar presentations

© 2021 SlidePlayer.com Inc.

All rights reserved.

To make this website work, we log user data and share it with processors. To use this website, you must agree to our Privacy Policy, including cookie policy.

Ads by Google