34
Research Methods for Political Science Dr. Thomas Chadefaux Assistant Professor in Political Science [email protected] 1 Bivariate statistics: t-tests

Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

  • Upload
    others

  • View
    8

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Research Methods for Political Science

Dr. Thomas ChadefauxAssistant Professor in Political Science

[email protected]

Bivariate statistics:t-tests

Page 2: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Comparing means

• One-sample case (week 4)

• Two-sample case– Independent samples– Paired samples

2

Page 3: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Testing hypotheses

• Testing hypotheses– Null hypothesis (H0)– Alternative hypothesis (H1)

3

Page 4: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Null hypothesis

• We ask: if the null hypothesis were true, how likely would we be to collect data that is as extreme or more extreme than we have?

4

Page 5: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Dependent samples t-test

• Comparing two measurements for the same participants

• Example: thermometer score for Ahern (M=65.5, SD = 24.2) and Bruton (M=45.74, SD = 22.85). Is this difference statistically significant?

• N = 2570

5

Page 6: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 1: Assumptions

Random samplingLevel of measurement interval-ratioSampling distribution is normal

6

Page 7: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 2: stating the null hypothesis: mean difference equals 0:

H0: !" = 0(H1:!" ≠ 0)

7

Page 8: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 3: Selecting the Sampling Distribution and Establishing the Critical Region

As we do not know the population standard deviation of the difference between Ahern and Bruton, we use a t-test with df = n – 1 (two-tailed). As, N = 2570, df = 2569.

Therefore, with a = 0.05, t(critical) = 1.96 (check your understanding: why 1.96? How didwe find it?)

8

Page 9: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 4: Computing the test statisticFirst, calculate the difference between Ahern and Bruton. (SPSS: Transform … Compute)

9

Page 10: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

10

Page 11: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

11

For dependent samples (paired samples):

! =#$ − &'('/ *

Remember the null hypothesis: &' = 0

Page 12: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

12

! = 19.77 − 033.12/ 2750 =

19.770.653 = 30.27

Page 13: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 5: Making a decision

t(obtained) = 30.27t(critical) = +/- 1.96

As t(obtained) fell in the critical region, we have to reject the null hypothesis.Conclusion?

13

Page 14: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Paired samples in SPSS

• Analyze ... Compare Means ... Paired-samples t-test

14

Page 15: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

15

Page 16: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

P-value

16

• As usual, notice the p-value. Remember that the p-value is the sum of the tail areas, i.e, p(|t|>t)

• (check your understanding: What is the connection between t-values and z-values?)

Page 17: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Independent samples

• Comparing means between two groups, e.g. political interest for men (M = 5, SD = 3.16, N = 10) and women (M = 5.4, SD = 2.31, N = 10) (fake data)

• Note that these two samples are not paired. I.e., we are asking different people. These samples are independent

• Can we say the difference in political interest is statistically significant?

17

Page 18: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

18

Step 1: Assumptions

Random samplingLevel of measurement interval-ratioSampling distribution is normalIndependent observations

Page 19: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 2: stating the null hypothesis

H0: !" = !$ (&': !"− !$ = 0)(H1: !" ≠ !$)

19

Page 20: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 3: Selecting the Sampling Distribution and Establishing the Critical Region

As we do not know the population standard deviation of the difference between men and women, we use a t-test with df = N1 + N2 – 2 (two-tailed). As, N1= 10, N2 = 10, df = 10 + 10 – 2 = 18

Therefore, t(critical) can be looked up in Fields’ table and is equal to 2.10 (a = 0.05).

20

Page 21: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 4: Computing the test statistic

For an independent-samples t-test:

! = ( $%&− $%() − (*& − *()+&(,& + +(

(

,(

21

Page 22: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 4: Computing the test statistic

Remember, that under the null hypothesis !" −!$ = 0, thus

% ='(" − '($)$ "*" +

)$ $*$

22

Page 23: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 4: Computing the test statistic

Remember, that under the null hypothesis !" −!$ = 0, thus

% = 5 − 5.43.16$10 + 2.31

$10

= −0.41.24 = −0.323

23

Page 24: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Step 5: Making a decision

24

t(critical) = +/- 2.10

t(obtained) = -0.323

Page 25: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Equality of variances

• The independent samples t-test assumes that the variances of the two samples are (roughly) equal. If not, SPSS can make adjustments for us.

• Levene’s Test for Equality of Variances tests the null hypothesis that the variances of two groups are equal.

• Some objections to using it (Field 2013: 194)

25

Page 26: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Interpreting Levene’s testP-value Hypothesis rejected What does this mean?< 0.05 Yes Equal variances cannot be

assumed, adjustments need to be made

> 0.05 No Equal variances can be assumed, adjuments not necessary.

26

Page 27: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Independent samples t-test in SPSS

27

Page 28: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

• Analyze ... Compare Means ... Independent-samples t-test

28

Page 29: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

29

Page 30: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

30

Page 31: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

31

Page 32: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

32

Page 33: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

33

Page 34: Bivariate statistics: t-tests - GitHub Pages · t-tests. Comparing means •One-sample case (week 4) •Two-sample case –Independent samples –Paired samples 2. Testing hypotheses

Two-sided or one-sided?

• Depends on alternative hypothesis:– One-sided: H1: µ > µ0, or µ < µ0

– Two-sided: H1: µ ≠ µ0

34