Presentation is loading. Please wait.

Presentation is loading. Please wait.

Hypothesis tests for the difference between two means: Independent samples Section 11.1.

Similar presentations


Presentation on theme: "Hypothesis tests for the difference between two means: Independent samples Section 11.1."— Presentation transcript:

1 Hypothesis tests for the difference between two means: Independent samples
Section 11.1

2 Objectives Perform a hypothesis test for the difference between two means using the P-value method Perform a hypothesis test for the difference between two means using the critical value method

3 Objective 1 Perform a hypothesis test for the difference between two means using the P-value method

4 Independent Samples Scores on the National Assessment of Educational Progress (NAEP) mathematics test range from 0 to 500. In a recent year, the sample mean score for students using a computer was 309, with a sample standard deviation of 29. For students not using a computer, the sample mean was 303, with a sample standard deviation of 32. Assume there were 60 students in the computer sample, and 40 students in the sample that didn’t use a computer. We can see that the sample mean scores differ by 6 points: 309 − 303 = 6. Now, we are interested in the difference between the population means, which will not be exactly the same as the difference between the sample means. Is it plausible that the difference between the population means could be 0? How strong is the evidence that the population mean scores are different? This is an example of a situation in which the data consist of two independent samples. Two samples are independent if the observations in one sample do not influence the observations in the other.

5 Notation We use the following notation:
𝜇 1 and 𝜇 2 are the population means. 𝑥 1 and 𝑥 2 are the sample means. 𝑠 1 and 𝑠 2 are the sample standard deviations. 𝑛 1 and 𝑛 2 are the sample sizes.

6 Null and Alternate Hypotheses
In the scores from the NAEP, the issue is whether the mean scores from both populations of students, those using computers and those without computers, are equal. In other words, does 𝜇 1 = 𝜇 2 ? Therefore, the null hypothesis says that the population means are equal: 𝐻 0 : 𝜇 1 = 𝜇 2 As an alternate to the null hypothesis above, there are three possibilities. 𝐻 1 : 𝜇 1 < 𝜇 𝐻 1 : 𝜇 1 > 𝜇 𝐻 1 : 𝜇 1 ≠ 𝜇 2

7 Test Statistic The test statistic is based on the difference between the two sample means 𝑥 1 − 𝑥 2 . The mean of 𝑥 1 − 𝑥 2 is 𝜇 1 − 𝜇 2 . We approximate the standard deviation of 𝑥 1 − 𝑥 2 with the standard error derived in the previous chapter. Standard error of 𝑥 1 − 𝑥 2 = 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 The test statistic is 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 With degrees of freedom = smaller of 𝑛 1 −1 and 𝑛 2 −1

8 Assumptions The method just described requires the following assumptions: Assumptions: We have simple random samples from two populations. The samples are independent of one another. Each sample size is large (𝑛 > 30), or its population is approximately normal.

9 Hypothesis Test for 𝜇 1 − 𝜇 2 using the P-value Method
Step 1: State the null and alternate hypotheses. Step 2: If making a decision, choose a significance level 𝛼. Step 3: Compute the test statistic 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 . Step 4: Compute the P-value Step 5: Interpret the P-value. If making a decision, reject 𝐻 0 if the P-value is less than or equal to the significance level 𝛼. Step 6: State a conclusion.

10 Example The National Assessment of Educational Progress (NAEP) tested a sample of students who had used a computer in their mathematics classes, and another sample of students who had not used a computer. The sample mean score for students using a computer was 309, with a sample standard deviation of 29. For students not using a computer, the sample mean was 303, with a sample standard deviation of 32. Assume there were 60 students in the computer sample, and 40 students in the sample that hadn’t used a computer. Can you conclude that the population mean scores differ? Use the α = 0.05 level. Solution: We first check the assumptions. We have two independent random samples with sizes larger than 30. The assumptions are satisfied. We summarize the relevant information: With Computer Without Computer Sample mean 𝑥 1 =309 𝑥 2 =303 Sample stand dev. 𝑠 1 =29 𝑠 2 =32 Sample size 𝑛 1 =60 𝑛 2 =40 Population Mean 𝜇 1 (unknown) 𝜇 2 (unknown) The null and alternate hypotheses are: 𝐻 0 : 𝜇 1 = 𝜇 2 𝐻 1 : 𝜇 1 ≠ 𝜇 2

