BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
valarievil
Obsidian | Level 7

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)

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

View solution in original post

3 REPLIES 3
PaigeMiller
Diamond | Level 26

 

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.

--
Paige Miller
PaigeMiller
Diamond | Level 26

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.

--
Paige Miller

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
What is Bayesian Analysis?

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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