Presentation is loading. Please wait.

Presentation is loading. Please wait.

Interpreting Opinion Polls Example1: (Confidence Interval for the population proportion): Suppose that the result of sampling yields the following: p=

Similar presentations


Presentation on theme: "Interpreting Opinion Polls Example1: (Confidence Interval for the population proportion): Suppose that the result of sampling yields the following: p="— Presentation transcript:

1 Interpreting Opinion Polls Example1: (Confidence Interval for the population proportion): Suppose that the result of sampling yields the following: p= 0.4 ; n = 36. Use this information to construct a 98% CI for . Recall from, last week 98% CI for  is [0.21 0.59]

2 Interpreting Opinion Polls Labour 45 points Conservatives 39 points Lib. Dems 15 points Other 1 point Margin of Error :  Typically, this means that population proportion of labour voters is between 42% and 48% (with 95% confidence)

3 Hypothesis Testing

4 x  Two competing Hypotheses  The Null Hypothesis (H0): The population mean (  =20 The Alternative Hypothesis (H1): The population mean (  =25

5 x  H0:  =20 H1:  = 25

6 x   H0:  =20 H1:  = 25 Benchmark Value p-value

7 Benchmark Value Type 2 Error: Not rejecting A false H0 Type 1 Error: Rejecting a correct H0 Area in black : Maximum Type2 error Area in red : Maximum Type1 error

8 Benchmark Value Maximum Type 1 Error Maximum Type 2 Error:

9 Benchmark Value Maximum Type 1 Error Maximum Type 2 Error

10 The Spirit of Hypothesis Testing H0 is the hypothesis that is challenged H0 is the established hypothesis

11 X o y Can we have intersecting indifference curves? a a ~ b, a ~ c; so b ~c a contradiction of the axiom more is better b c H0 : Yes H1 : No We work under the assumption that H0 is correct!

12 x   H0:  = 0 H1:  = 1

13 Significance Level (  The Maximum Type 1 Error = Significance Level

14 The smaller the p-value the more significant is the test p-value

15 Fizzy drink cans should have 330 ml of content on average. A consumer group has complained against a manufacturer that its contents are less then the stated amount. Use the following data to assess the complaint. (Assume a normal population) One-Tail and Two-Tail Tests

16 x  < 330  =330

17 x MEAN = 320 ;  = 10 ; n = 16 Step 1: Set up the hypotheses H0 :   H1 :   Step 2: Select statistic One-Tail Test

18 The statistic to be used is x MEAN = 320 Step3 : Identify the distribution of x MEAN x MEAN ~ Normal    16  x MEAN ~ Normal  16  Under H0

19 Step 4: Construct test statistic (z) z= {(x MEAN –  } = (320-330)/10/4 = -4 Step 5: Compare with critical value z C z C = -1.645 > -4 z C = -1.645 for a one-tailed test with significance level (  ) = 0.05

20 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% and at 1% ( -4 < -2.33) Step 7: Interpret result z C = -1.645 for a one-tailed test with significance level (  ) = 0.05 There is overwhelming evidence to support the claim !

21 A cereal manufacturer is concerned that the boxes of cereal not be under-filled or over-filled. Each box is supposed to contain 130 grams of cereal. A test is done to see whether the machines are putting an average of 130 grams into a single box. A random sample of 30 boxes is tested. The average weight is found out to be 128 grams and the sample standard deviation 10 grams. A Two-Tail Test

22 x  < 130  =130  >130

23 Set up the hypotheses to test whether the average number of grams per box is different from 130. Step 1 H0 :   H1 :   Two-Tail Test Perform the test at 10% level of significance.

24 Step3 : Identify the distribution of x MEAN x MEAN ~    30  x MEAN ~ Normal    30  (approx.) Under H0 Step 2: Select statistic The statistic to be used is x MEAN = 128

25 Step 4: Construct test statistic (z) z= {(x MEAN –  } = (128-130)/10/  = -1.1 Step 5: Compare with critical value z C z C =  1.645 for a two-tailed test with significance level (  ) = 0.1 1.645 < 1.1

26 Explain which hypothesis you are rejecting and why. Do you think the decision to accept/reject the null hypothesis stays unchanged if the significance level is lowered to 5%? Explain carefully.

27 Step 6 : Draw conclusion The test is not significant. Do not reject H0 at 10% and of course not at 5% ( -1.96 < -1.1) Step 7: Interpret result There is no cause for concern, given the data above.

28 A production process makes components whose strengths are normally distributed with mean 40kg and unknown variance. The process is modified and 12 components are selected at random with Mean strength 41.125kg and sample standard deviation 1.316591 kg. Is there any evidence that the modified Process makes stronger components?

29 Step 1 : Set up the hypotheses H0 :   H1 :   One-Tail Test Perform the test at 5% level of significance. Step 2: Select statistic The statistic to be used is x MEAN = 41.125

30 Step3 : Identify the distribution (x MEAN –  /s/  n has a t- distribution of 11 degrees of freedom Step 4: Construct test statistic (t) {(x MEAN –  }/s/  } = (41.125-40)/ 1.316591 / 

31 Step 5: Compare with critical value t C t C = 1.795884 for a one-tailed test with significance level (  ) = 0.05 and d.o.f. =11 t = 2.96 > 1.795884 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% ( 2.96 > 1.795884) and at 1% (2.96 > 2.718) 0.006488 is the prob of type 1 error

32 Step 7: Interpret results There is overwhelming evidence that the modified process makes stronger components

33 100 ‘small’ firms and eighty ‘large’ firms were tested for their profitability. Large firms made a profit of 25p for every £1 of turnover with a standard deviation of 10p. Small firms made a profit of 20p for every £1 of turnover with a standard deviation of 5p. Test the hypothesis that size is related to profitability

34 x = large firm; y = small firm x MEAN = 25; s X = 10 n X =80 y MEAN = 20; s y = 5 ; n Y =100 Step 1 H0 :  x -  Y = 0 H1 :  x -  Y  Two-Tail Test Perform the test at 5% level of significance.

35 Step3 : Identify the distribution of x MEAN -y MEAN x MEAN -y MEAN ~ Normal  x  Y  X   80 +  Y   100  ~ Normal  s X   80 + s Y   100  (approx.) Under H0 Step 2: Select statistic The statistic to be used is x MEAN -y MEAN = 25-20 = 5 ~ Normal  100  80 + 25  100  (approx.)

36 Step 4: Construct test statistic (z) z= {(x MEAN -y MEAN –(  x –  Y  } = (5-0)/  = 4.46 Step 5: Compare with critical value z C z C =  1.96 for a two-tailed test with significance level (  ) = 0.05 1.96 < 4.46

37 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% ( 1.96 < 4.46) or even at 1% Step 7: Interpret result There is overwhelming evidence that large firms are more profitable

38 x   Benchmark Value p-value  Prob (Type 1 error) = p- value = 4.10158E-06

39 Sample size ‘large’ Hypothesis Testing with x MEAN  known  unknown Perform Z-test Replace s for  and perform Z-test

40 Sample size ‘small’ Normal Population  known  unknown Non-normal Population Parametric Test Not possible Perform Z-test Perform t-test. Replace s for 

41 Learning Objectives Understand the logic of hypothesis testing, and know how to establish null and alternate hypotheses. Understand Type I and Type II errors. Use large samples to test hypotheses about a single population mean and about the differences of two population means Use large samples to test hypotheses about a single population proportion and about the differences of two population proportions

42 Test hypotheses about a single population mean using small samples when  is unknown and the population is normally distributed.

43 Hypothesis Testing A process of testing hypotheses about parameters by setting up null and alternative hypotheses, gathering sample data, computing statistics from the samples, and using statistical techniques to reach conclusions about the hypotheses.

44 Null and Alternative Hypotheses The Null and Alternative Hypotheses are mutually exclusive. Only one of them can be true. The Null Hypothesis is assumed to be true. The burden of proof falls on the Alternative Hypothesis.

45 The Spirit of Hypothesis Testing H0 is the hypothesis that is challenged H0 is the established hypothesis

46 X o y Can we have intersecting indifference curves? a a ~ b, a ~ c; so b ~c a contradiction of the axiom more is better b c H 0 : Yes H 1 : No We work under the assumption that H 0 is correct!

47 Null and Alternative Hypotheses: Example A soft drink company is filling 12 oz. cans with cola. The company hopes that the cans are averaging 12 ounces.

48 Rejection and Non-rejection Regions  =12 oz Nonrejection Region Rejection Region Critical Value Rejection Region Critical Value

49 Type I and Type II Errors Type I Error –Rejecting a true null hypothesis –The probability of committing a Type I error is called , the level of significance. Type II Error –Failing to reject a false null hypothesis –The probability of committing a Type II error is called . –Power is the probability of rejecting a false null hypothesis, and equal to 1- 

50 x  H 0 :  =20 H 1 :  = 25 Two competing Hypotheses

51 x   H 0 :  =20 H1:  = 25 Benchmark Value p-value

52 Benchmark Value Type 2 Error: Not rejecting A false H0 Type 1 Error: Rejecting a correct H0 Area in black : Maximum Type2 error Area in red : Maximum Type1 error

53 Benchmark Value Maximum Type 1 Error Maximum Type 2 Error:

54 The smaller the p-value the more significant is the test p-value Significance Level (  The Maximum Type 1 Error = Significance Level

55 Decision Table for Hypothesis Testing ( () Null TrueNull False Fail to reject null Correct Decision Type II error   Reject nullType I error  Correct Decision (Power)

56 The smaller the p-value the more significant is the test p-value

57 Fizzy drink cans should have 330 ml of content on average. A consumer group has complained against a manufacturer that its contents are less then the stated amount. Use the following data to assess the complaint. (Assume a normal population) A One-Tail Test

58 x  < 330  =330

59 x MEAN = 320 ;  = 10 ; n = 16 Step 1: Set up the hypotheses H0 :   H1 :   Step 2: Select statistic One-Tail Test

60 The statistic to be used is x MEAN = 320 Step3 : Identify the distribution of x MEAN x MEAN ~ Normal    16  x MEAN ~ Normal  16  Under H0

61 Step 4: Construct test statistic (z) z= {(x MEAN –  } = (320-330)/10/4 = -4 Step 5: Compare with critical value z C z C = -1.645 > -4 z C = -1.645 for a one-tailed test with significance level (  ) = 0.05

62 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% and at 1% ( -4 < -2.33) Step 7: Interpret result z C = -1.645 for a one-tailed test with significance level (  ) = 0.05 There is overwhelming evidence to support the claim !

63 A cereal manufacturer is concerned that the boxes of cereal not be under-filled or over-filled. Each box is supposed to contain 130 grams of cereal. A test is done to see whether the machines are putting an average of 130 grams into a single box. A random sample of 30 boxes is tested. The average weight is found out to be 128 grams and the sample standard deviation 10 grams. A Two-Tail Test

64 x  < 130  =130  >130

65 Set up the hypotheses to test whether the average number of grams per box is different from 130. Step 1 H0 :   H1 :   Two-Tail Test Perform the test at 10% level of significance.

66 Step3 : Identify the distribution of x MEAN x MEAN ~    30  x MEAN ~ Normal    30  (approx.) Under H0 Step 2: Select statistic The statistic to be used is x MEAN = 128

67 Step 4: Construct test statistic (z) z= {(x MEAN –  } = (128-130)/10/  = -1.1 Step 5: Compare with critical value z C z C =  1.645 for a two-tailed test with significance level (  ) = 0.1 1.645 < 1.1

68 Step 6 : Draw conclusion The test is not significant. Do not reject H0 at 10% and of course not at 5% ( -1.96 < -1.1) Step 7: Interpret result There is no cause for concern, given the data above.

69 100 ‘small’ firms and eighty ‘large’ firms were tested for their profitability. Large firms made a profit of 25p for every £1 of turnover with a standard deviation of 10p. Small firms made a profit of 20p for every £1 of turnover with a standard deviation of 5p. Test the hypothesis that size is related to profitability

70 x = large firm; y = small firm x MEAN = 25; s X = 10 n X =80 y MEAN = 20; s y = 5 ; n Y =100 Step 1 H0 :  x -  Y = 0 H1 :  x -  Y  Two-Tail Test Perform the test at 5% level of significance.

71 Step3 : Identify the distribution of x MEAN -y MEAN x MEAN -y MEAN ~ Normal  x  Y  X   80 +  Y   100  ~ Normal  s X   80 + s Y   100  (approx.) Under H0 Step 2: Select statistic The statistic to be used is x MEAN -y MEAN = 25-20 = 5 ~ Normal  100  80 + 25  100  (approx.)

72 Step 4: Construct test statistic (z) z= {(x MEAN -y MEAN –(  x –  Y  } = (5-0)/  = 4.46 Step 5: Compare with critical value z C z C =  1.96 for a two-tailed test with significance level (  ) = 0.05 1.96 < 4.46

73 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% ( 1.96 < 4.46) or even at 1% Step 7: Interpret result There is overwhelming evidence that large firms are more profitable

74 Example: Thirty-five percent of the consumers were dissatisfied with the Product when a new CEO was elected. Test of Proportion Five months later, 108 out of 360 were found out to be dissatisfied. Can we conclude (at 5%) that the newly elected CEO has significantly reduced the level of dissatisfaction amongst consumers?

75 Step 2: Select statistic The statistic to be used is p = 108/360 = 0.3 Step3 : Identify the distribution of p First we need to perform the validity check H0 :   H1 :   Step 1: Set up the hypotheses

76 Here n = 360 and  = 0.35 under H0. So the validity check is satisfied. This means that p ~ Normal(    360  where  2 =  X 0.65 = 0.2275 Step 4: Construct test statistic (z) z= {(p –0.35  0.2275)/360} = (0.3-0.35)/0.477/18.97367  -19.9

77 Step 5: Compare with critical value z C z C = -19.9 < -1.645 Step 6 : Draw conclusion The test is significant. Reject H0 Step 7: Interpret result Based on the analysis of data, we conclude that there is strong evidence that consumer dissatisfaction has been significantly reduced.

78 Example: 70 out of 90 large firms (L) and 100 of 110 small firms (S) were voted eco-friendly. Test the hypothesis that large firms are less eco friendly than small ones.. Step 1: Set up the hypotheses H0 :  S  L  H1 :  S  L  Test of Difference in Proportions

79 Step 2: Select statistic The statistic to be used is p S –p L where p L = 7/9 = 0.78; p S = 10/11 = 0.9 Step3 : Identify the distribution of p S –p L

80 First we need to perform the validity check Here n S = 110 and n L = 90 but  S and  L are unknown. So we perform the validity check by using the values of p S and p L for  S and  L respectively. The validity check is satisfied. This means that (p S - p L ) ~ Normal(  S  L  S   n S  L   n L 

81 Under H0, (  L  S ) = 0 Also,  S  =  S  S ) and  L  =  L  L ) Use  p = (n S p S + n L p L ) / (n S + n L ) for both  S and  L. Thus p = [(100/110) *110 + (70/90)*90]/200 = 0.85

82 Hence,  S     ) = 0.1275 Similarly,  L    ) = 0.1275 (p S - p L ) ~ Normal(   0.1275  110  0.1275  90  (p S - p L ) ~ Normal(   Step 4: Construct test statistic (z) z= {(p S - p L ) –0}/(0.059) = (0.9-0.78)/0.059  2

83 Step 5: Compare with critical value z C z C = 1.645 < 2 Step 6 : Draw conclusion The test is significant. Reject H0 at 5% but not at 1% ( 2 < 2.33) Step 7: Interpret result Based on the analysis of data, we conclude that there is enough evidence that small forms are significantly more eco-friendly.

84 Two-tailed Test: Small Sample,  Unknown,  =.05 (Part 1) Weights in Pounds of a Sample of 20 Plates 22.622.223.227.424.5 27.026.628.126.924.9 26.225.323.124.226.1 25.830.428.623.523.6

85 Two-tailed Test: Small Sample,  Unknown,  =.05 (Part 2) Critical Values Rejection Regions

86 Two-tailed Test: Small Sample,  Unknown,  =.05 (Part 3) Critical Values Non Rejection Region Rejection Regions


Download ppt "Interpreting Opinion Polls Example1: (Confidence Interval for the population proportion): Suppose that the result of sampling yields the following: p="

Similar presentations


Ads by Google