# exam 2 cheat sheet - Comparison of Two Proportions(p Large...

• Test Prep
• 3
• 100% (2) 2 out of 2 people found this document helpful

This preview shows page 1 - 2 out of 3 pages.

Comparison of Two Proportions (p)Large Sample Confidence Interval for p1– p2Assumptions: Two independent random samplesAt least 10 successes and failures in both samples1 – α Confidence Interval = point estimate ± z*(standard error of point estimate) = ^p1^p2±z(^p1(1^p1)n1+^p2(1^p2n2where z* = qnorm(1 – α/2)Interpretation:If 0 is in the interval, then it is plausible that p1= p2If all values in the CI are > 0, then it is likely that p1> p2If all values in the CI are < 0, then it is likely that p1< p2Hypothesis TestsAssumptions:Two independent random samplesAt least 5 successes and 5 failures in both samplesHypothesesH0is always H0: p1= p2Ha: p1> p2, p1< p2, or p1≠ p2Test Statistic: z = (p1– p2– 0)/ (standard error (pp1- pp2))=^p1^p2^p(1^p)(1n1+1n2)where = (xpp1+ x2) / (n1+ n2), or total successes/total observations.P-Value:For Ha: p1> p2: P(Z < z)For Ha: p1< p2: P( Z > z)For Ha: p1≠ p2: 2P(Z > |z|)Use pnorm commandConclusion:If p-value < α, reject H0If p-value > α, fail to reject H0Comparing Two Means – Matched Pairs (dependent samples)Hypothesis TestNotation:µD= true mean of paired differencessD= sample standard deviation of paired differencesxxD= sample mean of paired differencesnD= number of pairs in the sampleAssumptions:Random sample and distribution of differences is normalHypotheses:H0: µD= 0Ha: µD< 0Test statistic:xxD- µ0sD/ √(nD)P-Value: use pt(test statistic, df = nD– 1)Confidence Interval´XD±tα2,nD1sDnDComparing Two Means (independent samples)Confidence Intervals for µ1- µ2Assumptions:Two independent random samplesApproximately normal distribution for each group (although two-sample t procedure is robust to non-normality for larger sample sizes)1 – α CI for µ1- µ2:´X1´X2±ts12n1+s22n2where t* marks the middle 1 – α proportion of the t distributionuse qt command with df = smaller of n11 and n2– 1Interpretation:If 0 is in the interval, then it is plausible that µ1= µ2If all values in the CI are > 0, then it is likely that µ1> µ2If all values in the CI are < 0, then it is likely that µ1< µ2Two-Sample t-test for comparing µ1and µ2Assumptions:Two independent random samplesBoth populations are approximately normalHypotheses:H0is always µ1= µ2Ha: µ1< µ2, µ1> µ2, or µ1≠ µ2Test Statistic´X1´X2s12n1s22n2tdfuse df = smaller of n1– 1and n2– 1P-ValueFor Ha: µ1< µ2, p-val = P(tdf< t)For Ha: µ1> µ2, p-val = P(tdf> t)For Ha: µ1≠ µ2
• • • 