statistics for the social sciences psychology 340 spring 2005 using t-tests

41
Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Upload: maleah-jolls

Post on 01-Apr-2015

215 views

Category:

Documents


1 download

TRANSCRIPT

Page 1: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Psychology 340Spring 2005

Using t-tests

Page 2: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Outline (for 2 weeks)

• Review t-tests– One sample, related samples, independent samples

– Additional assumptions• Levene’s test

Page 3: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Statistical analysis follows design

• The one-sample z-test can be used when:

– 1 sample

zX

=X − μ

X

σX

– One score per subject

– Population mean () and standard deviation ()are known

Page 4: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Statistical analysis follows design

• The one-sample t-test can be used when:

– 1 sample– One score per subject

– Population mean () is known

– but standard deviation () is NOT known

t =X − μ

X

sX

Page 5: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Testing Hypotheses

– Step 1: State your hypotheses– Step 2: Set your decision criteria– Step 3: Collect your data – Step 4: Compute your test statistics

• Compute your estimated standard error• Compute your t-statistic• Compute your degrees of freedom

– Step 5: Make a decision about your null hypothesis

• Hypothesis testing: a five step program

Page 6: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

• What are we doing when we test the hypotheses?– Consider a variation of our memory experiment example

Population of memory patients

MemoryTest is known

Memory treatment

Memory patients

MemoryTestX

Compare these two means

Conclusions: • the memory treatment sample are the same as those in the population of memory patients.• they aren’t the same as those in the population of memory patients

H0

:HA:

Page 7: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

• What are we doing when we test the hypotheses?

Real world (‘truth’)

H0: is false (is a treatment effect)

Two populations

XA

they aren’t the same as those in the population of memory patients

H0: is true (no treatment effect)

One population

XA

the memory treatment sample are the same as those in the population of memory patients.

Page 8: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

• What are we doing when we test the hypotheses?– Computing a test statistic: Generic test

test statistic =observed difference

difference expected by chance

Could be difference between a sample and a population, or between different samples

Based on standard error or an estimate

of the standard error

Page 9: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

t =X − μ

X

sX

zX

=X − μ

X

σX

Test statistic

One sample z One sample tidentical

Page 10: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

t =X − μ

X

sX

zX

=X − μ

X

σX

Test statistic

Diff. Expected by chance

X

nStandard error

One sample z One sample t

different

don’t know this,so need to estimate it

Page 11: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

t =X − μ

X

sX

zX

=X − μ

X

σX

sX

=s

n

Test statistic

Diff. Expected by chance

X

nStandard error

Estimated standard error

One sample z One sample t

different

don’t know this,so need to estimate it

df = n −1Degrees of freedom

Page 12: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

One sample t-test

• The t-statistic distribution (a transformation of the distribution of sample means transformed)– Varies in shape according to the degrees of freedom

• New table: the t-table

Page 13: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

One sample t-test

If test statistic is here Fail to reject H0

Distribution of the t-statistic If test

statistic is here Reject H0

– To reject the H0, you want a computed test statistics that is large• The alpha level gives us the decision criterion• New table: the t-table

• The t-statistic distribution (a transformation of the distribution of sample means transformed)

Page 14: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

One sample t-test

• New table: the t-table

One tailed - or -

Two-tailed

levels

Critical values of ttcrit

Degrees of freedomdf

Page 15: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

One sample t-test

• What is the tcrit for a two-tailed hypothesis test with a sample size of n = 6 and an -level of 0.05?

Distribution of the t-statistic= 0.05

Two-tailedn = 6

df = n - 1 = 5

tcrit = +2.571

Page 16: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.6045 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

One sample t-test

Distribution of the t-statistic= 0.05

One-tailedn = 6

df = n - 1 = 5

tcrit = +2.015

• What is the tcrit for a one-tailed hypothesis test with a sample size of n = 6 and an -level of 0.05?

Page 17: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

• Step 1: State your hypotheses

H0

:the memory treatment sample are the same as those in the population of memory patients.HA: they aren’t the same as those in the population of memory patients

Treatment > pop = 60

Treatment < pop = 60

Page 18: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

• Step 2: Set your decision criteria

H0: Treatment > pop = 60 HA: Treatment < pop = 60

= 0.05One -tailed

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

An example: One sample t-test

Page 19: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

• Step 2: Set your decision criteria

H0: Treatment > pop = 60 HA: Treatment < pop = 60

= 0.05One -tailed

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

Page 20: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

= 0.05One -tailed

• Step 3: Collect your data

H0: Treatment > pop = 60 HA: Treatment < pop = 60

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

Page 21: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

= 0.05One -tailed

• Step 4: Compute your test statistics

t =X − μ

X

sX

=55 − 60

816

⎛ ⎝ ⎜

⎞ ⎠ ⎟

= -2.5

H0: Treatment > pop = 60 HA: Treatment < pop = 60

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

Page 22: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

= 0.05One -tailed

• Step 4: Compute your test statistics

df = n −1

t = -2.5

H0: Treatment > pop = 60 HA: Treatment < pop = 60

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

=16 −1=15

Page 23: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

= 0.05One -tailed

