Chapter 25 Paired Samples and Blocks. Independent vs. Dependent Samples We would like to determine...

Preview:

Citation preview

Chapter 25 Paired Samples and Blocks

Independent vs. Dependent Samples• We would like to determine if students taking an ACT prep

course will score better than students not taking the course. A random sample of 25 students was chosen who took the course and a random sample of another 25 students was chosen who did not take the course. At the end of the prep course, both groups were given the ACT.

Independent vs. Dependent Samples

• Group #1 – score on ACT from students taking prep course• Group #2 – score on ACT from students NOT taking prep

course

Observations taken from two independent samples

Use the difference of means test

2 sample t-test

Lets change the study just a little bit. . .

Independent vs. Dependent Samples

• We would like to determine if students can improve their ACT score by taking a prep course. A random sample of 25 students was chosen. They first took the ACT test. Then they spent 6 weeks taking the prep course. At the end of the 6 weeks, they took the ACT test again.

Independent vs. Dependent Samples

• Group #1 – score on ACT before prep course• Group #2 – score on ACT after prep course

Two observations taken for each subject

The samples are tied together or are dependent

Use the matched pairs test or

The t-test on the difference of means

Important Difference• If the values come from:

– two independent samples• use inference for (μ1 – μ2) = difference in means for two

groups– dependent samples “Matched Pairs”

(e.g. values collected twice from same subject)• use inference for μd = mean difference between two values

Lets test your ability to distinguish between the two

1. To test the effect of background music on productivity, the workers are observed. For one month they had no music. For another month they had background music.

to pair or not?

A worker's productivity measurement with music is paired with a productivity measurement for the same

worker without music—randomize order.

2. A random sample of 10 workers in Plant A are to be compared to a sample of 10 workers in Plant B.

to pair or not?

If we pick at random a worker in Plant A, we have no information that would allow us to match that worker to another worker in Plant B.

Hence we would treat these as independent samples.

3. A new weight reducing diet was tried on ten women. The weight of each woman was measured before the diet, and again after being on the diet for ten weeks.

to pair or not?

A woman's weight before using the diet is paired with a weight for the same woman after the diet.

4. To compare the average weight gain of pigs fed two different rations, nine pairs of pigs were used. The pigs in each pair were litter-mates.

to pair or not?As it says, litter-mates are paired. Some hog farmers question whether

this is a worthwhile pairing. Randomly assign members of pairs to two foods.

5. To test the effects of a new fertilizer, 100 plots are treated with one fertilizer, and 100 plots are treated with the other.

to pair or not?If we pick at random a plot treated with the new fertilizer, we have no

information that would allow us to match that plot with one of the plots where the old fertilizer was used. Hence we would treat these as

independent samples.

6. A sample of college teachers is taken. We wish to compare the average salaries of male and female teachers.

to pair or not?We would like to pair teachers with the same degrees, years of

experience, publications, etc., but this is usually impossible and we have no choice but to take independent samples.

7. A new fertilizer is tested on 100 plots. Each plot is divided in half. Fertilizer A is applied to one half and B to the other.

to pair or not?This is called a split plot design. The results obtained on one half of the plot are paired with the results obtained on the other half of the

same plot. Randomly assign fertilizers to the two halves.

8. Consumers Union wants to compare two types of calculators. They get 100 volunteers and ask them to carry out a series of 50 routine calculations (such as figuring discounts, sales tax, totaling a bill, etc.). Each calculation is done on each type of calculator, and the time required for each calculation is recorded.

to pair or not?The time it takes one individual to do a particular calculation on one calculator is paired with the time it took the same person to do the same calculation on the other calculator. Randomly assign order.

Inference for μd {the formulas}

• d = pairwise difference {find the difference for each and avg them}

• Confidence Interval

• Hypothesis Test (degrees of freedom = n-1)

Matched Pairs Hypothesis Test Example

• Measure effectiveness of exercise program in lowering blood cholesterol levels– SRS of men from a population– Measure cholesterol before program starts– Go through exercise program for 12 weeks– Measure cholesterol after program ends

• Is the exercise program effective?

Matched Pairs Hypothesis Test Example - Data

Subject 1 2 3 4 5 6 7 8 9 10

Pre 210 236 220 250 209 236 240 236 222 210

Post 204 210 218 200 208 234 246 240 208 220

When to use Paired T-test• Two observations from each subject • Post value depends on pre value• Observations are dependent• Do not have independent samples• Cannot use inference for μ1 - μ2

– Violates independent samples assumption

Matched Pairs Hypothesis Test Example - Data

• Look at pre-program levels minus post-program levels

Subject 1 2 3 4 5 6 7 8 9 10

Pre 210 236 220 250 209 236 240 236 222 210

Post 204 210 218 200 208 234 246 240 208 220

Diff. 6 26 2 50 1 2 -6 -4 14 -10

Matched Pairs• Because it is the differences we are interested in,

we will treat them as the data and ignore the original two groups.

• A matched pairs t-test is just a one-sample t-test for the mean of the pairwise differences.

Find the 1-var stats for the differences

• Let μd = mean difference in cholesterol levels in population

• Sample mean difference is • Sample standard deviation of differences is sd =

17.99• n = number of differences = 10

Hypothesis Statements

If exercise program has no effect, mean difference will be 0

If exercise program is effective, mean difference will be positive

HO: μd = 0

HA: μd > 0

Significance Level

Significance level = 95%

Alpha Level = 0.05

Test statistic:

Conditions• Random sample• Nearly Normal Population• Samples < 10% Population• Not independent - two measures on same

subjects

Matched Pairs T-test

t = 1.42

p-value = 0.188

Run the test using the calculator

Compare p-value to alpha

Since p-value > α, we will fail to reject the null hypothesis.

Conclusion: There is no evidence that the exercise program

reduced the mean cholesterol level of men in this population.

Matched Pairs Confidence Interval Example

• For a random sample of 12 European cities, the average high temperatures in January and July are given on the following slide.

• Find a 90% confidence interval for the mean temperature difference between summer and winter in Europe. Assume the Nearly Normal assumption is satisfied.

Matched Pairs Confidence Interval Example

Jan. 34 36 42 35 54 54 40 47 44 43 21 37

July 75 72 76 74 90 88 69 87 73 65 76 84

Diff. 41 36 34 39 36 34 29 40 29 22 55 47

Matched Pairs Confidence Interval Example

Check assumptions Random - ok

n ≤ 10% N - ok

Nearly Normal - ok

NOT independent

Matched Pairs Confidence Interval Example

Mean and Stdev

Matched Pairs Confidence Interval Example

Matched Pairs Confidence Interval Exampleinterpretation of interval

We are 90% confident that the true temperature difference between average summer and winter highs in European cities is contained in the interval (32.33, 41.31)

Recommended