﻿The last application we will cover is when you have a dichotomous outcome (yes/no) and two independent samples. This situation could arise in a clinical trial with a dichotomous outcome or in a cohort study with a dichotomous outcome. There is one test statistic, a Z-statistic, and it is used to test the null hypothesis that the proportions are equal. The alternative hypothesis can be that the proportion in group 1 is greater than in group 2, or that group 1 is less than group 2, or that it is just different. We can use this test if we have at least 5 successes and 5 failures in each of the two groups. The numerator of the test statistic is the difference in sample proportions. The denominator uses "p-hat", which is the proportion of successes overall when the two groups are combined. Here are data from the Framingham Offspring Study. We are asking whether the prevalence of cardiovascular disease differs in smokers and non-smokers in the Framingham Offspring Study. The exposure groups are non-smokers and current smokers, and the outcome of interest is having cardiovascular disease (CVD). The null hypothesis is that there is no difference in prevalence of CVD. The alternative hypothesis is that the prevalence differs, so it is two-sided. Alpha is 0.05. We will use the Z-statistic. There is no problem with sample size. There are many with and without CVD in both groups. The decision rule is two-sided, using alpha of 0.05. So the critical value is less than minus 1.96 or greater than 1.96. Next we compute the test statistic, so we need the proportion of participants with CVD in the non-smokers (group 1) and in the smokers (group 2), and in the denominator we need the prevalence of CVD in the combined groups. The Z statistic uses the difference in prevalence between the groups in the numerator and then uses the overall prevalence, "p-hat" in the denominator. And the denominator also has terms for 1 over the number of non-smokers plus 1 over the number of current smokers. We get a Z-statistic of 0.927, and, since that falls between our critical values, we do not reject the null hypothesis. We do not have strong evidence of a difference in prevalence of CVD between non-smokers and current smokers.