And maybe there is a missconception. Rand should create random numbers, not following the normal distribution. With big numbers you should get close to a normal distribution, but there will always be deviations from the normal distribution. So for each draw the chance for a certain number to come up is 1/11.
With 27 draws with 11 numbers to draw from you would expect every number 2-3 times in the sample. So this looks pretty good to me, considering that you had only 27 draws. With 1000 draws you should get much closer to the normal distribution.
n=27 is for sure not a big enough number to judge upon. In my opinion this distribution is still within the normal chance.
Help us to help you!
Provide your LS version and where it is installed (own server, uni/employer, SaaS hosting, etc.).
Always provide a LSS file (not LSQ or LSG).
Note: I answer at this forum in my spare time, I'm not a LimeSurvey GmbH employee.
LimeSurvey use php rand function :
php.net/manual/function.rand.php
then if you fnd a bug in this function, please report it to php dev.
In some condition use hacked phpjs function :
phpjs.org/functions/rand/
, if you find a bug in js rand : you can report to us, we look if it's updated in phpjs (but phpjs rand use Math.random() javascript function: if it's broken, you can report to your browser developper(for example microsoft for internet explorer)).
Denis
Assistance on LimeSurvey forum and LimeSurvey core development are on my free time.
I'm not a LimeSurvey GmbH member. -
Professional support
-
Plugins, theme and development
. I don't answer to private message.
May you please help me how I can exchange the rand php function with the phpjs version?
Is this one better?
Thank you very much for your help
Best
Sebastian
P.S.: The randimizing function is very important since it randomizes my 11 treatments and only should show 1. The number of people receiving the survey is 50.000 so I need to have nearly a normal distribution.