Our goal is to draw samples from the left truncated normal random variable
\(Y_{i}^{*}\). We define this distribution as
$$Y_{i}^{*}\sim TN(\mu, \sigma^{2}, a)$$
Sampling is performed by first drawing from a random variable \(Z\) with a
uniform distribution on the interval \([0, 1]\) to
generate cumulative density probabilities, \(p\). Then the inverse density function
of the truncated normal random variable is applied to generate our desired
truncated normal observations.
This inverse truncated normal function is shown below:
$$Y_{i}^{*}=\Phi^{-1}\Bigg\{p\times\bigg[1-\Phi\big(\frac{a-\mu}{\sigma}\big)\bigg]
+ \Phi\big(\frac{a-\mu}{\sigma}\big)\Bigg\}\times\sigma+\mu,$$
where \(p\) represents the probabilities sampled from the uniform
distribution.
Notes
If the mean, mu
, is specified as a vector then the standard
deviation, sigma
, must have either:
same length as mu
be a scalar, indicating that all samples have constant standard deviation