truncnorm icon indicating copy to clipboard operation
truncnorm copied to clipboard

Mid truncated distribution

Open k-segiet opened this issue 3 years ago • 1 comments

Hi,

Do you have any suggestions on how to extend this package to incorporate a normal distribution which is truncated in the middle? That is, the support is (-inf,a] and [b,+inf) and points between a and b are excluded. Points a and b are known.

Thank you for your help. Best, Katarzyna Segiet

k-segiet avatar Mar 26 '22 23:03 k-segiet

Off the top of my head: Flip a biased coin to figure out if you're in the (-inf, a] or [b, inf) half and then use truncnorm to sample from the one sided truncated distribution.

olafmersmann avatar Feb 21 '23 00:02 olafmersmann