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

Hi Everyone,

 

I am learning SAS so I can not solve this example. I want to test it on SAS to help my students understand. Can you help me solve by using SAS the example below?


 

Thanks,

Jae

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You can use PROC TTEST to perform a one-sample test for the mean. You can use the SIDES=U option to perform a one-sided test and the H0= option to specify the value of the null hypothesis.  There is a Getting Started example in the PROC TTEST documentation that shows how to perform the test and analyze the results.

 

data Movie;
input rating @@;
datalines;
3 5 4 3 4 5 5 4 3 2 5 4 3 2 3 5
;
proc ttest data=Movie H0=4 sides=u alpha=0.05;
var rating;
run;

 

View solution in original post

21 REPLIES 21
Ksharp
Super User

You can use nonparameter statistical method like resampling .

Check @Rick_SAS blog .

https://blogs.sas.com/content/iml/2014/11/21/resampling-in-sas.html

JaeGonKim
Calcite | Level 5

Hi Ksharp,

It is very difficult for me, please try to help me. If you can make SAS file and post it on here, I am really grateful to you.

 

Joe

Rick_SAS
SAS Super FREQ

You can use PROC TTEST to perform a one-sample test for the mean. You can use the SIDES=U option to perform a one-sided test and the H0= option to specify the value of the null hypothesis.  There is a Getting Started example in the PROC TTEST documentation that shows how to perform the test and analyze the results.

 

data Movie;
input rating @@;
datalines;
3 5 4 3 4 5 5 4 3 2 5 4 3 2 3 5
;
proc ttest data=Movie H0=4 sides=u alpha=0.05;
var rating;
run;

 

Ksharp
Super User

@Rick_SAS,

and I quoted "without using statistical software." .

Rick_SAS
SAS Super FREQ

The problem says "(a) through (c) without using software," which I assume the OP can do. The OP was asking about part (d), "Verify your answers by using SAS output."

JaeGonKim
Calcite | Level 5

Hi Rich_SAS,

 

Thank you for your help.

 

Because SAS is quite new to me, could you send me a SAS file for this example and this results to email? My email is: jaegonkim.edu@gmail.com

 

Joe

 

Rick_SAS
SAS Super FREQ

The SAS code is posted in my response. You can copy and paste from this discussion thread.

JaeGonKim
Calcite | Level 5

Hi Rick_SAS,

 

Yes, thank you. Could you solve (a) to (c) without using software? I want to know the results are to make a comparison of them.

Rick_SAS
SAS Super FREQ

?? When you asked this question, you said you wanted to use SAS "to help my students understand," so I assumed you are a statistics teacher. This problem is solved in every elementary statistics textbook. I suggest you refer to the one that you are using for your class.Look in the chapter that discusses "tests of hypotheses" and the section that discusses "tests for the mean."

JaeGonKim
Calcite | Level 5

Hi Rick_SAS,

 

Sorry, I will review it. I would like to ask only another example about SAS. Are you ready to help me?

 

Thank you.

Joe

 

 

JaeGonKim
Calcite | Level 5

Hi Rick_SAS,

 

Sorry, I will review it. I would like to ask only another example about SAS. Are you ready to help me?

 

Thank you.

Joe

 

 

Rick_SAS
SAS Super FREQ

If it is a different question, please start a new thread.

 

There are many people on the forum who can help answer your questions about how to use SAS to analyze data and how to interpret SAS output. I am just one of hundreds of people who answer questions on this community.

Ksharp
Super User

I would like to give it a try.

a) H0 : mean=4  H1: mean>4

b) the statistic is the number of obs>4 , which is 5

c) due to 5/nobs = 0.312 , i.e.  0.3 > 0.05 which means can't refuse H0 .

 

d) from the output of proc ttest, can verify the above. You can't say mean at least 4.

SAS Output

均值 95% 置信限均值 标准差 95% 置信限标准差
3.7500 3.2834 正无穷 1.0646 0.7864 1.6476

自由度 t 值 Pr > t
15 -0.94 0.8188

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 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
  • 21 replies
  • 2263 views
  • 4 likes
  • 5 in conversation