31
Testing the Difference Between Two Means, Two Proportions, and Two Variances Chapter 9

Chapter 9. Many instances when researchers wish to compare two sample means Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Embed Size (px)

Citation preview

Page 1: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Testing the Difference Between Two Means, Two Proportions,

and Two VariancesChapter 9

Page 2: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Many instances when researchers wish to compare two sample means

Examples:◦ Average lifetimes of two different brands of bus

tires◦ Two different brands of fertilizer to see which is

better for growing plants◦ Two brands of cough syrup to see which is more

effective

Introduction

Page 3: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

In comparison of two means, same basic steps for hypothesis testing are used◦ z test and t test are both used

When using the t test, researcher must decide if two samples are independent or dependent

z test can be used to test two proportions

F test is used to test two variances

Introduction cont.

Page 4: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Question: Is there a difference in average age of people who enroll in nursing at a community college compared to a university?◦ We compare means of the two groups

Hypotheses are:◦ and where

9.1 – Testing Difference b/t Two Means: Using the z Test

Page 5: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Assumptions for the Test to Determine the Difference Between Two Means1. Samples must be independent of each other.

There is no relationship between subjects in each sample.

2. Standard deviation of both populations must be known, and if sample sizes are less than 30, populations must be normally or approx. normally distributed.

Assumptions

Page 6: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Theory behind testing difference between two means is based on selecting pairs of samples and comparing means of the pairs◦ Population means need not be known◦ All possible pairs are taken from population◦ Means of each pair are computed, subtracted,

then plotted◦ Curve of the plotted differences will be shaped

similar to the normal curve

Other Steps

Page 7: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Formula for z Test for Comparing Two Means◦ From Independent Populations

Formula

Page 8: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Tests can also be one-tailed, use these hypotheses◦ (right-tailed)

◦ (left-tailed)

Follow same 5-step process for hypothesis testing for a single mean (traditional method)

Right & Left Tailed Tests

Page 9: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

A survey found that the average hotel room rate in New Orleans is $88.42 and the average room rate in Phoenix is $80.61. Assume the data were obtained from two samples of 50 hotels each and that the standard deviations of the populations were $5.62 and $4.83, respectively. At α = 0.05, can it be concluded that there is a significant difference in the rates?

Example 9 – 1

Page 10: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

A researcher hypothesizes that the average number of sports that colleges offer for males is greater than the average number of sports colleges offer for females. A sample of the number of sports offered by colleges is shown (page 477). At α = 0.10, is there enough evidence to support the claim? Use the P-value method, and assume both population standard deviations are equal to 3.3.

Example 9 – 2

Page 11: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Sometimes, researcher is interested in testing a specific difference in means other than zero

Confidence intervals can be used:◦ When hypothesizing a difference of zero:

Reject null hypothesis if confidence interval does NOT contain zero

Do NOT reject null hypothesis if confidence interval DOES contain zero

Formula for z Confidence Interval for Two Means

Confidence Intervals of Two Means

Page 12: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Find the 95% confidence interval for the difference between the means for the data in example 9 – 1.

Example 9 - 3

Page 13: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

When population standard deviations are unknown, a t test is used to test difference between two means

Two samples must be independent and taken from two normally or approx. normally distributed populations

Independent samples◦ Samples are not related

9.2 – Testing Difference Between Two Means: Using t Test

Page 14: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Formula for the t Test for Testing Difference Between Two Means – Independent Samples

Where degrees of freedom are equal to the smaller of

Formula

Page 15: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

The average size of a farm in Indiana County, Pennsylvania, is 191 acres. The average size of a farm in Greene County, Pennsylvania, is 199 acres. Assume the data were obtained from two samples with standard deviations of 38 and 12 acres, respectively, and sample sizes of 8 and 10, respectively. Can it be concluded at α = 0.05 that the average size of the farms in the two counties is different? Assume the populations are normally distributed.

Example 9 - 4

Page 16: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Confidence intervals can also be used

Formula

d.f. = smaller value of

Confidence Intervals

Page 17: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Find the 95% confidence interval for the data in example 9 – 4

Example 9 – 5

Page 18: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Different version of t test is used when samples are dependent

Dependent samples◦ Subjects of samples are paired or matched in

some way

In a pre-test and post-test situation, only a gain or loss in values is compared

9.3 – Testing Difference b/t Two Means: Dependent Samples

Page 19: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Special t test for dependent means is used when samples are dependent

Hypotheses are:◦ Two tailed

◦ Left-tailed

◦ Right-tailed

Tailed Tests

Page 20: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

1. Find differences of values of pairs of data2. Find mean of differences3. Find standard deviation of differences4. Find estimated standard error of

differences5. Find test value with formula:

Where d.f. = n – 1

Steps

Page 21: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

A physical education director claims by taking a special vitamin, a weight lifter can increase his strength. Eight athletes are selected and given a test of strength, using the standard bench press. After 2 weeks of regular training, supplemented with the vitamin, they are tested again. Test the effectiveness of the vitamin regimen at α = 0.05. Each value in these data represents the maximum number of pounds the athlete can bench-press. Assume that the variable is approximately normally distributed.

Example 9 - 6

Page 22: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

A dietician wishes to see if a person’s cholesterol level will change if the diet is supplemented by a certain mineral. Six subjects were pretested, and then they took the mineral supplement for a 6-week period. The results are shown in the table (page 495). Can it be concluded that the cholesterol level has been changed at α = 0.10? Assume the variable is approximately normally distributed.

Example 9 - 7

Page 23: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

1. State hypotheses and identify claim

2. Find critical value(s)

3. Compute test value ◦ (by hand or with calculator using lists)

4. Make decision

5. Summarize results

Procedure for Testing: Dependent Samples

Page 24: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Confidence Interval for Mean Difference

Example 9 – 8◦ Find the 90% confidence interval for the data in

example 9 – 7

Confidence Interval

Page 25: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

z test can also be used to test equality of two proportions

Example:◦ Is proportion of men who exercise regularly less

than proportion of women who exercise regularly?

◦ Is there a difference in proportion of college grads who pay cash for purchases and proportion of non-college grads who pay cash?

9.4 – Testing Difference Between Proportions

Page 26: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

When testing difference between two proportions p1 and p2, hypotheses are stated as thus:

Hypotheses

Page 27: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Formula for z Test for Comparing Two Proportions

Where

Formula

Page 28: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Two requirements for use of z test for proportions:1. Samples must be independent2. n1p1 and n1q1 must be 5 or more

n2p2 and n2q2 must be 5 or more

Requirements

Page 29: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

In a nursing home study, researchers found that 12 of 34 small nursing home had a resident vaccination rate of less than 80%, while 17 out of 24 large nursing homes had a vaccination rate of less than 80%. At α = 0.05, test the claim that there is no difference in the proportions of the small and large nursing homes with a resident vaccination rate of less than 80%.

Example 9 - 9

Page 30: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

In a sample of 200 workers, 45% said that they missed work because of personal illness. Ten years ago in a sample of 200 workers, 35% said that they missed work because of personal illness. At α = 0.01, is there a difference in the proportion?

Example 9 - 10

Page 31: Chapter 9.  Many instances when researchers wish to compare two sample means  Examples: ◦ Average lifetimes of two different brands of bus tires ◦ Two

Confidence Interval for the Difference Between Two Proportions

Example 9 – 11◦ Find the 95% confidence interval for the difference of proportions for the

data in example 9-9

Confidence Intervals