1

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

Mohamed
  • 111
  • 1
  • What inputs are you referring to? Location, scale and the truncation interval? – knrumsey May 20 '19 at 02:33
  • @knrumsey the input is a value say 0.5, I want to generate a random number but with a truncated normal distribution – Mohamed May 20 '19 at 03:05
  • 1
    @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]$. – knrumsey May 20 '19 at 04:05
  • Besides those listed above, also see https://stats.stackexchange.com/questions/179618/how-to-sample-from-a-rectified-gaussian-distribution/ – Glen_b May 20 '19 at 09:25

0 Answers0