我有三个变量ran1 - ran3。它们需要接收 [ran1, ran2] 1-999(整数)和 [ran3] 0-1(浮点数)之间的值
我一直很高兴这样做:
* COMPUTE ran1 = TRUNC(UNIFORM(999)) + 1 . * produces values between 1 and 999
* COMPUTE ran2 = TRUNC(UNIFORM(999)) + 1 . * produces values between 1 and 999
* COMPUTE ran3 = UNIFORM(1) . * produces values between 0.01 and 0.99
但已被告知,正态分布对以下内容更有用。
所以,我这样做了:
COMPUTE ran1 = TRUNC(NORMAL(999)) + 1 . * produces values between -4900 and +4744
COMPUTE ran2 = TRUNC(NORMAL(999)) + 1 . * produces values between -4748 and +4902
COMPUTE ran3 = NORMAL(2) . * produces values between -11.10 and +10.72
为什么现在的值聚集在零附近?我该怎么做才能使它们在要求的范围内?
谢谢。