'Life is after all a recursive summation, indeed     Let's do some Statistics!

Department of Civil and Environmental Engineering
Frank Batten College of Engineering and Technology
Old Dominion University
Norfolk, Virginia 23529-0241, USA
Tel) (757) 683-3753
Fax) (757) 683-5354


	
Return to CEE 700/800 Homepage
CEE 700/800 Access Counter
 
Go back to
SAS Source Page
Grouped, Two Sample t-Test
SAS Source: TTEST1.SAS

Description

Performs a two sample t-test for testing a hypothesis that the means of two observations are equal.

Undelying assumption for this TTEST procedure is that the observations are random samples drawn from two independent and normally distributed populations with an equal variance.

If these assumptions could not be satisfied or ascertained, you *should* use Nonparametric statistics techniques instead for testing your hypothesis. (see NPAR1WAY procedure)

SAS Listing


OPTIONS LINESIZE=70;
TITLE1 'A Two Sample t-Test';
DATA T_Scores;
/* @@ means a loop in reading input variable sequence */
  INPUT Gender $ Score @@;
  CARDS;
F 75  F 76  F 80  F 77  F 80  F 77  F 73
M 82  M 80  M 85  M 85  M 78  M 87  M 82
;
RUN;

/* CLASS = name of the grouping variable         */
/* VAR   = name of the variable whose means to   */
/*         be compared                           */
PROC TTEST DATA=T_Scores;
  CLASS Gender;
  VAR Score;
RUN;


SAS Listing

SAS User Guide (SUG) for Procedures (PROC) used in the Source

SUG TTEST procedure
Go back to
SAS Source Page

Return to CEE 700/800 Homepage Return to CEE 700/800 Homepage Move to the Top of this page