Presentation is loading. Please wait.

Presentation is loading. Please wait.

Chapter 13 Inference About Comparing Two Populations.

Similar presentations


Presentation on theme: "Chapter 13 Inference About Comparing Two Populations."— Presentation transcript:

1 Chapter 13 Inference About Comparing Two Populations

2 Comparing Two Populations… Previously we looked at techniques to estimate and test parameters for one population: Population Mean, Population Variance, and Population Proportion p We will still consider these parameters when we are looking at two populations, however our interest will now be:  The difference between two means.  The ratio of two variances.  The difference between two proportions.

3 Difference of Two Means… In order to test and estimate the difference between two population means, we draw random samples from each of two populations. Initially, we will consider independent samples, that is, samples that are completely unrelated to one another. (Likewise, we consider for Population 2) Sample, size: n 1 Population 1 Parameters: Statistics:

4 Difference of Two Means In order to test and estimate the difference between two population means, we draw random samples from each of two populations. Initially, we will consider independent samples, that is, samples that are completely unrelated to one another. Because we are comparing two population means, we use the statistic:

5 Sampling Distribution of 1. is normally distributed if the original populations are normal –or– approximately normal if the populations are nonnormal and the sample sizes are large (n 1, n 2 > 30) 2. The expected value of is 3. The variance of is and the standard error is:

6 Making Inferences About Since is normally distributed if the original populations are normal –or– approximately normal if the populations are nonnormal and the sample sizes are large (n 1, n 2 > 30), then: is a standard normal (or approximately normal) random variable. We could use this to build test statistics or confidence interval estimators for …

7 Making Inferences About …except that, in practice, the z statistic is rarely used since the population variances are unknown. Instead we use a t-statistic. We consider two cases for the unknown population variances: when we believe they are equal and conversely when they are not equal. ??

8 When are variances equal? How do we know when the population variances are equal? Since the population variances are unknown, we can’t know for certain whether they’re equal, but we can examine the sample variances and informally judge their relative values to determine whether we can assume that the population variances are equal or not.

9 Test Statistic for (equal variances) 1)Calculate – the pooled variance estimator as… 2)…and use it here: degrees of freedom

10 CI Estimator for (equal variances) The confidence interval estimator for when the population variances are equal is given by: degrees of freedom pooled variance estimator

11 Test Statistic for (unequal variances) The test statistic for when the population variances are unequal is given by: Likewise, the confidence interval estimator is: degrees of freedom

12 Which case to use? Which case to use? Equal variance or unequal variance? Whenever there is insufficient evidence that the variances are unequal, it is preferable to perform the equal variances t-test. This is so, because for any two given samples: The number of degrees of freedom for the equal variances case The number of degrees of freedom for the unequal variances case ≥ Larger numbers of degrees of freedom have the same effect as having larger sample sizes ≥

13 Example 13.1 –Do people who eat high-fiber cereal for breakfast consume, on average, fewer calories for lunch than people who do not eat high-fiber cereal for breakfast? –A sample of 150 people was randomly drawn. Each person was identified as a consumer or a non-consumer of high- fiber cereal. –For each person the number of calories consumed at lunch was recorded. Example: Making an inference about    –  

14 Solution: The data are interval. The parameter to be tested is the difference between two means. The claim to be tested is: The mean caloric intake of consumers (  1 ) is less than that of non-consumers (  2 ). Example: Making an inference about    –  

15 The hypotheses are: H 0 : (  1 -  2 ) = 0 H 1 : (  1 -  2 ) < 0 – To check the whether the population variances are equal, we use (Xm13-01) computer output to find the sample variances We have s 1 2 = 4103, and s 2 2 = 10,670.Xm13-01 – It appears that the variances are unequal. Example: Making an inference about    –  

16 Example 13.1… A sample of 150 people was randomly drawn. Each person was identified as a consumer or a non-consumer of high-fiber cereal. For each person the number of calories consumed at lunch was recorded. The data:recorded Independent Pop’ns; Either you eat high fiber cereal or you don’t n 1 +n 2 =150 There is reason to believe the population variances are unequal… Recall H 1 :

17 Example 13.1… Thus, our test statistic is: The number of degrees of freedom is: Hence the rejection region is… COMPUTE

