N/A
Posts: 0

# Two sample t-test and z-test.

Hi,

I have two samples and I want to test the null hypothesis (mean sample1=mean sample2) using once t-test and then z-test.

For t-test, I use:

proc ttest data=mydata;
var my_variable;
class grouping_variable;
run;

Is it right? the out put is a bit confusing to me. Should I use Pr > |t| or Pr > F to determine the significance of the difference?

Could you please let me know how to run the z-test as well.
Thanks
Malek
Super Contributor
Posts: 281

## Re: Two sample t-test and z-test.

Pr>|F| is the comparison of the variances of the two groups.

It isn't strictly proper to do a z-test on data where the std dev is estimated from the sample.