11 Example – Perform a Hypothesis Test
Solution (continued): Under the assumption that 𝐻 0 is true, the test statistic is 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 1 𝑛 1 + 𝑠 2 𝑛 2 = 309 −303 − =0.953 This is a two-tailed test, so the P-value is the sum of the areas to the right of and to the left of − Using technology, we get a P-value of Since P > 0.05, we do not reject 𝐻 0 at the 𝛼 = 0.05 level. There is not enough evidence to conclude that the mean scores differ between those students who use a computer and those who do not. The mean scores may be the same. Remember 𝐻 0 : 𝜇 1 = 𝜇 2 𝐻 1 : 𝜇 1 ≠ 𝜇 2 𝑥 1 =309 𝑥 2 =303 𝑠 1 =29 𝑠 2 =32 𝑛 1 =60 𝑛 2 =40

12 Hypothesis Testing on the TI-84 PLUS
The 2-SampTTest command will perform a hypothesis test for the difference between two means when the samples are independent. This command is accessed by pressing STAT and highlighting the TESTS menu. If the summary statistics are given the Stats option should be selected for the input option. If the raw sample data are given, the Data option should be selected.

13 Example (TI-84 PLUS) The National Assessment of Educational Progress (NAEP) tested a sample of students who had used a computer in their mathematics classes, and another sample of students who had not used a computer. The sample mean score for students using a computer was 309, with a sample standard deviation of 29. For students not using a computer, the sample mean was 303, with a sample standard deviation of 32. Assume there were 60 students in the computer sample, and 40 students in the sample that hadn’t used a computer. Can you conclude that the population mean scores differ? Use the α = 0.05 level. Solution: We first check the assumptions. We have two independent random samples with sizes larger than 30. The assumptions are satisfied. We summarize the relevant information: With Computer Without Computer Sample mean 𝑥 1 =309 𝑥 2 =303 Sample stand dev. 𝑠 1 =29 𝑠 2 =32 Sample size 𝑛 1 =60 𝑛 2 =40 Population Mean 𝜇 1 (unknown) 𝜇 2 (unknown) The null and alternate hypotheses are: 𝐻 0 : 𝜇 1 = 𝜇 2 𝐻 1 : 𝜇 1 ≠ 𝜇 2

14 Example (TI-84 PLUS) The National Assessment of Educational Progress (NAEP) tested a sample of students who had used a computer in their mathematics classes, and another sample of students who had not used a computer. The sample mean score for students using a computer was 309, with a sample standard deviation of 29. For students not using a computer, the sample mean was 303, with a sample standard deviation of 32. Assume there were 60 students in the computer sample, and 40 students in the sample that hadn’t used a computer. Can you conclude that the population mean scores differ? Use the α = 0.05 level. Solution: We press STAT and highlight the TESTS menu and select 2-SampTTest.

15 Example (TI-84 PLUS) We press STAT and highlight the TESTS menu and select 2-SampTTest. Select Stats and enter the following: Since we have a two-tailed test, select the ≠𝝁 𝟎 option and No for the pooled option. Select Calculate. The P-value > 0.05, so we do not reject 𝐻 0 at the 𝛼 = 0.05 level. There is not enough evidence to conclude that the mean scores differ between those students who use a computer and those who do not. The mean scores may be the same. With Computer Without Computer Sample mean 𝑥 1 =309 𝑥 2 =303 Sample stand dev. 𝑠 1 =29 𝑠 2 =32 Sample size 𝑛 1 =60 𝑛 2 =40

16 Objective 2 Perform a hypothesis test for the difference between two means using the critical value method

17 Hypothesis Tests Using the Critical Value Method
Step 1. State the null and alternate hypotheses. The null hypothesis will have the form 𝐻 0 : 𝜇 1 = 𝜇 2 . The alternate hypothesis will be 𝜇 1 < 𝜇 2 , 𝜇 1 < 𝜇 2 , or 𝜇 1 ≠ 𝜇 2 . Step 2. Choose a significance level 𝛼, and find the critical value or values. Step 3. Compute the test statistic 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 Step 4. Determine whether to reject 𝐻 0 , as follows: Step 5. State a conclusion.

