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

## 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:

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]

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)

Hypothesis Testing

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

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

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

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

Benchmark Value Maximum Type 1 Error Maximum Type 2 Error:

Benchmark Value Maximum Type 1 Error Maximum Type 2 Error

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

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!

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

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

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

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

x  < 330  =330

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

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

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

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 !

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

x  < 130  =130  >130

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.

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

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

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.

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.

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?

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

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 / 

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

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

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

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.

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.)

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

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

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

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

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

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

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

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.

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.

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

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!

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.

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

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- 

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

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

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

Benchmark Value Maximum Type 1 Error Maximum Type 2 Error:

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

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

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

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

x  < 330  =330

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

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

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

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 !

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

x  < 130  =130  >130

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.

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

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

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.

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

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.

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.)

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

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

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?

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

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

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.

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

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

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 

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

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

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.

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

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

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