Stat 217 – Day 20 Comparing Two Proportions The judge asked the statistician if she promised to tell the truth, the whole truth, and nothing but the truth? The statistician replied, “Yes, 95% of the time.”
Last Time – Two-sample t procedures Observed about 7 letters Parameter: JFK – JFKC = difference in “population” means Populations = all potential JFK memorizers, all potential JFKC memorizes Activity 22-1 (p. 439) men – women = difference in population mean number of close friends
Last Time – Two-sample t procedures If the goal is to compare two population means Random samples: Does the average number of close friends differ between men and women? Random assignment: Does the average melting time differ between chocolate chip and butterscotch (first chip)? Ho: 1 1 – 2 2 = 0 (1 (1 = 2 2 ) Ha: 1 1 – 2 2, ≠ 0 (1 (1 ≠ 2 2 )
Last Time – Two-sample t procedures Technical conditions Both sample sizes are large or both populations are normally distributed Random assignment to two groups or independent random samples from two populations Classic counter example: paired data Everyone times both chips Appropriate analysis: one sample t test on differences = mean difference between times in Cal Poly population
Last Time – Two-sample t procedures Test of Significance Calculator: Two means Test statistic p-value = 0019 About.19% of random assignments have a difference in sample means of 7.29 or larger if population means equal Confidence interval for 1 – 2 Example: (2.706, ) I’m 95% confident that the JFK population will remember 2.71 to more words, on average, than JFKC population
Example: Lab 2 Is yawning contagious? Is this difference in the conditional (sample) proportions larger than we would expect from the random assignment process alone? Yawn seed No seedTotal Yawned10414 No Yawn Total341650
Example: Lab 2 Parameter: seed – no seed = the difference in the probability of yawning between the two treatments (or difference in proportion of all potential yawn seed people vs. all potential no seed population) Null Ho: seed – no seed = 0 ( seed = no seed ) Alt Ha: seed – no seed > 0 ( seed > no seed )
Example: Lab 2 If the yawn seed has no effect, about 52% of random assignments would have a difference in sample proportions of at least.044 by chance alone No evidence against null hypothesis
Can we use the normal distribution? Yes if Random assignment or random samples Large sample sizes (at least 5 successes and 5 failures in each group – four numbers to check) Test statistic p-value
Informal Confidence Interval Estimate + margin of error (.136) = (-.228,.316) We would be 95% confident that the difference in population proportions is between and.316 (zero is a plausible value!) If had been (.228,.316): 95% confident that the probability of yawning with the yawn seed is.228 to.316 higher than the probability without a yawn seed
To turn in with partner: Activity 21-2 (p. 419) (a) random sampling or random assignment? (b) Null and alternative hypotheses (c) Conclusions? For Tuesday Review p. 418, 420 Activity 21-6 (self-check) HW 6
Rest of Topic 21 Activity 21-3: Same procedure with randomized experiments but can draw cause- and-effect conclusions (but may not be generalizing) Activity 21-4: Larger samples lead to smaller p-values (all else the same) 71% vs. 81% Activity 21-5: Don’t jump to cause and effect conclusions!