MATLAB: How to create a skewed distribution that is truncated

distributionskewskewedtruncate

Hello,
I am trying to make a right skewed truncated distribution with a mean of 75 and SD of 15 that does not produce values outside of 0 and 100.
I understand that you can truncate a normale distribution probability object with… t = truncate(pd,lower,upper)
Meanwhile, I know that you can also create a skewed distribution with: pearsrnd(mean,sd,skew,kurt,trials,col)
However, I am not sure how you create both a skewed distribution and extract values from it that also is truncated? Can anyone assist me with this?

Best Answer

(continuing from the comments under the question)
One solution is to just truncate the distribution yourself by producing the distribution, cutting out values beyond your bounds, and replacing them with a new draw of numbers from the same distribution. That process could be set up in a while-loop that ends when the number of accepted values reaches your specification. Note that this could bias your distribution as is discussed in the comments under the question.