I am using SAS OnDemand for Academics w/ SAS Studio to perform a sample size calculation. There is a "Task" for "Power and Sample Size" with a "t-test" option.
For the mean (see image 1 below), there are 4 options to chose from:
If my hypothesis is that there is no difference between the means of 2 groups, should I select one of the "null difference" options?
If so, then why does it ask me for a "Mean difference value" (see image 2 below)? Wouldn't the "mean difference value" be 0? What value is this field asking for?
Thanks for the help.
This goes back to hypothesis testing in statistical analysis.
You want to test if in the population, group1 mean is the same as the group2 mean. When you collect your data, you might have a sample mean of 15 for group1, and a sample mean of 17 for group 2. The question is, is this observed difference enough evidence to say the two groups have different means in the population? Or is the observed difference due to randomness and it does not show enough evidence to say the population means are different?
You need to enter the sample means (15 and 17) and also a measure of variation in the data (stddev) so the software can test this hypothesis for you.
For more information about the computational details please refer to the documentation below --
https://go.documentation.sas.com/doc/en/pgmsascdc/v_017/statug/statug_power_details81.htm
Jill
You would need to set the null difference to be 0.
The mean difference refers to the two conjectured / sample group means.
@_maldini_ wrote:
<The mean difference refers to the two conjectured / sample group means. >
But why would I input a mean difference when I am testing for no difference? In other words, if the null difference is zero, why is it asking for a difference other than zero?
What happens if you don't put anything in the mean difference box and run it?
I don't use the Task but have used Proc Power, the underlying procedure for this, and suspect that the entered mean differences only matter if you are actually testing for a difference such as with the "Difference between means" option.
Thanks for your response.
It won't run without a value in that field...And, the sample size changes when you input different mean difference values.
You do not have to provide difference in the means. You can provide the mean values themselves for the two groups instead. You will need to have some sort of observed / conjectured values for the group means in order to compute the power / sample size for testing whether in the population, the two group means are significantly different or not.
@jiltao What I don't understand is why you would need to input a difference in the means or input the mean values themselves (w/ no difference between them?) if you are testing for no difference?
The difference in the means is 0 when testing for null difference, correct?
The group means could be any value, as long as they were the same value, correct?
Examples:
group 1: 10, group 2: 10
group 1: 100, group 2: 100
proc power uses the mean difference in the calculation, either as a result of the user inputting a mean difference or by subtracting one inputted mean from the other. It makes sense to me that these values would be required if I was testing for a mean difference other than zero (i.e., null difference), but not if I was testing for no difference.
What am I missing here?
Should I input the same values I would input if I was selecting "Difference between means" or "Group means", instead of selecting "Difference between means, null difference" or "Group means, null difference"
Thanks for your help here!
This goes back to hypothesis testing in statistical analysis.
You want to test if in the population, group1 mean is the same as the group2 mean. When you collect your data, you might have a sample mean of 15 for group1, and a sample mean of 17 for group 2. The question is, is this observed difference enough evidence to say the two groups have different means in the population? Or is the observed difference due to randomness and it does not show enough evidence to say the population means are different?
You need to enter the sample means (15 and 17) and also a measure of variation in the data (stddev) so the software can test this hypothesis for you.
For more information about the computational details please refer to the documentation below --
https://go.documentation.sas.com/doc/en/pgmsascdc/v_017/statug/statug_power_details81.htm
Jill
Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!
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.