BookmarkSubscribeRSS Feed
deleted_user
Not applicable
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
2 REPLIES 2
Paige
Quartz | Level 8
Pr>|t| is the t-test you are asking about.

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.
Doc_Duke
Rhodochrosite | Level 12
To follow-up on Paige's comment, though not strictly proper, the t-distribution converges to the Z-distribution as the sample size goes to infinity so you should reach the same conclusion if the sample size is large.

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 2784 views
  • 0 likes
  • 3 in conversation