# Lecture 10 - PowerPoint PPT Presentation

1 / 34

## Lecture 10

- - - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - - -
##### Presentation Transcript

1. Lecture 10 • Inference about the difference between population proportions (Chapter 13.6) • One-way analysis of variance (Chapter 15.2)

2. Testing p1 – p2 • There are two cases to consider: Case 1: H0: p1-p2 =0 Calculate the pooled proportion Case 2: H0: p1-p2 =D (D is not equal to 0) Do not pool the data Then Then

3. Testing p1 – p2 • Example 13.9 (Revisit Example 13.8) • Management needs to decide which of two new packaging designs to adopt, to help improve sales of a certain soap. • A study is performed in two supermarkets: • For the brightly-colored design to be financially viable it has to outsell the simple design by at least 3%.

4. Testing p1 – p2 (Case 2) • Solution • The hypotheses to test are H0: p1 - p2 = .03 H1: p1 - p2 > .03 • We identify this application as case 2 (the hypothesized difference is not equal to zero).

5. - - ˆ ˆ ( p p ) D 1 2 = Z - - ˆ ˆ ˆ ˆ p ( 1 p ) p ( 1 p ) 1 1 2 2 + n n 1 2 æ ö æ ö 180 155 - ç ÷ - ç ÷ . 03 ç ÷ 904 1 , 038 è ø è ø = = 1 . 15 - - . 1991 ( 1 . 1991 ) . 1493 ( 1 . 1493 ) + 904 1 , 038 Testing p1 – p2 (Case 2) • Compute: Manually The rejection region is z > za = z.05 = 1.645. Conclusion: Since 1.15 < 1.645 do not reject the null hypothesis. There is insufficient evidence to infer that the brightly-colored design will outsell the simple design by 3% or more.

6. Confidence Interval for • confidence interval :

7. Estimating p1 – p2 • Estimating the cost of life saved • Two drugs are used to treat heart attack victims: • Streptokinase (available since 1959, costs \$460) • t-PA (genetically engineered, costs \$2900). • The maker of t-PA claims that its drug outperforms Streptokinase. • An experiment was conducted in 15 countries. • 20,500 patients were given t-PA • 20,500 patients were given Streptokinase • The number of deaths by heart attacks was recorded.

8. Estimating p1 – p2 • Experiment results • A total of 1497 patients treated with Streptokinase died. • A total of 1292 patients treated with t-PA died. • Estimate the cost per life saved by using t-PA instead of Streptokinase.

9. Estimating p1 – p2 • Interpretation • We estimate that between .51% and 1.49% more heart attack victims will survive because of the use of t-PA. • The difference in cost per life saved is 2900-460= \$2440. • The cost per life saved by switching to t-PA is estimated to be between 2440/.0149 = \$163,758 and 2440/.0051 = \$478,431

10. 15.2 One-way ANOVA • Analysis of variance compares two or more populations of interval data. • Specifically, we are interested in determining whether differences exist between the population means. • We obtain independent samples from each population. • Generalization of two sample problem to two or more populations

11. Examples • Compare the effect of three different teaching methods on test scores. • Compare the effect of four different therapies on how long a cancer patient lives. • Compare the effect of using different amounts of fertilizer on the yield of a crop. • Compare the amount of time that ten different tire brands last.

12. One Way Analysis of Variance • Example 15.1 • An apple juice manufacturer is planning to develop a new product -a liquid concentrate. • The marketing manager has to decide how to market the new product. • Three strategies are considered • Emphasize convenience of using the product. • Emphasize the quality of the product. • Emphasize the product’s low price.

13. One Way Analysis of Variance • Example 15.1 - continued • An experiment was conducted as follows: • In three cities an advertisement campaign was launched . • In each city only one of the three characteristics (convenience, quality, and price) was emphasized. • The weekly sales were recorded for twenty weeks following the beginning of the campaigns.

14. One Way Analysis of Variance See file Xm15 -01 Weekly sales Weekly sales Weekly sales

15. One Way Analysis of Variance • Solution • The data are interval. • The problem objective is to compare sales in three cities. • We hypothesize that the three population means are equal.

