The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are...

30
The t Tests Independent Samples

Transcript of The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are...

Page 1: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

The t Tests

Independent Samples

Page 2: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 3: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Sampling Distribution of the Difference Between Means

• Imagine gathering two samples from the same population.

• And then subtracting the mean of one from the mean of 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 (i.e., the standard error of the difference between means).

Page 4: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 5: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 6: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 7: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 8: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 9: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

The t Test for Independent Samples: An Example

• Set the decision rule.

721.1

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

05.

21

critt

nndf

Page 10: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 11: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 12: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 13: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 14: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

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 15: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Handout Example

Page 16: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Effect Size1) Simply report the actual results of the study.

– (a) Most direct method.– (b) Can be misleading.

2) Calculate Cohen’s d or Δ (preferred).(a) Magnitude of effect size is standardized by measuring

the mean difference between two treatments in terms of the standard deviation.

(b) d = (M1-M2)/sp2

(c) Evaluate using the following criteria:• i) .20 small effect• ii) .50 medium effect• iii) > .80 large effect

Page 17: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Effect Size: Example

• In the study evaluating stereotype threat, the null hypothesis was rejected, with M1=6.58, M2=9.64, and sp2 = 9.59.

• Calculate Cohen’s d, and evaluate the magnitude of this measure (small, medium, or large).

• Compare effect size to z table to determine where the mean of one group is relative to the other.

Page 18: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Type 1 Error & Type 2 Error

Type 1 Error Correct Decisionprobability = Probability = 1-

Correct decision Type 2 Errorprobability = 1 - probability =

Scientist’s DecisionReject null hypothesis Fail to reject null hypothesis

Null hypothesisis true

Null hypothesisis false

Type 1 Error Type 2 Error

Cases in which you rejectnull hypothesis when it isreally true

Cases in which you fail toreject null hypothesis when it is false

= =

Page 19: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Power and sample size estimation

• Power is the probability of correctly rejecting a null hypothesis. – In social sciences we typically use .80.

• What determines the power of a study– Effect size– Sample size– Variance– α– One vs. two tailed tests

Page 20: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

If you want to know

• Sample Size– Need to know

• α• β• Δ

• Power– Need to know

• α• N per condition• Δ

Page 21: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.
Page 22: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Calculating sample size

• Remember stereotype threat example– Δ = .99

• Say we want to perform a test with – power (1-β) = .80– Two tailed alpha = .05

Page 23: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Solving for n: 1-β = .80

Page 24: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Solving for n: 1-β = .80 one tailed

Page 25: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Solving for n: 1-β = .90

Page 26: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Solving for n: 1-β = .90 one tailed

Page 27: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Calculating power

• Say we did the same study with n of 5 in each condition (N =10)

• We want to know how much power we have to find d or Δ = .99.

• Again we are using a two tailed test with α = .05.

Page 28: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Using Piface

Page 29: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

What if I did a one tailed test?

Page 30: The t Tests Independent Samples. The t Test for Independent Samples Observations in each sample are independent (not from the same population) each other.

Spss: Homework Hint

• For the two sample t tests you will need to create two variables, cond (X) and score (Y)