t(15) = −2.5

• Step 5: Make a decision about your null hypothesis

H0: Treatment > pop = 60 HA: Treatment < pop = 60

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

df =15

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.01:

15:

:1.341

:

:1.753

:

:2.131

:

:2.602

:

:2.947

:

tcrit = -1.753

Page 24: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

One sample t-test

An example: One sample t-test

Memory experiment example:• We give a n = 16 memory patients a memory improvement treatment.

= 0.05One -tailed

t(15) = −2.5

• Step 5: Make a decision about your null hypothesis

H0: Treatment > pop = 60 HA: Treatment < pop = 60

• How do they compare to the general population of memory patients who have a distribution of memory errors that is Normal, = 60?

• After the treatment they have an average score of = 55, s = 8 memory errors.

X

df =15

-1.753 = tcrit

tobs=-2.5

- Reject H0

Page 25: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

t Test for Dependent Means

• Unknown population mean and variance• Two situations

– One sample, two scores for each person• Repeated measures design

– Two samples, but individuals in the samples are related

• Same procedure as t test for single sample, except– Use difference scores– Assume that the population mean is 0

Page 26: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Statistical analysis follows design

• The related-samples t-test can be used when:

– 1 sample

t =D−D

sD

– Two scores per subject

Page 27: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Statistical analysis follows design

• The related-samples t-test can be used when:

– 1 sample– Two scores per subject

t =D−D

sD

– 2 samples

– Scores are related

- OR -

Page 28: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

sD

=sD

nD

Diff. Expected by chance

Estimated standard error of the differences

df = nD −1

Test statistic

t =D − μ

D

sD

What are all of these “D’s” referring to?

Mean of the differences

Number of difference scores

• Difference scores– For each person, subtract one score from the other

– Carry out hypothesis testing with the difference scores

• Population of difference scores with a mean of 0– Population 2 has a mean of 0

Page 29: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Differencescores

2

65

9

22 €

t =D − μ

D

sD

PersonPre-testPost-test

1

23

4

45

5540

60

43

4935

51

(Pre-test) - (Post-test)

H0

:There is no difference between pre-test and post-test

HA: There is a difference between pre-test and post-test

D = 0

D ≠ 0

Page 30: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Differencescores

2

65

9

22= 5.5

t =D − μ

D

sD

PersonPre-testPost-test

1

23

4

45

5540

60

43

4935

51

nD = 4

(Pre-test) - (Post-test)

D∑nD

=D

Page 31: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

PersonPre-testPost-testDifferencescores

1

23

4

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD D

D

s

−=

5.5

nD = 4

Page 32: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

PersonDifferencescores

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

sD

=sD

nD

t =D − μ

D

sD

-3.5- 5.5 =

0.5- 5.5 =-0.5- 5.5 =

3.5- 5.5 =

12.25

0.250.25

12.25

25 = SSD

D - D(D - D)2

sD =SSD

nD −19.2

14

25=

−=

D

D

s

−=

5.5

nD = 4

Page 33: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

sD

=sD

nD

t =D − μ

D

sD

25 = SSD

(D - D)2

sD =SSD

nD −19.2

14

25=

−=

D

D

s

−=

5.5 -3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 34: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

sD

=sD

nD

45.14

9.2==

2.9 = sD

D

D

s

−=

5.5 -3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 35: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

5.5 D−=

1.45 = sD

?Think back to the null hypotheses

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 36: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

5.5 D−=

1.45 = sD

H0: Memory performance at the post-test are equal to memory performance at the pre-test.

D

= 0

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 37: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

05.5 −=

1.45 = sD

8.3=This is our tobs

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 38: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

05.5 −=

1.45 = sD

8.3=tobs

Proportion in one tail0.10 0.05 0.025 0.01 0.005

Proportion in two tailsdf 0.20 0.10 0.05 0.02 0.011 3.078 6.314 12.706 31.821 63.6572 1.886 2.920 4.303 6.965 9.9253 1.638 2.353 3.182 4.541 5.8414 1.533 2.132 2.776 3.747 4.604

= 0.05Two-tailedtcrit

df = nD −1

=±3.18

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 39: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

+3.18 = tcrit

- Reject H0

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

05.5 −=

1.45 = sD

8.3=tobs= 0.05Two-tailedtcrit

df = nD −1

=±3.18

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4 tobs=3.8

Page 40: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

What are all of these “D’s” referring to?

Person

1

23

4

Pre-testPost-test

45

5540

60

43

4935

51

2

65

9

22D = 5.5

t =D − μ

D

sD

25 = SSD

(D - D)2

2.9 = sD

45.1

05.5 −=

1.45 = sD

8.3=tobs= 0.05Two-tailedtcrit

df = nD −1

=±3.18

Tobs > tcrit

so we reject the H0

-3.5

0.5-0.5

3.5

D - DDifferencescores

12.25

0.250.25

12.25

nD = 4

Page 41: Statistics for the Social Sciences Psychology 340 Spring 2005 Using t-tests

Statistics for the Social Sciences

Next time

• Finishing up related samples t-tests

• Independent samples t-tests• Using SPSS with t-tests (maybe next Monday)