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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 2501 views
  • 0 likes
  • 3 in conversation