Skip to content
This repository has been archived by the owner on Aug 25, 2020. It is now read-only.

FightingVariance.wiki

Serge Camille edited this page Aug 24, 2015 · 1 revision

SimulationCraft works according to Central limit theorem, which claims the following:

Let X1, X2, X3, ... Xn be a sequence of n independent and identically distributed random variables having each finite values of expectation µ and variance σ2 > 0. Then the distribution of the sample average of these random variables approaches the normal distribution with a mean µ and variance σ2 / n irrespective of the shape of the original distribution.

http://upload.wikimedia.org/math/1/8/7/187d068dc2672332dc22f81e28d6758d.png

So if we set iterations=infinity, SimCraft will yield a precise result that will be perfect in comparison with theorycraft - no assumptions, pure modelling, but definitive output.

However, this is impossible and full raid sims take quite a significant amount of time even with few iterations. Thus we have to deal with variance in our results, that's especially noticeable when we calculate scaling, i.e. small differences between two dps.


Since r698 SimCraft supports tracking dps values (dps is the most important output characteristic of simulations), and we can make use of those.

Using 3σ-rule we can estimate confidence intervals for precise DPS values, namely:

  • There's 95% probability that precise DPS lies within 1.96 * σ / sqrt( n ) neighbourhood of an average DPS

  • There's 95% probability that precise DPS difference lies within 1.96 * sqrt( 1.96 ) * σ / sqrt( n ) neighbourhood of difference between two average DPS values (useful for scaling simulations and spec comparisons).


SimCraft also reports a series of statistical metrics, e.g. stddev, min and max, range, 10th and 90th percentile and #iterations needed for specific error thresholds.

As of r9633 it is possible to specify a custom confidence level, whereas the default remains 95%.


Charts explaining what the confidence means: The y axis tells with which probability the true dps is at a certain point. The confidence level is the filled area with the predetermined volume percent. e.g. with a 95% confidence level, the volume of the filled area is exactly 95% of the whole possible area from -infinity to +infinity.

http://1.chart.apis.google.com/chart?chs=525x185&cht=lc&chg=20,20&chco=FF0000&chxr=0,33185,33346|2,0,0.0398&chf=bg,s,333333&chxt=x,x,y,y&chxl=1:|DPS|3:|p&chtt=60.00%25+Confidence+Interval&chxs=0,ffffff|1,ffffff|2,ffffff|3,ffffff&chts=dddddd,18&chfd=0,x,33185,33346,0.04982692,100exp(-(x-33265)^2/(220^2))&chd=t:-1&chm=B,C6D9FD,0,1272:1950,0&name=60confidence.jpg

http://2.chart.apis.google.com/chart?chs=525x185&cht=lc&chg=20,20&chco=FF0000&chxr=0,33180,33341|2,0,0.0397&chf=bg,s,333333&chxt=x,x,y,y&chxl=1:|DPS|3:|p&chtt=97.00%25+Confidence+Interval&chxs=0,ffffff|1,ffffff|2,ffffff|3,ffffff&chts=dddddd,18&chfd=0,x,33180,33341,0.04974335,100exp(-(x-33261)^2/(220^2))&chd=t:-1&chm=B,C6D9FD,0,740:2493,0&name=97confidence.jpg

Clone this wiki locally