PsiTruncate ([min], [max], [type])
PsiTruncate is used to restrict the values of samples from an uncertain variable distribution, or a few PSI Statistic functions, to lie within the range from min to max. Supported PsiStatistics functions are: PsiKurtosis, PsiMax, PsiMean, PsiMedian, PsiMin, PsiMode, PsiPercentile, PsiPercentileD, PsiRange, PsiSkewness, PsiStdDev, PsiTarget, PsiTargetD and PsiVariance.
- This property also accepts "empty" arguments for the min and max parameters. If not provided, the default of -1E+30 will be used for min and the default of 1E+30 will be used for max.
Example: PsiNormal(0, 1, PsiTruncate( ,2)) results in a PsiNormal distribution with mean, 0, and standard deviation, 1, and a cutoff on the right of the distribution at 2.
Example: PsiNormal(0, 1, PsiTruncate(-2)) results in a PsiNormal distribution with mean, 0, and standard deviation, 1, and a cutoff on the left of the distribution at -2.
- A third optional argument, type, was added in V2019. If type = 1, the default, bounds will be interpreted as numbers. If type = 2, the bounds will be interpreted as standard deviations. If type = 3, the bounds will be interpreted as percentiles which must be between 0 and 1.
Example: PsiNormal(0,1,PsiTruncate(,2,1) results in a PsiNormal distribution with mean, 0, and standard deviation, 1, and a cutoff on the right of the distribution at 2. This formula is equivalent to PsiNormal(0,1,PsiTruncate(,2)).
Example: PsiNormal(0, 0.5, PsiTruncate( , 2, 2) results in a PsiNormal distribution with mean, 0, and standard deviation, 0.5, and a cutoff value on the right of the distribution at 1, which is the 2nd standard deviation from the mean.
Example: PsiNormal(0, 0.5, PsiTruncate(, 0.98, 3) results in a PsiNormal distribution with mean, 0, and standard deviation, 0.5, and a cutoff value on the right of the distribution at the 98th percentile or 1.0269.
- If PsiTruncate is applied to a distribution that also includes the PsiShift function, the shift will occur after truncation. Use type = -1 (numbers), -2 (standard deviation) or -3 (percentiles) to apply the shift before truncation.
Example: PsiNormal(0, 1, PsiShift(1), PsiTruncate( , 2, -1) results in a PsiNormal distribution with mean, 1, and standard deviation, 1, and a cutoff value on the right of the distribution at 2.
Example: PsiNormal(0, 0.5, PsiShift(1), PsiTruncate( , 2, -2) results in a PsiNormal distribution with mean, 1, and standard deviation, 0.5, and a cutoff value on the right of the distribution at 2, the 2nd standard deviation from the mean.
Example: PsiNormal(0, 0.5, PsiShift(1), PsiTruncate(, 0.98, -3) results in a PsiNormal distribution with mean, 1, and standard deviation, 0.5, and a cutoff value at the 98th percentile, 1.0269. Note that PsiTruncate is not considered when calculating percentile values.