Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With...

14
1 Independent Samples T- test With previous tests, we were interested in comparing a single sample with a population With most research, you do not have knowledge about the population -- you don’t know the population mean and standard deviation INDEPENDENT SAMPLES T-TEST : Hypothesis testing procedure that uses separate samples for each treatment condition (between subjects design) Use this test when the population mean and standard deviation are unknown, and 2 separate groups are being compared Example : Do males and females differ in terms of their exam scores? Take a sample of males and a separate sample of females and apply the hypothesis testing steps to determine if there is a significant difference in scores between the groups

Transcript of Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With...

Page 1: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

1

Independent Samples T-test

• With previous tests, we were interested incomparing a single sample with a population

• With most research, you do not haveknowledge about the population -- you don’tknow the population mean and standarddeviation

INDEPENDENT SAMPLES T-TEST:• Hypothesis testing procedure that uses

separate samples for each treatment condition(between subjects design)

• Use this test when the population mean andstandard deviation are unknown, and 2separate groups are being compared

Example: Do males and females differ in termsof their exam scores?

• Take a sample of males and a separate sampleof females and apply the hypothesis testingsteps to determine if there is a significantdifference in scores between the groups

Page 2: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

2

Formula:

• We are interested in a difference between 2populations (females, µ1, and males, µ2) andwe use 2 samples (females, x1, and males, x2)to estimate this difference

( ) ( )21

2121

xxs

xxt

−−−=

µµ

ESTIMATED STANDARD ERROR OF THEDIFFERENCE:

• Gives us the total amount of error involved inusing 2 sample means to estimate 2population means. It tells us the averagedistance between the sample difference (x1-x2)and the population difference (µ1-µ2)

• As we’ve done previously, we have toestimate the standard error using the samplestandard deviation or variance and, sincethere are 2 samples, we must average thetwo sample variances.

Page 3: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

3

POOLED VARIANCE: The average of the twosample variances, allowing the larger sampleto weighted more heavily

Formulae:

OR

df1=df for 1st sample; n1-1df2=df for 2nd sample; n2-1

21

22

212

