Home → Techniques and Tips → @RISK Distributions → Statistics for Just Part of a Distribution
Applies to: @RISK 5.x–7.x
I want to get the mean and standard deviation for just part of my distribution. If I enter truncation limits in the Define Distribution window or include RiskTruncate( ) in the distribution formula, then the mean and standard deviation of my distribution change and that is not what I want. I want the regular distribution to be simulated, but then after simulation I want to consider only part of it when computing the statistics.
OR,
I have applied a filter, but the statistics functions are still computed on the whole distribution. Is there a way to get the mean of the filtered data set using RiskMean?
To use the whole distribution in simulation but then get the statistics of just a portion of it, put a RiskTruncate( ) function inside the RiskMean( ). A very minimal example is attached.
A1 contains: =RiskNormal(100,10).
A2 contains: =RiskMean(A1, RiskTruncate(95)), which computes the mean of the part of the distribution from 95 to infinity. This is equivalent to =RiskMean(A1, RiskTruncate(95, 1E+99)).
A3 contains: =RiskMean(A1, RiskTruncateP(0.8,1)), which computes the mean of the part of the distribution from the 80th to the 100th percentile, the top 20% of the distribution.
The other statistics functions can have RiskTruncate( ) applied in the same way.
About accuracy of theoretical statistics: Most distributions have no closed form for the mean of a truncated distribution. Therefore, if you're using RiskTheoMean with RiskTruncate, @RISK has to do a little mini-simulation to approximate the theoretical mean of the truncated distribution. This may differ from the actual theoretical mean by a small amount, usually not more than a percent or two. With a truncated simulated distribution, using RiskMean with RiskTruncate, @RISK uses actual simulation data. Thus results are accurate with respect to that simulation, but another simulation with a different random number seed would of course give slightly different results.
See also: Cutting Off a Distribution at Left or Right for truncating an input distribution and using only the truncated distribution in simulation.
Last edited: 2017-09-01