What is sampling. It is to project the random variable W to random variate w.

To relax the restriction of theta variable/probability between 0 and 1 only, use the small math trick below to make it extends to negative and positive infinity:



It’s also called sigmoid function, widely used in machine learning.