12 )()(

dfdf

sdfsdfs pooled +

+=

21

212

dfdf

SSSSspooled +

+=

Estimated Standard Error of theDifference

Degrees of freedom (df) for the Independentt statistic is n1 + n2 - 2 or df1+df2

2

2

1

2

21 n

s

n

ss pooledpooled

xx +=−

sx 1−x 2 =SS1 + SS2n1 + n2 − 2

1n1

+1n2

book formula

Page 4: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

4

Hypothesis testing using an IndependentSamples t-Test:

Example: Do males and females differ in their testscores for exam 2? The mean test score forfemales is 27.1 (s=2.57, n=19), and the meantest score for males is 26.7 (s=3.63, n=20)

Step 1: State the hypothesesH0: µ1-µ2=0 (µ1=µ2)H1: µ1-µ2≠0 (µ1 ≠µ2)

• This is a two-tailed test (no direction is predicted)

Step 2: Set the criterion• α=?

• df= n1+n2-2=?• Critical value for the t-test ?

Step 3: Collect sample data, calculate xand s

From the example we know the mean test scorefor females is 27.1 (s=2.57, n=19), and themean test score for males is 26.7 (s=3.63,n=20)

Page 5: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

5

Step 4: Compute the t-statistic

where

( ) ( )21

2121

xxs

xxt

−−−=

µµ

2

2

1

2

21 n

s

n

ss pooledpooled

xx +=−

• Calculate the estimated standard error of thedifference

21

22

212

12 )()(

dfdf

sdfsdfs pooled +

+=

1918

63.3)19(57.2)18( 222

+

+=pooleds

37

18.13)19(61.6)18( +=

37

36.25098.118 +=

98.937

34.369==

Page 6: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

6

• Compute the standard error (continued)

2

2

1

2

21 n

s

n

ss pooledpooled

xx +=−

20

98.9

19

98.921

+=−xxs 499.525. += 01.1=

( ) ( )21

2121

xxs

xxt

−−−=

µµ

396.01.1

4.

01.1

)7.261.27(==

−=t

*This alwaysdefaults to 0

•Calculate the t statistic

Step 5: Make a decision about thehypotheses

• The critical value for a two-tailed t-test withdf=37 (approx. 40) and α=.05 is 2.021

• Will we reject or fail to reject the nullhypothesis?

Page 7: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

7

Assumptions for the Independent t-Test:

• Independence: Observations within eachsample must be independent (they don’tinfluence each other)

• Normal Distribution: The scores in eachpopulation must be normally distributed

• Homogeneity of Variance: The twopopulations must have equal variances (thedegree to which the distributions are spreadout is approximately equal)

Repeated Measures T-test

• Uses the same sample of subjects measuredon two different occasions (within-subjectsdesign)

• Use this when the population mean andstandard deviation are unknown and you arecomparing the means of a sample of subjectsbefore and after a treatment

• We are interested in finding out how muchdifference exists between subjects’ scoresbefore the treatment and after the treatment

Page 8: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

8

DIFFERENCE SCORE (or D)• The difference between subjects’ scores before

the treatment and after the treatment• It is computed as x2-x1, where x2 is the subjects’

score after the treatment and x1 is the subjects’score before the treatment

• We use the sample of difference scores toestimate the population of difference scores (µD)

Example:

Does alcohol affect a person’s ability to drive?

A researcher selects a sample of 5 people and setsup an obstacle course.

– Each subject drives the course and the number ofcones he or she knocks over is counted.

– Next, the researcher has each subject drink a six-packof beer, then drive the course again, counting thenumber of cones each subject knocks over.

NOTE: Theory has shown that alcohol decreasesmotor and cognitive skills

Page 9: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

9

Step 1: State the hypothesesH0: µD=0H1: µD ≠0

Step 2: Set the criterion• One-tail test or two-tail test?• α=?

• df=n-1• Critical value for t ?

Step 3: Collect sample data, calculate D• Once the difference scores are obtained, all further

statistics are calculated using these scores instead ofthe pretest / posttest or before / after scores

Before After DSubject (x1) (x2) (x2 - x1) 1 2 8 62 0 4 43 4 11 74 2 5 35 3 8 5

D∑ = 25

Page 10: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

10

• Find the mean (average) difference score (D)

• The average difference of the number ofcones knocked down from before drinking toafter drinking is 5 cones. Remember, we arehypothesizing the difference to be zero.

D =D∑

n

55

25

5

53746==

++++=D

Step 4: Calculate the t-statisticFormula:

where andDs

Dt =

n

ss DD= D =

D∑n

estimated std.errorof mean diff. scores

the meandifferencescore

estimated std. deviationof diff. scores

Page 11: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

11

• Compute the estimated standard deviation of thedifference scores (sD)

6 1 14 -1 17 2 43 -2 45 0 0

• The average deviation of the difference scores (D) about the meandifference score (D) is 1.58 cones

D D − D (D− D)2

SSD =10 σ = SSn -1 =1.58

sD =SSn −1

=104

=1.58

• Compute the estimated standard error of the meandifference scores

– The average deviation of the sample mean differencescores (D) from the population mean difference score(µD) is .707 cones

n

ss DD= 707.

5

58.1==

Ds

• Compute the t-statistic

Ds

Dt = 07.7

707.

5==t

Page 12: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

12

Step 5: Make a decision• The critical value for a one-tailed t-test with

df=4 and α=.05 is 2.132

• Will we reject or fail to reject the nullhypothesis?

Advantages and Disadvantages of theRepeated Measures t-Test:

Advantages:• Controls for pre-existing individual

differences between samples (because only 1sample of people are being used

• More economical (fewer subjects are needed)

Disadvantages:• Subject to practice effects - the subjects are

performing the measurement task (i.e.driving the obstacle course, taking an exam)twice - scores may improve due to thepractice

Page 13: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

13

Assumptions of the Repeated Measures t-Test:

Independent Observations: The scores frombefore and after the treatment must not berelated (no practice effects)

Normal Distribution: The population ofdifference scores must be normallydistributed

Summary of HypothesisTesting through t-statistic

• We have looked at four inferential statistics:– z-score statistic– single sample t-statistic– independent samples t-statistic– repeated measures t-statistic, or matched subjects

• the generic formula for these statistics is:

z or t = sample statistic - population parameterstandard error

Page 14: Independent Samples T- test - University of · PDF file1 Independent Samples T-test •With previous tests, we were interested in comparing a single sample with a population •With

14

Summary of HypothesisTesting through t-statistic

• z-score statistic compares a sample to apopulation when the population s.d. is known

• t-statistic compares a sample to a populationwhen the population s.d. is unknown

• independent samples t-statistic compares 2independent samples

• repeated measures t-statistic compares 1sample measured on 2 occasions