Chapter 9. We want to test whether the means of two samples are statistically significantly...

21
Two Sample t test Chapter 9

Transcript of Chapter 9. We want to test whether the means of two samples are statistically significantly...

Page 1: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Two Sample t testChapter 9

Page 2: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

We want to test whether the means of two samples are statistically significantly different from each other

Example: Student-motivation data

Test whether the ‘males and females in the study have similar mean academic ability score?’

t test

Two sample t test

Page 3: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Two independent samples◦ Samples drawn randomly from different

populations Hypothesis : Population means are same

Where S is the standard deviation

Student t test for 2 samples

211

210

:

:

H

H

)(

2121

21

)()(

XXS

XXt

Page 4: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

If both population are found to have equal variance◦ Pooled variance estimate is computed

If both population are found to have unequal variance◦ An exact t cannot be estimated◦ Only an approximation can be computed

First test if population variance are equal

Two independent Sample t test

Page 5: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Testing for equality of population variance

F statistics is computed from sample variance

Known as Levene’s test for equality of variance

F test for population variance

22

211

22

210

:

:

H

H

22

21

)1(),1( 21 S

SF nn

Page 6: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Test whether the ‘males and females have similar mean academic ability score?’

Academic ability score = OLTS

Testing the mean value of OLTS grouped by gender variable

Testing mean for our example

Page 7: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Analyze > Compare means > Independent sample t test

Test variable : OLTS Grouping variable : Gender

◦ Click on Define groups

Two independent sample t test: SPSS

Page 8: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Two independent sample t test: SPSS

Page 9: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

First part of the table gives the Levene’s test

Decision Rule: P value < 0.05◦ Reject the H0

Two independent sample test: SPSS Output

Page 10: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

H0: Samples are from population with equal variance

In our example P value = 0.56 > 0.05 Hence we cannot reject the H0

The samples are drawn from populations with equal variances

P value: level of significance

Page 11: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Independent Samples TestLevene's Test for

Equality of Variances

t-test for Equality of Means

F Sig. t df Sig. (2-tailed)

Online Test Score

Equal variances assumed .345 .560 -.286 48 .776

Equal variances not assumed -.286 45.174 .776

SPSS output

The Significance level (P value) > 0.05We cannot reject the H0 that the mean OLTS for Male and Females are same

Page 12: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Exercise 2, 3 and 5

Exercise on Pg 73

Page 13: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Paired t test

Page 14: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

The sample relate to same set of respondents

Before After test

Test whether mean performance of a set of respondents before and after a treatment is same◦ Set of employees undergoing training◦ Students undergoing MBA course work

Paired t test

Page 15: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Test performance over time

Test the performance of an organization from the response of same set respondents over time

Feedback about the institute from same set of students in their 1st year and 2nd year of MBA

Paired t test

Page 16: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Example on pg69 Scores of 20 individuals before and after the

training programme

H0: There is no difference in the mean performance of individuals before and after the training programme

H1: There is difference in the mean performance of individual before and after the training programme

Paired t test

Page 17: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Hypothesis

Analyze > Compare means > Paired t test Select both the variables

Paired t test: SPSS

211

210

:

:

H

H

Page 18: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

SPSS output

Page 19: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Results for the t test

Significance level (P value) = 0.000 < 0.05 (α)

Hence we reject the null hypothesis at 5% level of significance

There is a significant difference in the mean performance of individuals before and after the training.

Paired t test: SPSS

Page 20: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Independent Samples

Paired Samples Independent

SamplesPaired

Samples* Two-Group t

test* Z test

* Paired t test * Chi-Square

* Mann-Whitney* Median* K-S

* Sign* Wilcoxon* McNemar* Chi-Square

A Classification of Hypothesis Testing Procedures for Examining Differences

Hypothesis Tests

One Sample Two or More Samples

One Sample Two or More Samples

* t test* Z test

Chi-Square * K-S * Runs* Binomial

Parametric Tests (Metric Tests)

Non-parametric Tests (Nonmetric Tests)

Page 21: Chapter 9.  We want to test whether the means of two samples are statistically significantly different from each other  Example: Student-motivation.

Exercise 1 on pg 72 Exercise 4 on Pg 73

Exercise