18 Example 13.1… Our rejection region: Our test statistic: Since our test statistic (-2.09) is less than our critical value of t (-1.658), we reject H 0 in favor of H 1 — that is, there is sufficient evidence to support the claim that high fiber cereal eaters consume less calories at lunch. COMPUTE Compare INTERPRET

19 Confidence Interval… Suppose we wanted to compute a 95% confidence interval estimate of the difference between mean caloric intake for consumers and non-consumers of high-fiber cereals… That is, we estimate that non-consumers of high fiber cereal eat between 1.56 and 56.86 more calories than consumers.

20 Example 13.2 –An ergonomic chair can be assembled using two different sets of operations (Method A and Method B) –The operations manager would like to know whether the assembly time under the two methods differ. Example: Making an inference about    –  

21 Example 13.2 –Two samples are randomly and independently selected A sample of 25 workers assembled the chair using method A. A sample of 25 workers assembled the chair using method B. The assembly times were recorded –Do the assembly times of the two methods differs? Example: Making an inference about    –  

22 Example 13.2 : Making an inference about    –   Assembly times in Minutes Solution The data are interval. The parameter of interest is the difference between two population means. The claim to be tested is whether a difference between the two methods exists.

23 Example 13.2 : Making an inference about    –   Compute: Manually – The hypotheses test is: H 0 : (  1 -  2 )  0 H 1 : (  1 -  2 )  0 – To check whether the two unknown population variances are equal we calculate S 1 2 and S 2 2 (Xm13-02).Xm13-02

24 Example: Making an inference about    –   Manually – To calculate the t-statistic we have: COMPUTE

25 Example 13.2… The assembly times for each of the two methods are recorded and preliminary data is prepared…assembly times COMPUTE The sample variances are similar, hence we will assume that the population variances are equal…

26 Example 13.2… Recall, we are doing a two-tailed test, hence the rejection region will be: The number of degrees of freedom is: Hence our critical values of t (and our rejection region) becomes: COMPUTE

27 Example 13.2… In order to calculate our t-statistic, we need to first calculate the pooled variance estimator, followed by the t-statistic… COMPUTE

28 Example 13.2… Since our calculated t-statistic does not fall into the rejection region, we cannot reject H 0 in favor of H 1, that is, there is not sufficient evidence to infer that the mean assembly times differ. INTERPRET

29 Confidence Interval… We can compute a 95% confidence interval estimate for the difference in mean assembly times as: That is, we estimate the mean difference between the two assembly methods between –.36 and.96 minutes. Note: zero is included in this confidence interval…

30 Checking the required Conditions for the equal variances case (Example 13.2) The data appear to be approximately normal Design A Design B

31 Identifying Factors I… Factors that identify the equal-variances t-test and estimator of :

32 Identifying Factors II… Factors that identify the unequal- variances t-test and estimator of :

33 13.4 Matched Pairs Experiment What is a matched pair experiment? Why matched pairs experiments are needed? How do we deal with data produced in this way? The following example demonstrates a situation where a matched pair experiment is the correct approach to testing the difference between two population means.

34 Example 13.3 –To investigate the job offers obtained by MBA graduates, a study focusing on salaries was conducted. –Particularly, the salaries offered to finance majors were compared to those offered to marketing majors. –Two random samples of 25 graduates in each discipline were selected, and the highest salary offer was recorded for each one. The data are stored in file Xm13-03.Xm13-03 –Can we infer that finance majors obtain higher salary offers than do marketing majors among MBAs?. 13.4 Matched Pairs Experiment

35 Solution –Compare two populations of interval data. The parameter tested is  1 -  2 11 22 The mean of the highest salary offered to Finance MBAs The mean of the highest salary offered to Marketing MBAs – H 0 : (  1 -  2 ) = 0 H 1 : (  1 -  2 ) > 0 Example 13.3

36 Solution – continued From the data we have: Let us assume equal variances There is insufficient evidence to conclude that Finance MBAs are offered higher salaries than marketing MBAs. Example 13.3

37 Question –The difference between the sample means is 65624 – 60423 = 5,201. –So, why could we not reject H 0 and favor H 1 where (  1 –  2 > 0)? The effect of a large sample variability

