Statistics for the Social Sciences

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

description

Statistics for the Social Sciences. Psychology 340 Spring 2005. Using t-tests. Outline. Review t-tests One sample, related samples, independent samples. 1 sample. Two scores per subject. The related-samples t-test can be used when:. Statistical analysis follows design. 2 samples. - PowerPoint PPT Presentation

Transcript of Statistics for the Social Sciences

Page 1: Statistics for the Social Sciences

Statistics for the Social Sciences

Psychology 340Spring 2005

Using t-tests

Page 2: Statistics for the Social Sciences

Statistics for the Social Sciences

Outline

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

Page 3: Statistics for the Social Sciences

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 4: Statistics for the Social Sciences

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 5: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

t =X − μ

X

sX

zX

=X − μ

X

σX

sX

=s

n

Test statistic

Diff. Expected by chance

σX

n

One sample z One sample t

df = n −1

Related samples t

t =D−μD

sD

sD =sDnD

df =nD −1

Page 6: Statistics for the Social Sciences

Statistics for the Social Sciences

Effect Sizes & Power for t Test for Dependent Means

d =μ1 −μ2

σD

estimated d =D−0sD

Remember we don’t know these

Page 7: Statistics for the Social Sciences

Statistics for the Social Sciences

Approximate Sample Size Needed for 80% Power (.05 significance level)

• Using Power and effect sizes to determine how many participants you need

Page 8: Statistics for the Social Sciences

Statistics for the Social Sciences

Independent samples

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

Memory treatment

Memory patients Memory

Test

• 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:

Memory placebo

MemoryTest

Compare these two means

XA

XB

Page 9: Statistics for the Social Sciences

Statistics for the Social Sciences

Statistical analysis follows design

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

– 2 samples

– Samples are independent

t =(X A − X B ) − (μA − μB )

sX A −X B

Page 10: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

Estimate of the standard error based on the variability of both samples

test statistic =observed difference

difference expected by chance

Page 11: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

Test statistic

t =(X A − X B ) − (μA − μB )

sX A −X B

t =X − μ

X

sX

One-sample tIndependent-samples t

Sample means

Page 12: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

Test statistic

t =(X A − X B ) − (μA − μB )

sX A −X B

t =X − μ

X

sX

One-sample tIndependent-samples t

Population means• from the hypotheses

Page 13: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

Test statistic

t =(X A − X B ) − (μA − μB )

sX A −X B

t =X − μ

X

sX

One-sample tIndependent-samples t

Population means• from the hypotheses

H0

:Memory performance by the treatment group is equal to memory performance by the no treatment group.So:

(μA −μB) =0

Page 14: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

test statistic =observed difference

difference expected by chance

Test statistic

t =X − μ

X

sX

One-sample t

t =(X A − X B ) − (μA − μB )

sX A −X B

Estimated standard error(difference expected by chance)

estimate is based on one

sample

We have two samples, so the estimate is based on two

samples

Page 15: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

sX A −X B

=sp

2

nA

+sp

2

nB

“pooled variance”

We combine the variance from the two

samples

Number of

subjects in group

A

Number of

subjects in group

B

Page 16: Statistics for the Social Sciences

Statistics for the Social Sciences

s2 =SSn−1

variance

Performing your statistical test

sX A −X B

=sp

2

nA

+sp

2

nB

“pooled variance”

We combine the variance from the two

samples

Recall “weighted means,”

need to use “weighted

variances” here

sp2 =

SSA + SSB

dfA + dfB

sp2 =

sA2dfA( ) + sB

2dfB( )dfA +dfB

dfA =(nA −1)dfB =(nB −1)

Variance (s2) * degrees of freedom (df)

s2 (n −1) =SS

Page 17: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

sX A −X B

=sp

2

nA

+sp

2

nB

df = nA + nB − 2

t =(X A − X B ) − (μA − μB )

sX A −X B

=(nA −1) + (nB −1)

sp2 =

SSA + SSB

dfA + dfB

Independent-samples t• Compute your estimated standard error

sp2 =

sA2dfA( ) + sB

2dfB( )dfA +dfB

• Compute your t-statistic

• Compute your degrees of freedom

dfA =(nA −1)dfB =(nB −1)

This is the one you use to look up your tcrit

Page 18: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

Need to compute the mean and variability for each sample

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

Page 19: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

