Download Contignecy Table - Introduction to Statistics in Psychology - Lecture Slides and more Slides Statistics for Psychologists in PDF only on Docsity! Introduction to Statistics in Psychology PSY 201 Lecture 29 Hypothesis testing for two sample case other statistics What do people think about death? DEPENDENT SAMPLES when the samples are not independent, hypothesis testing of proportions becomes a bit more complicated samples are dependent when each score in one sample is paired with a score in the other sample just like dependent samples for the mean, the problem is that the samples are not independent (not truly random) and we need to take that into account 2 EXAMPLE • Testing the di!erence of propor- tions of individuals who pass each of two similar items on a test. (e.g. comparing pass/fail for two sets of students who get better than 600 SAT) • Test the di!erence in proportions of individuals who support some- thing before and after discussion. • Comparing proportions of hus- bands and wives on an issue. 3 HYPOTHESES for dependent samples we let !p = P1 ! P2 so our hypotheses become H0 : !p = P1 ! P2 = 0 Ha : !p = P1 ! P2 "= 0 4 SAMPLING DISTRIBUTION we need to know the sampling distribution and the standard error but first we need to design a contingency table which shows disagreement or dissimilarity in responses Group 1 NO YES Group YES A B A + B 2 NO C D C + D A + C B + D A + B + C + D = n • A is the number of scores that are “no” in group 1 and “yes” in group 2 • B is the number of scores that are “yes” in group 1 and “yes” in group 2 • C is the number of scores that are “‘no” in group 1 and “no” in group 2 • D is the number of scores that are “yes” in group 1 and “no” in group 2 5 CONTINGENCY TABLE we then convert these to proportions Group 1 NO YES Group YES a b a + b 2 NO c d c + d a + c b + d a + b + c + d = 1.0 • a = A/n is the proportion of scores that are “no” in group 1 and “yes” in group 2 • b = B/n is the proportion of scores that are “yes” in group 1 and “yes” in group 2 • c = C/n is the proportion of scores that are “‘no” in group 1 and “no” in group 2 • d = D/n is the proportion of scores that are “yes” in group 1 and “no” in group 2 6 docsity.com PROPORTIONS from the contingency table we can get the proportions of scores with the trait we are interested in this is what we need for our statistic p1 = b + d = B + D n p2 = a + b = A + B n but we also need the contingency table for other reasons 7 CONTINGENCY TABLES the sampling distribution is approximately normal with a mean of P1 ! P2 if A + D > 10 or B + C > 10 if not, do not use this test moreover, our estimate of standard error of the di!erence between dependent proportions is sp1!p2 = !""""""# a + d n which we get from the contingency table 8 HYPOTHESIS TESTING so to actually carry out the test, we get the critical value zcv for the corresponding " (bottom row of t distribution table) and compare it to the test statistic z = (p1 ! p2)! !p sp1!p2 or, since our null hypothesis is that !p = 0 z = (p1 ! p2) sp1!p2 9 SHORT-CUT with some algebra you can show that the formula for the test statistic is also z = A!D# A + D where A and D are the frequencies from the contingency table this saves the trouble of calculating sp1!p2 (but if you want to calculate confidence intervals you will need the standard error) 10 EXAMPLE I want to know if there is a di!erence in the proportion of students that support support gun control (Group 1) and and the proportion of students that support the death penalty (Group 2). One a sheet of paper answer these questions (you do not have to be honest if you do not want other people to know your views): •Do you support legislation to re- strict the ownership of guns? •Do you support legislation to pro- hibit the death penalty for con- victed felons? 11 EXAMPLE Raise your hand if • A: You do not support gun control, but support prohibiting the death penalty. (no, yes) • B: You support gun control and pro- hibiting the death penalty. (yes, yes) • C: You do not support gun control and do not support prohibiting the death penalty. (no, no) •D: You support gun control but do not support prohibiting the death penalty. (yes, no) 12 docsity.com