38 Answer: –S p 2 is large (because the sample variances are large) S p 2 = 311,330,926. –A large variance reduces the value of the t statistic and it becomes more difficult to reject H 0. The effect of a large sample variability

39 Reducing the variability The values each sample consists of might markedly vary... The range of observations sample B The range of observations sample A

40 ...but the differences between pairs of observations might be quite close to one another, resulting in a small variability of the differences. 0 Differences The range of the differences Reducing the variability

41 The matched pairs experiment Since the difference of the means is equal to the mean of the differences we can rewrite the hypotheses in terms of  D (the mean of the differences) rather than in terms of  1 –  2. This formulation has the benefit of a smaller variability. Group 1 Group 2 Difference 1012- 2 1511+4 Mean1 =12.5 Mean2 =11.5 Mean1 – Mean2 = 1 Mean Differences = 1

42 Example 13.4 –It was suspected that salary offers were affected by students’ GPA, (which caused S 1 2 and S 2 2 to increase). –To reduce this variability, the following procedure was used: 25 ranges of GPAs were predetermined. Students from each major were randomly selected, one from each GPA range. The highest salary offer for each student was recorded. –From the data presented can we conclude that Finance majors are offered higher salaries? The matched pairs experiment

43 Example 13.4… The numbers in black are the original starting salary data; the number in blue were calculated. starting salary data although a student is either in Finance OR in Marketing (i.e. independent), that the data is grouped in this fashion makes it a matched pairs experiment (i.e. the two students in group #1 are ‘matched’ by their GPA range the difference of the means is equal to the mean of the differences, hence we will consider the “mean of the paired differences” as our parameter of interest:

44 Example 13.4… Do Finance majors have higher salary offers than Marketing majors? Since: We want to research this hypothesis: H 1 : (and our null hypothesis becomes H 0 : ) IDENTIFY

45 Test Statistic for The test statistic for the mean of the population of differences ( ) is: which is Student t distributed with n D –1 degrees of freedom, provided that the differences are normally distributed. Thus our rejection region becomes:

46 Example 13.4… From the data, we calculate… …which in turn we use for our t-statistic… …which we compare to our critical value of t: COMPUTE

47 Example 13.4… Since our calculated value of t (3.81) is greater than our critical value of t (1.711), it falls in the rejection region, hence we reject H 0 in favor of H 1 ; that is, there is overwhelming evidence (since the p-value =.0004) that Finance majors do obtain higher starting salary offers than their peers in Marketing. INTERPRET Compare…

48 Confidence Interval Estimator for We can derive the confidence interval estimator for algebraically as: In the previous example, what is the 95% confidence interval estimate of the mean difference in salary offers between the two business majors? That is, the mean of the population differences is between LCL=2,321 and UCL=7,809 dollars. Example 13.5

49 Identifying Factors… Factors that identify the t-test and estimator of :

50 Inference about the ratio of two variances So far we’ve looked at comparing measures of central location, namely the mean of two populations. When looking at two population variances, we consider the ratio of the variances, i.e. the parameter of interest to us is: The sampling statistic: is F distributed with degrees of freedom.

51 Inference about the ratio of two variances Our null hypothesis is always: H 0 : (i.e. the variances of the two populations will be equal, hence their ratio will be one) Therefore, our statistic simplifies to:

52 CI Estimator of σ 1 2 / σ 2 2 With algebraic manipulation we get s 1 1 LCL = s 2 F α /2,ν,ν s 1 1 UCL = s 2 F α /2,ν,ν Where ν 1 = n 1 – 1 and ν 2 = n 2 - 1 2 2 12 2 2 21

53 Example 13.6… In example 13.1, we looked at the variances of the samples of people who consumed high fiber cereal and those who did not and assumed they were not equal. We can use the ideas just developed to test if this is in fact the case. We want to show: H 1 : (the variances are not equal to each other) Hence we have our null hypothesis: H 0 : IDENTIFY

54 Example 13.6… Since our research hypothesis is: H 1 : We are doing a two-tailed test, and our rejection region is: CALCULATE F

55 Example 13.6… Our test statistic is: Hence there is sufficient evidence to reject the null hypothesis in favor of the alternative; that is, there is a difference in the variance between the two populations. CALCULATE F.581.61

56 Example 13.7… If we wanted to determine the 95% confidence interval estimate of the ratio of the two population variances in Example 13.1, we would proceed as follows… The confidence interval estimator for σ 2 / σ 2, is: CALCULATE 12

57 Example 13.7… The 95% confidence interval estimate of the ratio of the two population variances in Example 13.1 is: That is, we estimate that σ 2 / σ 2 lies between.2388 and.6614 Note that one (1.00) is not within this interval… CALCULATE 1 2

58 Identifying Factors Factors that identify the F-test and estimator of σ 2 / σ 2 : 1 2

59 Difference Between Two Population Proportions We will now look at procedures for drawing inferences about the difference between populations whose data are nominal (i.e. categorical). As mentioned previously, with nominal data, calculate proportions of occurrences of each type of outcome. Thus, the parameter to be tested and estimated in this section is the difference between two population proportions: p 1 –p 2.

60 Sampling from two populations of nominal data Population 1 Population 2 Parameter: p 1 Parameter: p 2 Statistic:p 1 ^ ^ Statistic:p 2 ^ Sample Size: n 1 Sample Size: n 2

61 Statistic and Sampling Distribution… To draw inferences about the the parameter p 1 –p 2, we take samples of population, calculate the sample proportions and look at their difference. is an unbiased estimator for p 1 –p 2. x 1 successes in a sample of size n 1 from population 1

62 Sampling Distribution The statistic is approximately normally distributed if the sample sizes are large enough so that: Since its “approximately normal” we can describe the normal distribution in terms of mean and variance… …hence this z-variable will also be approximately standard normally distributed:

63 Testing and Estimating p 1 –p 2 … Because the population proportions ( p 1 & p 2 ) are unknown, the standard error: is unknown. Thus, we have two different estimators for the standard error of, which depend upon the null hypothesis. We’ll look at these cases on the next slide…

64 Test Statistic for p 1 –p 2 … There are two cases to consider…

65 Example 13.8… A consumer packaged goods (CPG) company is test marketing two new versions of soap packaging. Version one (bright colors) is distributed in one supermarket, while version two (simple colors) is in another. Since the first version is more expensive, it must outsell the other design, that is its market share, p 1, must be greater than that of the other soap package design, i.e. p 2. That is, we want to know, is p 1 > p 2 ? or, using the language of statistics: H 1 : ( p 1 – p 2 ) > 0 Hence our null hypothesis will be H 0 : ( p 1 – p 2 ) = 0 [case 1] IDENTIFY

66 Example 13.8… Here is the summary data… Our null hypothesis is H 0 : ( p 1 – p 2 ) = 0, i.e. is a “case 1” type problem, hence we need to calculate the pooled proportion: IDENTIFY

67 Example 13.8… At a 5% significance level, our rejection region is: The value of our z-statistic is… Since 2.90 > 1.645, we reject H 0 in favor of H 1, that is, there is enough evidence to infer that the brightly colored design is more popular than the simple design. CALCULATE Compare…

68 Example 13.9… Suppose in our test marketing of soap packages scenario that instead of just a difference between the two package versions, the brightly colored design had to outsell the simple design by at least 3% Our research hypothesis now becomes: H 1 : ( p 1 – p 2 ) >.03 And so our null hypothesis is: H 0 : ( p 1 – p 2 ) =.03 IDENTIFY Since the r.h.s. of the H 0 equation is not zero, it’s a “case 2” type problem

69 Example 13.9… Same summary data as before: Since this is a “case 2” type problem, we don’t need to calculate the pooled proportion, we can go straight to z: IDENTIFY

70 Example 13.9… Since our calculated z-statistic (1.15) does not fall into our rejection region there is not enough evidence to infer that the brightly colored design outsells the other design by 3% or more. INTERPRET

71 Confidence Intervals… The confidence interval estimator for p 1 – p 2 is given by: and as you may suspect, its valid when…

72 Example 13.10… Create a 95% confidence interval for the difference between the two proportions of packaged soap sales from Ex. 13.8: COMPUTE

73 Identifying Factors… Factors that identify the z-test and estimator for p 1 – p 2


Download ppt "Chapter 13 Inference About Comparing Two Populations."

Similar presentations


Ads by Google