BookmarkSubscribeRSS Feed
Hanwoo
Fluorite | Level 6

SD=0인 데이터를 Proc ttest로도 구해보고, Proc univariate으로도 구해보았는데, 결과가 다르게 나왔습니다.

 

1. Proc univariate 결과 : p-value 계산 안됨

Hanwoo_0-1753943610783.png

 

2. Proc t-test 결과: p-value <.0001로 계산이 됨.

Hanwoo_1-1753943655035.png

 

SD=0이면 수학적으로 one-sample t-test의 결과는 계산이 안 되는게 맞다고 생각되는데, 왜 Proc t-test를 했을 땐 <.0001로 결과가 나오는 건가요? 

 

어떤 Procedure를 쓰나에 따라 결과가 다르게 나오다니..  Proc t-test 문헌을 나름 꼼꼼히 살펴봤는데도, sd=0일 때 p-value가 계산이 된 이유가 이해가 안 가 질문 남겼습니다.

 

1 REPLY 1
PaigeMiller
Diamond | Level 26

Most likely this is an example of computers having limited numeric precision. See Machine Precision. Or perhaps two different programmers chose to handle the extreme case of SD=0 slightly differently.

 

It's nothing to worry about. I'm sure that in other cases, PROC UNIVARIATE and PROC TTEST will give matching results.

--
Paige Miller
How to Concatenate Values

Learn how use the CAT functions in SAS to join values from multiple variables into a single value.

Find more tutorials on the SAS Users YouTube channel.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 1 reply
  • 442 views
  • 2 likes
  • 2 in conversation