Presentation is loading. Please wait.

Presentation is loading. Please wait.

T-tests Chi-square Seminar 7. The previous week… We examined the z-test and one-sample t-test. Psychologists seldom use them, but they are useful to understand.

Similar presentations


Presentation on theme: "T-tests Chi-square Seminar 7. The previous week… We examined the z-test and one-sample t-test. Psychologists seldom use them, but they are useful to understand."— Presentation transcript:

1 T-tests Chi-square Seminar 7

2 The previous week… We examined the z-test and one-sample t-test. Psychologists seldom use them, but they are useful to understand NHST. Many advanced tests are variants of z-test.

3 Today’s questions Do men talk more than women? Suppose you collect data and found that women on average say 30,000 words a day, compared to 25,000 words for men. Is this 5000 words difference between groups due to chance?

4 Today’s questions Do vitamins improve IQ scores over time? Suppose you give vitamins and measure IQ scores in Jan and Jun and found that IQ scores improved by 10 points from Jan to Jun. Is this due to chance?

5 Two broad types of t-tests Independent samples t-test (between- subjects t-test) Dependent samples t-test (repeated measures t-test; within-subjects t-test)

6 Independent samples t-test Part 1

7 Independent-samples t-test For comparing two independent sample means Underlying grouping variable is usually nominal Example of grouping variable: Gender (M vs. F) Major (psychology vs. sociology) Self-esteem (high vs. low)

8 Underlying mathematical principle Using gender as an example: Females: M = 30000; SD = 5000 Males: M = 25000; SD = 5000 They don’t overlap much. Thus, males and females really do differ in # words spoken

9 However… Distributions are rarely that far apart. You can’t always “eyeball” statistical significance. We need an objective test statistic.

10 Introducing the independent samples t-test pooled variance

11 Introducing the independent samples t-test Degrees of freedom df = (n 1 – 1) + (n 2 – 1) = n 1 + n 2 - 2 Each sample had one less degrees of freedom. You have two samples. Hence in total, you have two less degrees of freedom.

12 Recap from Week 6 Degrees of freedom: the extent to which scores are free to vary You have five scores {10, 8, 3, 5, 9}. The mean is 7. Given that mean = 7, and you know 4 of the 5 scores, what is the 5 th score? (Simple to calculate) Given that mean = 7, and you know 3 of the 5 scores, what are the 4 th and 5 th score? (Impossible to calculate)

13 Relating back to NHST

14 Assumptions of independent-samples t-test 1.Population distribution (  1 -  2 ) is normal 2.Randomly and independently sampled 3.Groups are independent 4.Homogeneity of variance

15 Homogeneity of variance This is the ideal distribution: But it could also have been: OR

16 Homogeneity of variance We typically assume that the variance within each of the populations is equal (whether the means are equal or not). Statistical software display “Levene’s test of equality of variances”. If Levene’s test is significant (p <.05), then this assumption is not viable. Often, even when violated, the conclusion of the t-test remains the same.

17 Dependent samples t-test Part 2

18 Dependent-samples t-test For comparing two dependent sample means. Two cases Each person gives a pair of scores –Time 1, Time 2 –DV1, DV2 Each case gives a pair of matched scores –Wife, Husband

19 Structuring the datafile Subject numberIQ in JanIQ in Sep 190112 2 100123 3 88109 Subject numberSweetness ratingSaltiness rating 177 265 336 CaseHusband’s incomeWife’s income 1140000120000 23000050000 370000

20 Let’s expand on the first example: IQ Subject IQ in Jan (T1) IQ in Sep (T2) Difference (D) 190112 22 2100123 23 388109 21 480103 23 5105125 20 684127 43 793108 15 8115101 -14 995105 10 91107 16 M94.1112.017.9 SD (s)10.39.514.2

21 Introducing dependent sample t-test

22 Relationship to NHST

23 Assumptions of dependent-samples t-test 1.Scores are correlated 2.Distribution of D is normal 3.Randomly and independently sampled

24 t-test in general form

25 Chi-square test Part 3

26 Chi-square (  2 ) Sometimes, a researcher is interested in the relationship between two nominal or categorical variables. The significance test used is called a chi-square (  2 ).

27 Today’s question Are single men vs. women are more likely to own cats vs. dogs? Notice that both variables are categorical. –Kind of pet –Gender

28 Contingency table Males are more likely to have dogs as opposed to cats Females are more likely to have cats than dogs CatDogTotal Male203050 Female302050 Total50 100 NHST Question: Are these differences best accounted for by the null hypothesis or by the hypothesis that there is a real relationship between gender and pet ownership?

29 To answer our question… We need to know what we would expect to observe if the null hypothesis were true (i.e., that there is no relationship between these two variables, and any observed relationship is due to sampling error).

30 If the null were true… CatDogTotal Male25 50 Female25 50 Total50 100 You would expect this:

31 Example Data The differences between these expected values and the observed values are aggregated according to the chi-square formula: CatDogTotal Male50 Female50 Total50 100

32 NHST and chi-square df = (r -1)(c-1) where r = number of rows, c = number of columns Is  2 = 4.0 statistically significant, with df = 1? (yes, the critical value at α =.05 is 3.8; see page 545)

33 More complex situations There may be more than two levels for any one variable. Also, the base rates (i.e., the relative frequencies of the various subcategories) may be quite variable. The logic and mechanics of the chi-square work the same way under these situations.

34 Another set of data: Changing base rates Here base rate of dog lovers is much higher (e.g., the column totals indicate that, regardless of sex, 80 of 100 people own dogs) CatDogTotal Male050 Female203050 Total2080100

35 CatDogTotal Male 104050 Female 104050 Total2080100 CatDogTotal Male 050 Female 203050 Total2080100 Observed FrequenciesExpected Frequencies 25 is larger than 3.8, so p <.05

36 Another set of data Now one of our variables has 3 subcategories or levels instead of two. df = (r-1)(c-1) = (2-1)(3-1) = 2 CatDogNeitherTotal Male048250 Female2028250 Total20764100

37 CatDogNeither Total Male 048250 Female 2028250 Total20764100 CatDogNeither Total Male 1038250 Female 1038250 Total20764100 Observed Frequencies Expected Frequencies Chi-square would need to be greater than 5.9 for p <.05.

38 Assumptions of chi-square Data must be independent Categories must be mutually exclusive Cell counts must be ≥ 5 (a warning will be given in SPSS if n < 5) –Why? (Chi-square is an omnibus test)

39 Take home messages T-tests are the most basic statistical tests used in psychology Chi-square is seldom used in psychology because we rarely deal with frequency counts Be aware of the assumptions

40 Back to the question Do women really talk more than men?

41 And here’s the real data. Mehl et al. (2007). Are women really more talkative than men? Science.


Download ppt "T-tests Chi-square Seminar 7. The previous week… We examined the z-test and one-sample t-test. Psychologists seldom use them, but they are useful to understand."

Similar presentations


Ads by Google