ABSTRACT

This chapter extends the discussion from the previous chapter to two-sample hypothesis testing. The text includes paired and independent two-sample hypothesis testing using both hand calculations with statistical tables and statistical software (SAS and Stata). Definitions of longitudinal and cross-sectional study designs are provided to frame the discussion about the difference in the types of data obtained based on the study design. For two-sample hypothesis testing with independent data, we cover situations with equal variances and unequal variances. A hypothesis test for the equality of variances is discussed, and the F distribution is introduced. The F distribution is a family of distributions indexed by the numerator and denominator degrees of freedom. The chapter includes how cutoffs and p-values can be identified using the F distribution statistical tables (Table A.6). In addition, statistical software (SAS and Stata) code is provided to determine cutoff and p-values based on the F distribution. Equations for the test statistics and confidence intervals are provided for each type of test and are presented in a format that is conducive to the reader’s future reference. The chapter concludes with a brief discussion on the calculation of power and sample size for testing the difference between two means.