18 Example Treatment of wastewater is important to reduce the concentration of undesirable pollutants. One such substance is benzene, which is used as an industrial solvent. Two methods of water treatment are being compared. Treatment 1 is applied to five specimens of wastewater, and treatment 2 is applied to seven specimens. The benzene concentrations, in units of milligrams per liter, for each specimen are as follows: Treatment 1: Treatment 2: How strong is the evidence that the mean concentration is less for treatment 2 than for treatment 1? We will test at the α = 0.05 significance level. Solution: We first check the assumptions. Because the samples are small, we must check for strong skewness and outliers. We construct dotplots for each sample. There are no outliers, and no evidence of strong skewness, in either sample.

19 Solution 𝐻 0 : 𝜇 1 = 𝜇 2 𝐻 1 : 𝜇 1 > 𝜇 2
The null and alternate hypotheses are: 𝐻 0 : 𝜇 1 = 𝜇 𝐻 1 : 𝜇 1 > 𝜇 2 We will find the critical value in Table A.3. The sample sizes are 𝑛 1 = 5 and 𝑛 2 = 7. For the number of degrees of freedom, we use the smaller of 5 − 1 = 4 and 7 − 1 = 6, which is 4. Because the alternate hypothesis, 𝜇 1 − 𝜇 2 > 0, is right-tailed, the critical value is the value with area 0.05 to its right. We consult Table A.3 with 4 degrees of freedom and find that 𝑡 𝛼 =

20 Solution To compute the test statistic, we first compute the sample means and standard deviations. These are 𝑥 1 =6.84 𝑥 2 =5.70 𝑠 1 = 𝑠 2 = The sample sizes are 𝑛 1 = 5 and 𝑛 2 =7. Under the assumption that 𝐻 0 is true, 𝜇 1 − 𝜇 2 = 0, the value of the test statistic is 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 1 2 𝑛 1 + 𝑠 2 2 𝑛 2 = 6.84 −5.70 − =1.590 This is a right-tailed test, so we reject 𝐻 0 if 𝑡≥ 𝑡 𝛼 . Because 𝑡 = and 𝑡 𝛼 = 2.132, we do not reject 𝐻 0 . There is not enough evidence to conclude that the mean benzene concentration with treatment 1 is greater than that with treatment 2. The concentrations may be the same.

21 Hypothesis Tests Using Pooled Standard Deviation
When the two population standard deviations, 𝜎 1 and 𝜎 2 , are known to be equal, there is an alternate method for testing hypotheses about 𝜇 1 − 𝜇 2 . This alternate method was widely used in the past, and is still an option in many computer packages. We will describe the method here, because it is still sometimes used. However, the method is rarely appropriate, for the same reasons that the pooled method for constructing confidence intervals is rarely appropriate. Step 1: Compute the pooled standard deviation, 𝑠 𝑝 , as follows: 𝑠 𝑝 = 𝑛 1 −1 𝑠 𝑛 2 −1 𝑠 2 2 𝑛 1 + 𝑛 2 −2 Step 2: Compute the test statistic: 𝑡= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 2 𝑠 𝑝 1 𝑛 𝑛 2 Step 3: Compute the degrees of freedom: Degrees of freedom = 𝑛 1 + 𝑛 2 −2 Step 4: Compute the P-value using a Student’s 𝑡 distribution with 𝑛 1 + 𝑛 2 −2 degrees of freedom.

22 Hypothesis Tests When 𝜎 1 and 𝜎 2 are Known
When the two population standard deviations, 𝜎 1 and 𝜎 2 , are known, we can modify the test statistic presented here by replacing 𝑠 1 and 𝑠 2 with 𝜎 1 and 𝜎 2 , and using the standard normal distribution rather than the Student’s 𝑡 distribution to find the P-value or critical values. In practice, 𝜎 1 and 𝜎 2 are rarely known, so this method is not often applicable. 𝑧= 𝑥 1 − 𝑥 2 − 𝜇 1 − 𝜇 σ 𝑛 σ 𝑛 2 The assumptions for this method are the same as for the method using the Student’s 𝑡 distribution, with the additional assumption that the population standard deviations are known.

23 You Should Know… How to perform a hypothesis test for the difference between two means using the P-value method How to perform a hypothesis test for the difference between two means using the critical value method


Download ppt "Hypothesis tests for the difference between two means: Independent samples Section 11.1."

Similar presentations


Ads by Google