16. Defining the Hypotheses • Solution • H0: m1 = m2= m3 • H1: At least two means differ • To build the statistic needed to test thehypotheses use the following notation:

17. 1 2 k First observation, first sample Second observation, second sample Notation Independent samples are drawn from k populations (treatments). X11 x21 . . . Xn1,1 X12 x22 . . . Xn2,2 X1k x2k . . . Xnk,k Sample size Sample mean X is the “response variable”. The variables’ value are called “responses”.

18. Terminology • In the context of this problem… Response variable – weekly salesResponses – actual sale valuesExperimental unit – weeks in the three cities when we record sales figures.Factor – the criterion by which we classify the populations (the treatments). In this problems the factor is the marketing strategy. Factor levels – the population (treatment) names. In this problem factor levels are the marketing strategies.

19. Rationale Behind Test Statistic • Two types of variability are employed when testing for the equality of population means • Variability of the sample means • Variability within samples • Test statistic is essentially (Variability of the sample means)/(Variability within samples)

20. The rationale behind the test statistic – I • If the null hypothesis is true, we would expect all the sample means to be close to one another (and as a result, close to the grand mean). • If the alternative hypothesis is true, at least some of the sample means would differ. • Thus, we measure variability between sample means.

21. Variability between sample means • The variability between the sample means is measured as the sum of squared distances between each mean and the grand mean. This sum is called the Sum of Squares for Treatments SST In our example treatments are represented by the different advertising strategies.

22. Sum of squares for treatments (SST) There are k treatments The mean of sample j The size of sample j Note: When the sample means are close toone another, their distance from the grand mean is small, leading to a small SST. Thus, large SST indicates large variation between sample means, which supports H1.

23. Sum of squares for treatments (SST) • Solution – continuedCalculate SST = 20(577.55 - 613.07)2 + + 20(653.00 - 613.07)2 + + 20(608.65 - 613.07)2 = = 57,512.23 The grand mean is calculated by

24. Sum of squares for treatments (SST) Is SST = 57,512.23 large enough to reject H0 in favor of H1?Large compared to what?

25. 30 25 20 19 12 10 9 7 1 Treatment 3 Treatment 1 Treatment 2 20 16 15 14 11 10 9 A small variability within the samples makes it easier to draw a conclusion about the population means. The sample means are the same as before, but the larger within-sample variability makes it harder to draw a conclusion about the population means. Treatment 1 Treatment 2 Treatment 3

26. The rationale behind test statistic – II • Large variability within the samples weakens the “ability” of the sample means to represent their corresponding population means. • Therefore, even though sample means may markedly differ from one another, SST must be judged relative to the “within samples variability”.

27. Within samples variability • The variability within samples is measured by adding all the squared distances between observations and their sample means. This sum is called the Sum of Squares for Error SSE In our example this is the sum of all squared differences between sales in city j and the sample mean of city j (over all the three cities).

28. Sum of squares for errors (SSE) • Solution – continuedCalculate SSE = (n1 - 1)s12 + (n2 -1)s22 + (n3 -1)s32 = (20 -1)10,774.44 + (20 -1)7,238.61+ (20-1)8,670.24 = 506,983.50

29. Sum of squares for errors (SSE) Is SST = 57,512.23 large enough relative to SSE = 506,983.50 to reject the null hypothesis that specifies that all the means are equal?

30. Calculation of MST - Mean Square for Treatments Calculation of MSE Mean Square for Error The mean sum of squares To perform the test we need to calculate the mean squaresas follows:

31. Calculation of the test statistic Required Conditions: 1. The populations tested are normally distributed. 2. The variances of all the populations tested are equal. with the following degrees of freedom: v1=k -1 and v2=n-k

32. H0: m1 = m2 = …=mk H1: At least two means differ Test statistic: R.R: F>Fa,k-1,n-k The F test rejection region And finally the hypothesis test:

33. The F test Ho: m1 = m2= m3 H1: At least two means differ Test statistic F= MST/ MSE= 3.23 Since 3.23 > 3.15, there is sufficient evidence to reject Ho in favor of H1,and argue that at least one of the mean sales is different than the others.