Apologies ahead of time, this question is more stats related and less SAS.
I have a data set with 700 gpas (and a few other factors but they're not relevant to my question)
I want to produce a 98% confidence interval for the GPA, which I think I did successfully here:
libname soapy '\\Client\D$\SAS\Data';
data FINAL;
infile '\\Client\D$\SAS\Data\finaldata.txt';
input ID GPA HSRANK ACT YEAR;
run;
proc means data= FINAL n mean stderr alpha=0.02 median p50 clm maxdec=2;
var GPA;
run;
Giving the C.I. [2.92 and 3.03].
OK sounds good.
Then I am testing that the average GPA is greater than 3.03, which well, based on my interval from the printout seems unlikely.
proc univariate data=FINAL alpha=0.02 cibasic mu0=3.03;
var GPA;
run;
Since this is a test for Mu>0.03, I should subtract the p-value given in the printout by 1 and use that as the p-value right? p-value= 1-0.0278= 0.9722. which would cause me to reject the null hypothesis and conclude the mean is greater than 3.03, which conflicts with the CI above. Am I misinterpreting this or doing something wrong? Thanks (DATA attached)
This makes perfect sense to me. A 98% confidence interval for the mean goes from 2.92519 to 3.03304, indicating that with alpha=0.02, the evidence is that the observed mean is not different than 3.03.
Then, PROC UNIVARIATE says the p-value is 0.0278, but for a difference to be significant at the alpha=0.02 level, you would need a p-value LESS THAN 0.02, it is not less than 0.02, which agrees with the result I stated in the previous paragraph.
proc univariate data=FINAL alpha=0.02 cibasic mu0=3.03; var GPA; run;
Since this is a test for Mu>0.03, I should subtract the p-value given in the printout by 1 and use that as the p-value right? p-value= 1-0.0278= 0.9722.
I don't think this is correct. I don't think you subtract from 1, none of the SAS hypothesis tests that I know require subtracting from 1. Nevertheless, it would be extremely helpful if you showed us the relevant parts of the PROC UNIVARIATE output.
This makes perfect sense to me. A 98% confidence interval for the mean goes from 2.92519 to 3.03304, indicating that with alpha=0.02, the evidence is that the observed mean is not different than 3.03.
Then, PROC UNIVARIATE says the p-value is 0.0278, but for a difference to be significant at the alpha=0.02 level, you would need a p-value LESS THAN 0.02, it is not less than 0.02, which agrees with the result I stated in the previous paragraph.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.