+ All Categories
Home > Documents > T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How...

T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How...

Date post: 14-Dec-2015
Category:
Upload: jadon-lamm
View: 219 times
Download: 4 times
Share this document with a friend
39
T-tests
Transcript
Page 1: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

T-tests

Page 2: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for a Single Sample: Try in pairs

Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose 12 cars travel exactly 10 miles (measured beforehand) and the following mileage figures were recorded by the odometers:

9.8, 10.1, 10.3, 10.2, 9.9, 10.4, 10.0, 9.9, 10.3, 10.0, 10.1, 10.2

Using the .01 level of significance, determine if you can trust your odometer.

s = .19

Mean = 10.1

Page 3: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Hypothesis Testing

1. State the research question.

2. State the statistical hypothesis.

3. Set decision rule.

4. Calculate the test statistic.

5. Decide if result is significant.

6. Interpret result as it relates to your research question.

Page 4: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Confidence Intervals

• You can estimate a population mean based on confidence intervals rather than statistical hypothesis tests.– A confidence interval is an interval of a certain width,

which we feel “confident” will contain the population mean.

– You are not determining whether the sample mean differs significantly from the population mean.

– Instead, you are estimating the population mean based on knowing the sample mean.

Page 5: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

When to Use Confidence Intervals

• If the primary concern is whether an effect is present, use a hypothesis test.

• You should consider using a confidence interval whenever a hypothesis test leads you to reject the null hypothesis, in order to determine the possible size of the effect.

Page 6: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for a Single Sample: Example

You are a chicken farmer… if only you had paid more attention in school. Anyhow, you think that a new type of organic feed may lead to plumper chickens. As every chicken farmer knows, a fat chicken sells for more than a thin chicken, so you are excited. You know that a chicken on standard feed weighs, on average, 3 pounds. You feed a sample of 25 chickens the organic feed for several weeks. The average weight of a chicken on the new feed is 3.49 pounds with a standard deviation of 0.90 pounds. Should you switch to the organic feed? Construct a 95 percent confidence interval for the population mean, based on the sample mean.

Page 7: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for a Single Sample:

Example

12.3

86.3