Need to compute the mean and variability for each sampleControl group

= 50

(45-50)2 + (55-50)2 + (40-50)2 + (60-50)2

= 250

SS =A

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

XA =45 + 55 + 40 + 60

4

XA =50SSA =250

Page 20: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

Exp. group

(43-44.5)2 + (49- 44.5)2 + (35- 44.5)2 + (51- 44.5)2

= 155

SS =B

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

Need to compute the mean and variability for each sample

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

XB =43+ 49 + 35 + 51

4

XA =50SSA =250

XB =44.5SSB =155

= 44.5

Page 21: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

sX A −X B

=sp

2

nA

+sp

2

nB

t =(X A − X B ) − (μA − μB )

sX A −X B

sp2 =

SSA + SSB

dfA + dfB

=250 +155

3+ 3= 67.5€

=67.5

4+

67.5

4= 5.81€

=(50 − 44.5) − (0)

5.81

dfA = (nA −1)

dfB = (nB −1)

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51XA =50

SSA =250XB =44.5

SSB =155

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

= 0.95

Page 22: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

Tobs= 0.95Tcrit= ±2.447

sX A −X B

= 5.81

sp2 = 67.5

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: : : : : :5 1,476 2.015 2.571 3.365 4.0326 1.440 1.943 2.447 3.143 3.707: : : : : :

df = nA + nB − 2 = 6

= 0.05Two-tailed

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

t =(X A − X B ) − (μA − μB )

sX A −X B

=(50 − 44.5) − (0)

5.81

dfA = (nA −1)

dfB = (nB −1)

XA =50SSA =250

XB =44.5SSB =155

= 0.95

Page 23: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

Tobs= 0.95= 0.05Two-tailedTcrit= ±2.447

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

sX A −X B

= 5.81

sp2 = 67.5

df = nA + nB − 2 = 6

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

t =(X A − X B ) − (μA − μB )

sX A −X B

=(50 − 44.5) − (0)

5.81

dfA = (nA −1)

dfB = (nB −1)

XA =50SSA =250

XB =44.5SSB =155

+2.45 = tcrit

- Fail to Reject H0

tobs=0.95

= 0.95

Page 24: Statistics for the Social Sciences

Statistics for the Social Sciences

Performing your statistical test

Tobs= 0.95= 0.05Two-tailedTcrit= ±2.447

Tobs Tcrit

Compare<

Fail to reject the H0

PersonExp. group

Control

group1

23

4

45

5540

60

43

4935

51

sX A −X B

= 5.81

sp2 = 67.5

df = nA + nB − 2 = 6

Dr. Mnemonic develops a new treatment for patients with a memory disorder. He isn’t certain what impact, if any, it will have. To test it he randomly assigns 8 patients to one of two samples. He then gives one sample the new treatment but not the other. Following the treatment period he gives both groups a memory test. The data are presented below. Use = 0.05.

t =(X A − X B ) − (μA − μB )

sX A −X B

=(50 − 44.5) − (0)

5.81

dfA = (nA −1)

dfB = (nB −1)

XA =50SSA =250

XB =44.5SSB =155

= 0.95

Page 25: Statistics for the Social Sciences

Statistics for the Social Sciences

Assumptions

• Each of the population distributions follows a normal curve

• The two populations have the same variance– We’ll return to this next time

Page 26: Statistics for the Social Sciences

Statistics for the Social Sciences

Effect Size for the t Test for Independent Means

• Estimated effect size after a completed study

Estimated d =X1 −X2

sPooled

Page 27: Statistics for the Social Sciences

Statistics for the Social Sciences

Power for the t Test for Independent Means (.05 significance level)

Page 28: Statistics for the Social Sciences

Statistics for the Social Sciences

Approximate Sample Size Needed for 80% Power (.05 significance level)

Page 29: Statistics for the Social Sciences

Statistics for the Social Sciences

Statistical Tests Summary

Design Statistical test (Estimated) Standard error

tcrit =(μA −μB)−(XA −XB)

sXA−XBsXA −XB

=sP2

nA+sP2

nB€

sD

=sD

nD

tcrit =D−μD

sD

sX =sn

tcrit =X−μX

sX

zX =X−μX

σ X

σ X =σ

nOne sample, σ knownOne sample, σ unknown

Two related samples, σ unknown

Two independent samples, σ unknown