- Posts: 20
- Thank you received: 0
Ask the community, share ideas, and connect with other LimeSurvey users!
Please Log in to join the conversation.
Here's the formula in excel for a normal(0, 1) distribution:
Then use this formula to scale your normal distribution to mean 10 and standard deviation of 7:
Norm(µ=b, σ=a) = a*Norm(µ=0, σ2=1) + b
This would make the equation in Excel:
Please Log in to join the conversation.
Please Log in to join the conversation.
<script type="text/javascript" charset="utf-8"> $(document).on('ready pjax:scriptcomplete',function(){ function generateNormalRandom(mean, stdDev) { let randomValue = mean + stdDev * (Math.sqrt(-2 * Math.log(Math.random())) * Math.cos(2 * Math.PI * Math.random())); return Math.max(0.75, Math.min(1.25, randomValue)); } var randomValue = generateNormalRandom(1, 0.1) $('#question{QID} input[type="text"]').val(randomValue); $('#question{QID}').hide(); // or hide it by css class "d-none" }); </script>
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.
Please Log in to join the conversation.