[General] network = Dist Dist.n = 200000 Dist.discrete = false # default for the cont. distrs. Dist.numcells = 100 Dist.firstvals = 100 Dist.file = "" # automatic filename Dist.excel = "0" # default (used where excel has no pdf) #---------------------------------------------------------------------- # CONTINUOUS #---------------------------------------------------------------------- # # uniform :) # [Config uniform1] Dist.variate = uniform(0,1) Dist.excel = "1" # -->OK [Config uniform2] Dist.variate = uniform(-3,7) Dist.excel = "0.1" # -->OK # # normal, truncnormal # [Config normal1] Dist.variate = normal(0,1) Dist.excel = "NORMDIST(A%d,0,1,0)" # -->OK [Config normal2] Dist.variate = normal(5,3) Dist.excel = "NORMDIST(A%d,5,3,0)" # -->OK [Config truncnormal] Dist.variate = truncnormal(${a=0,-1},${b=1,4}) Dist.excel = "IF(NORMDIST(A%d,${a},${b},0)<0,0,NORMDIST(A%d,${a},${b},0)/(1-NORMDIST(0,0,1,1)))" # -->OK # # exponential # [Config exponential] Dist.variate = exponential(3) Dist.excel = "EXPONDIST(A%d,1/3,0)" # -->OK # # gamma # [Config gamma] Dist.variate = gamma_d(${a=0.01,0.1,0.6,0.95,1,1.05,2,7},${b=2,5}) Dist.excel = "GAMMADIST(A%d,${a},${b},0)" # -->OK (since alpha=1, this is exponential distribution) # # erlang # # erlang(k,m) == gamma(k,m/k) # [Config erlang] Dist.variate = erlang_k(${a=1,5,10},${b=1,100,10,0.5}) Dist.excel = "GAMMADIST(A%d,${a},${b},0)" # -->OK # # triang # [Config triang1] Dist.variate = triang(0,0.3,1) # -->OK [Config triang2] Dist.variate = triang(0,0,1) # -->OK [Config triang3] Dist.variate = triang(0,1,1) # -->OK [Config triang4] Dist.variate = triang(-1,4,5) # -->OK # # lognormal # # no lognormal pdf in Excel. # f(X)=exp(-1/2*((ln(X)-m)/s)^2) / sqrt(2*PI()*s^2*X^2) (source: xycoon.com) # [Config lognormal] Dist.variate = lognormal(${m=0,1},${w=0.1,0.5,0.7,1}) Dist.excel = "exp(-1/2*((ln(A%d)-${m})/${w})^2) / sqrt(2*PI()*${w}^2*A%d^2)" # -->OK # # Weibull # # Excel's (alpha,beta) parameters correspond to our (b,a) (swapped!) # [Config weibull] Dist.variate = weibull(${a=1,2,5},${b=1,2,5}) Dist.excel = "WEIBULL(A%d,${a},${b},0)" # -->OK # # beta # [Config beta] Dist.variate = beta(${a=0.5,0.75,1,2,4,10,25},${b=0.75,1,2,4,10}) # -->OK # # chi-squared # # excel's CHIDIST is surely wrong: different shape, and in any case # it doesn't integrate to 1. we use GAMMADIST for testing instead: # # chi-square(k) = gamma(k/2,2) # [Config chi_square] Dist.variate = chi_square(${a=1,2,5,10,25,50}) Dist.excel = "GAMMADIST(A%d,${a}/2,2,0)" # -->OK # # student-t # # note: excel is wrong here, TDIST always creates 2-tailed distrib, # regardless of its "tails" parameter, and also it seemingly doesn't # integrate to 1! # # visual inspection was used, and compared to graphs at www.xycoon.com # [Config student_t] Dist.variate = student_t(${a=1,2,5,30,100}) # -->seems OK # # cauchy # # excel has no cauchy pdf. # f(X)=b/PI/((X-a)^2+b^2) (source: xycoon.com) # # firstvals had to be decreased, otherwise a few very high values (>1000) # occur and spoil the histogram range # [Config cauchy] Dist.variate = cauchy(${a=0,5},${b=1,3}) Dist.excel = "${b}/PI()/((A%d-${a})^2+${b}^2)" Dist.firstvals = 15 # -->OK # # pareto # # excel has no pareto pdf. # f(X)=a/b*(b/(X+c))^(a+1) (source: xycoon.com) # # firstvals had to be decreased, otherwise a few very high values (>100) # occur and spoil the histogram range # [Config pareto] Dist.variate = pareto_shifted(${a=1,5,10},${b=1,5,10},${c=0,8}) Dist.excel = "${a}/${b}*(${b}/(A%d+${c}))^(${a}+1)" Dist.firstvals = 15 # -->OK #---------------------------------------------------------------------- # DISCRETE #---------------------------------------------------------------------- # # intuniform # [Config intuniform] Dist.variate = intuniform(0,9) Dist.excel = "0.1" Dist.discrete = true Dist.numcells = 12 # -->OK # # bernoulli # [Config bernoulli] Dist.variate = bernoulli(0.2) Dist.excel = "if(A%=0,0.2,0.8)" Dist.discrete = true Dist.numcells = 2 # -->OK # # binomial # [Config binomial] Dist.variate = binomial(${a=1,10}, ${b=0,0.2,1}) Dist.excel = "BINOMDIST(A%d,${a},${b},0)" Dist.discrete = true Dist.numcells = 5 # -->OK # # geometric # [Config geometric] Dist.variate = geometric(${a=0.2,0.8,2}) Dist.excel = "NEGBINOMDIST(A%d,1,${a})" Dist.discrete = true Dist.numcells = 20 # -->OK # # negbinomial # [Config negbinomial] Dist.variate = negbinomial(5,0.2) Dist.excel = "NEGBINOMDIST(A%d,5,0.2)" Dist.discrete = true Dist.numcells = 20 # -->OK # # hypergeometric # # excel has different parameters: if we have (a,b,n), it expects (n,a,a+b) # # here we cannot test because hypergeometric is broken! # #Dist.variate=hypergeometric(5,5,1) #Dist.excel="HYPGEOMDIST(A%d,1,5,10)" #Dist.discrete=true #Dist.numcells=10 #Dist.variate=hypergeometric(5,5,2) #Dist.excel="HYPGEOMDIST(A%d,2,5,10)" #Dist.discrete=true #Dist.numcells=10 #Dist.variate=hypergeometric(0,10,1) #Dist.excel="HYPGEOMDIST(A%d,1,0,10)" #Dist.discrete=true #Dist.numcells=10 # # poisson # # we use different algorithms under 30 and above 30 # [Config poisson] Dist.variate = poisson(${a=5,29,31,50}) Dist.excel = "POISSON(A%d,$a{},0)" Dist.discrete = true Dist.numcells = 50 # -->OK # -->similar but slight MISMATCH: POISSON's peak is 0.07, ours is 0.08 # -->similar but slight MISMATCH: POISSON's peak is 0.056, ours is 0.063