# Class 29: Topic 21: Comparing Two Proportions

Back to Exam 2. On to Topic 24: Goodness-of-Fit Tests.

This outline is also available in PDF.

Held: Friday, 11 April 2008

Summary: We begin to consider what samples from two populations tell us about the relationships between those populations.

Notes:

• There is a typo on p. 420 in the definition of a confidence interval for π12. See if you can find it.
• My initial glance at the exams suggests we'll have a seriously bi-modal distribution. Since my main concern is that you learn the material, I am working on plans for a makeup exam.
• Are there questions on the mini-project?
• Homework for Monday: &due30;

Overview:

• Sampling from multiple populations.
• New formulate for confidence and intervals and test statistics.

## Comparing Two Proportions

• Recent topic: What does one sample tell us about the population?
• This topic: What do two samples, taken under different conditions, tell us about differences between the underlying populations?
• We'll use similar approaches:
• Confidence intervals
• Tests of significance

## Some Important Formulae

• We typically start with four values: A sample proportion and sample size for condition 1, and a sample proportion and sample size for condition 2.
• In R, I'll call these `p1`, `n1`, `p2`, and `n2`
• The `p`'s have implicit hats.
• It will be helpful to have the overall proportion, treating the two samples as a single sample from a combined population.
• `pc = (p1*n1+p2*n2)/(n1+n2)`
• The confidence interval and test statistic are somewhat more complicated in these cases.
• Test statistic:
`z = (p1-p2)/sqrt(pc*(1-pc)*(1/n1+1/n2))`
• Confidence interval:
• `lb = (p1-p2) - z*sqrt(p1*(1-p1)/n1 + p2*(1-p2)/n2)`
• `ub = (p1-p2) + z*sqrt(p1*(1-p1)/n1 + p2*(1-p2)/n2)`

Back to Exam 2. On to Topic 24: Goodness-of-Fit Tests.

Disclaimer: I usually create these pages on the fly, which means that I rarely proofread them and they may contain bad grammar and incorrect details. It also means that I tend to update them regularly (see the history for more details). Feel free to contact me with any suggestions for changes.

This document was generated by Siteweaver on Fri May 2 13:40:56 2008.
The source to the document was last modified on Mon Apr 7 12:27:06 2008.
This document may be found at `http://www.cs.grinnell.edu/~rebelsky/Courses/MAT115/2008S/Outlines/outline.29.html`.

You may wish to validate this document's HTML ; ;

Samuel A. Rebelsky, rebelsky@grinnell.edu

Copyright © 2008 Samuel A. Rebelsky. This work is licensed under a Creative Commons Attribution-NonCommercial 2.5 License. To view a copy of this license, visit `http://creativecommons.org/licenses/by-nc/2.5/` or send a letter to Creative Commons, 543 Howard Street, 5th Floor, San Francisco, California, 94105, USA.