1
$\begingroup$

My goal is to have a function that given an input value will output a random value that follow a truncated normal distribution, could you please suggest a function that can do that ? Or guide me a good reference

$\endgroup$
  • $\begingroup$ What inputs are you referring to? Location, scale and the truncation interval? $\endgroup$ – knrumsey May 20 '19 at 2:33
  • $\begingroup$ @knrumsey the input is a value say 0.5, I want to generate a random number but with a truncated normal distribution $\endgroup$ – Mohamed May 20 '19 at 3:05
  • 1
    $\begingroup$ @Mohamed, that is not enough information to specify the distribution. I don't even know what $0.5$ means. To generate from a truncated normal, you need to specify the location $\mu$, scale $\sigma$ and truncation interval $[a,b]$. $\endgroup$ – knrumsey May 20 '19 at 4:05
  • $\begingroup$ Besides those listed above, also see stats.stackexchange.com/questions/179618/… $\endgroup$ – Glen_b -Reinstate Monica May 20 '19 at 9:25