Skip to content

Repository files navigation

DoubleDoubleStatistic

Double-Double Statistic Implements

Requirement

.NET 10.0
DoubleDouble
DoubleDoubleComplex
Algebra

Install

Download DLL
Download Nuget

Implemented Distributions

Continuous

categorydistributionPDFCDFquantilestatisticfittingrandom generationnote
stablecauchy
delta
holtsmark
landau
levy
map-airy
normal
sas point5
linearitycosine
davisCDF and Quantile take longer to calculate.
frechet
gumbel
johnson sb
johnson su
laplace
logistic
skew cauchy
skew normalQuantile take longer to calculate.
uniform
u quadratic
weibull
scalablebenini
birnbaum saunders
exponential
folded normal
gamma
gompertz
half cauchy
half logistic
half normal
hyperbolic secant
inverse gaussQuantile take longer to calculate.
log logistic
lomax
maxwell
q-exponentialAccuracy decreases when q is nearly 2.
q-gaussianAccuracy decreases when q is nearly 3.
pareto
rayleigh
voigtCDF and Quantile take longer to calculate.
wigner semicircle
continuousalpha
arcsine-
argus
benktanderQuantile take longer to calculate.
bates-n ≤ 128
beta
beta prime
bradford
burr
chi
chi square
dagum
fisher z
fisk
hotelling t sq
inverse gamma
inverse chi
inverse chi sq
irwin hall-n ≤ 128
kumaraswamy
log normal
nakagami
noncentral betaAccuracy decreases when non-centricity is large.
noncentral chi sqAccuracy decreases when non-centricity is large.
noncentral fAccuracy decreases when non-centricity is large.
noncentral tAccuracy decreases when non-centricity is large.
power
reciprocal
riceCDF and Quantile take longer to calculate.
snedecor f
student t
trapezoid
triangular
tukey lambda

Discrete

categorydistributionPMFstatisticfittingrandom generationnote
discretebernoulli
benford-
binary-
binomial
categorical-
discrete uniform
gausskuzmin-
geometric
hyper geometric-
logarithmic
negative binomial
pascal
poisson
skellam
yule simon
zipf

Directional

categorydistributionPDFstatisticfittingrandom generationnote
directionalcircular cauchyNot implemented: kurtosis
von misesNot implemented: kurtosis
sphere uniform-Not implemented: kurtosis
von mises fisherDim=3, Not implemented: kurtosis

MultiVariate

categorydistributionPDFstatisticfittingrandom generationnote
multivariateball uniform-
dirichlet
disk uniform-
multi normal

Usage

NormalDistributiondist=new(mu:1,sigma:3);// PDFfor(ddoublex=-4;x<=4;x+=0.125){ddoublepdf=dist.PDF(x);Console.WriteLine($"pdf({x})={pdf}");}// CDFfor(ddoublex=-4;x<=4;x+=0.125){ddoubleccdf=dist.CDF(x,Interval.Upper);Console.WriteLine($"ccdf({x})={ccdf}");}// Quantilefor(inti=0;i<=10;i++){ddoublep=(ddouble)i/10;ddoublex=dist.Quantile(p,Interval.Upper);Console.WriteLine($"cquantile({p})={x}");}// StatisticConsole.WriteLine($"Support={dist.Support}");Console.WriteLine($"Mu={dist.Mu}");Console.WriteLine($"Sigma={dist.Sigma}");Console.WriteLine($"Mean={dist.Mean}");Console.WriteLine($"Median={dist.Median}");Console.WriteLine($"Mode={dist.Mode}");Console.WriteLine($"Variance={dist.Variance}");Console.WriteLine($"Skewness={dist.Skewness}");Console.WriteLine($"Kurtosis={dist.Kurtosis}");Console.WriteLine($"Entropy={dist.Entropy}");// Random SamplingRandomrandom=new(1234);double[]xs=dist.Sample(random,100000).ToArray();// Fitting// note: The distribution that minimizes the squared error // of the quantile function over the specified interval is return.(NormalDistribution?dist_fit,ddoubleerror)=NormalDistribution.Fit(xs,fitting_quantile_range:(0.1,0.9));

Typical parameter symbols

categorysymbolnote
support parameterk
a, buniform
a, b, ctriangular
shape parameteralpha
alpha, betabeta, beta prime
gamma, deltajohnson sb, su
etagompertz
nuchi, chisq, student t
nirwin hall
n, mfisher z, snedecor f
cstable distributions
location parametermu
scale parametersigmaerror-related distributions
thetatime-related distributions
s, rotherwise
non-centricity parameterlambda
munon-central student t

Licence

MIT

Author

T.Yoshimura