37.49.3

)18)(.064.2(49.3

)25

9.0)(064.2(49.3

Construct a 95 percent confidence interval.

))((Xconf stX

Page 8: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for a Single Sample:

Example

99.2

99.3

50.49.3

)18)(.797.2(49.3

)25

9.0)(797.2(49.3

))((Xconf stX

Construct a 99 percent confidence interval.

Page 9: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Confidence Intervals

• Notice that the 99 percent confidence interval is wider than the corresponding 95 percent confidence interval.

• The larger the sample size, the smaller the standard error, and the narrower (more precise) the confidence interval will be.

Page 10: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Confidence Intervals•It’s tempting to claim that once a particular 95 percent confidence interval has been constructed, it includes the unknown population mean with a 95 percent probability.

•However, any one particular confidence interval either does contain the population mean, or it does not.

•If a series of confidence intervals is constructed to estimate the same population mean, approximately 95 percent of these intervals should include the population mean.

Page 11: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

T-test for dependent Samples(ak.a., Paired samples t-test, Correlated Groups

Design, Within-Subjects Design, Repeated Measures, ……..)

Next week: Read Russ Lenth’s paper on effective sample-size determination

http://www.stat.uiowa.edu/techrep/tr303.pdf

Page 12: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples

• Repeated-Measures Design– When you have two sets of scores from the

same person in your sample, you have a repeated-measures, or within-subjects design.

– You are more similar to yourself than you are to other people.

Page 13: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Difference Scores

• The way to handle two scores per person, or a matched pair, is to make difference scores.– For each person, or each pair, you subtract one score

from the other.– Once you have a difference score for each person, or

pair, in the study, you treat the study as if there were a single sample of scores (scores that in this situation happen to be difference scores).

Page 14: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

A Population of Difference Scores with a Mean of 0

• The null hypothesis in a repeated-measures design is that on the average there is no difference between the two groups of scores.

• This is the same as saying that the mean of the sampling distribution of difference scores is 0.

Page 15: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples

• You do a t test for dependent samples the same way you do a t test for a single sample, except that:– You use difference scores.– You assume the population mean is 0.

D

D

s

Dt hyp

X

hyp

s

Xt

Page 16: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples

D

D

s

Dt hyp

n

ss DD

)1(

)( 22

nn

DDnsD

Page 17: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples: An Example

Page 18: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Hypothesis Testing

1. State the research question.

2. State the statistical hypothesis.

3. Set decision rule.

4. Calculate the test statistic.

5. Decide if result is significant.

6. Interpret result as it relates to your research question.

Page 19: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples: An Example

• State the research hypothesis.– Does listening to a pro-socialized medicine

lecture change an individual’s attitude toward socialized medicine?

• State the statistical hypotheses.

0:

0:

DA

DO

H

H

Page 20: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples: An Example

• Set the decision rule.

365.2

7181scores difference ofnumber

05.

critt

df

Page 21: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples: An Example

• Calculate the test statistic.

2.1)7(8

)16()42(8 2

s

42.8

2.1

Ds

76.442.

02

t

28

16

D

)1(

)( 22

nn

DDnsD

n

ss DD

Page 22: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Dependent Samples: An Example

• Decide if your results are significant.– Reject H0, -4.76<-2.365

• Interpret your results.– After the pro-socialized medicine lecture,

individuals’ attitudes toward socialized medicine were significantly more positive than before the lecture.

Page 23: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Issues with Repeated Measures Designs

• Order effects.– Use counterbalancing in order to eliminate any

potential bias in favor of one condition because most subjects happen to experience it first (order effects).

– Randomly assign half of the subjects to experience the two conditions in a particular order.

• Practice effects.– Do not repeat measurement if effects linger.

Page 24: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Tests

Independent Samples

Page 25: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples

• Observations in each sample are independent (not from the same population) each other.

• We want to compare differences between sample means.

21

)()( 2121

XX

hyp

s

XXt

Page 26: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Sampling Distribution of the Difference Between Means

• Imagine two sampling distributions of the mean...

• And then subtracting one from the other…• If you create a sampling distribution of the

difference between the means…– Given the null hypothesis, we expect the mean of the

sampling distribution of differences, 1- 2, to be 0.– We must estimate the standard deviation of the

sampling distribution of the difference between means.

Page 27: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Pooled Estimate of the Population Variance

• Using the assumption of homogeneity of variance, both s1 and s2 are estimates of the same population variance.

• If this is so, rather than make two separate estimates, each based on some small sample, it is preferable to combine the information from both samples and make a single pooled estimate of the population variance.

s p2

(n1 1)s12 (n2 1)s2

2

(n1 1) (n2 1)

Page 28: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Pooled Estimate of the Population Variance

• The pooled estimate of the population variance becomes the average of both sample variances, once adjusted for their degrees of freedom.– Multiplying each sample variance by its degrees of freedom

ensures that the contribution of each sample variance is proportionate to its degrees of freedom.

– You know you have made a mistake in calculating the pooled estimate of the variance if it does not come out between the two estimates.

– You have also made a mistake if it does not come out closer to the estimate from the larger sample.

• The degrees of freedom for the pooled estimate of the variance equals the sum of the two sample sizes minus two, or (n1-1) +(n2-1).

Page 29: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Estimating Standard Error of the Difference Between Means

2

2

1

2

21 n

s

n

ss pp

XX

s p2

(n1 1)s12 (n2 1)s2

2

(n1 1) (n2 1)

21

)()( 2121

XX

hyp

s

XXt

Page 30: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Stereotype Threat

“This test is a measure of your academic ability.”

“Trying to develop the test itself.”

Page 31: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• State the research question.– Does stereotype threat hinder the

performance of those individuals to which it is applied?

• State the statistical hypotheses.

211

21

211

21

:

:

0:

0:

H

H

or

H

H

o

o

Page 32: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Set the decision rule.

721.1

21)112()111()1()1(

05.

21

critt

nndf

Page 33: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Calculate the test statistic.

64.911

1062 X

58.612

791 X

Control Control Sq Threat Threat Sq4 16 7 499 81 8 64

12 144 7 498 64 2 49 81 6 36

13 169 9 8112 144 7 4913 169 10 10013 169 5 257 49 0 06 36 10 100

8 64106 1122 79 621

21

)()( 2121

XX

hyp

s

XXt

Page 34: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Calculate the test statistic.

s p2

(n1 1)s12 (n2 1)s2

2

(n1 1) (n2 1)

2

2

1

2

21 n

s

n

ss pp

XX

59.9)111()112(

05.10)111(18.9)112(2

ps

29.111

59.9

12

59.921

XX

s

05.10)10(11

)106()1122(11 222

s

18.9)11(12

)79()621(12 221

s

Page 35: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Calculate the test statistic.

29.111

59.9

12

59.921

Xx

s

64.92 X58.61 X

37.229.1

64.958.6

t

21

)()( 2121

XX

hyp

s

XXt

Page 36: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

The t Test for Independent Samples: An Example

• Decide if your result is significant.– Reject H0, - 2.37< - 1.721

• Interpret your results.– Stereotype threat significantly reduced

performance of those to whom it was applied.

Page 37: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Assumptions

1) The observations within each sample must be independent.

2) The two populations from which the samples are selected must be normal.

3) The two populations from which the samples are selected must have equal variances.

– This is also known as homogeneity of variance, and there are two methods for testing that we have equal variances:

• a) informal method – simply compare sample variances• b) Levene’s test – We’ll see this on the SPSS output

4) Random AssignmentTo make causal claims

5) Random SamplingTo make generalizations to the target population

Page 38: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

Which test?• Each of the following studies requires a t test for one or more

population means. Specify whether the appropriate t test is for one sample or two independent samples.

– College students are randomly assigned to undergo either behavioral therapy or Gestalt therapy. After 20 therapeutic sessions, each student earns a score on a mental health questionnaire.

– One hundred college freshmen are randomly assigned to sophomore roommates having either similar or dissimilar vocational goals. At the end of their freshman year, the GPAs of these 100 freshmen are to be analyzed on the basis of the previous distinction.

– According to the U.S. Department of Health and Human Services, the average 16-year-old male can do 23 push-ups. A physical education instructor finds that in his school district, 30 randomly selected 16-year-old males can do an average of 28 push-ups.

Page 39: T-tests. The t Test for a Single Sample: Try in pairs Odometers measure automobile mileage. How close to the truth is the number that is registered? Suppose.

For next week

• Read Russ Lenth’s paper on effective sample-size determination

• http://www.stat.uiowa.edu/techrep/tr303.pdf


Recommended