Ce serveur Gitlab sera éteint le 30 juin 2020, pensez à migrer vos projets vers les serveurs gitlab-research.centralesupelec.fr et gitlab-student.centralesupelec.fr !

Commit 1115ff27 by John Myles White

### Change spelling of Hypergeometric

parent 51a83a6c
 ... ... @@ -53,7 +53,7 @@ export GenericMvNormalCanon, Geometric, Gumbel, HyperGeometric, Hypergeometric, InverseWishart, InverseGamma, InverseGaussian, ... ...
 immutable HyperGeometric <: DiscreteUnivariateDistribution immutable Hypergeometric <: DiscreteUnivariateDistribution ns::Float64 # number of successes in population nf::Float64 # number of failures in population n::Float64 # sample size function HyperGeometric(s::Real, f::Real, n::Real) function Hypergeometric(s::Real, f::Real, n::Real) isinteger(s) && zero(s) <= s || error("ns must be a non-negative integer") isinteger(f) && zero(f) <= f || error("nf must be a non-negative integer") isinteger(n) && zero(n) < n < s + f || ... ... @@ -11,15 +11,15 @@ immutable HyperGeometric <: DiscreteUnivariateDistribution end end @_jl_dist_3p HyperGeometric hyper @_jl_dist_3p Hypergeometric hyper function insupport(d::HyperGeometric, x::Number) function insupport(d::Hypergeometric, x::Number) isinteger(x) && zero(x) <= x <= d.n && (d.n - d.nf) <= x <= d.ns end mean(d::HyperGeometric) = d.n * d.ns / (d.ns + d.nf) mean(d::Hypergeometric) = d.n * d.ns / (d.ns + d.nf) function var(d::HyperGeometric) function var(d::Hypergeometric) N = d.ns + d.nf p = d.ns / N d.n * p * (1.0 - p) * (N - d.n) / (N - 1.0) ... ...
 ... ... @@ -52,11 +52,11 @@ for d in [Arcsine(), Geometric(0.9), Gumbel(3.0, 5.0), Gumbel(5, 3), HyperGeometric(1.0, 1.0, 1.0), HyperGeometric(2.0, 2.0, 2.0), HyperGeometric(3.0, 2.0, 2.0), HyperGeometric(2.0, 3.0, 2.0), HyperGeometric(2.0, 2.0, 3.0), Hypergeometric(1.0, 1.0, 1.0), Hypergeometric(2.0, 2.0, 2.0), Hypergeometric(3.0, 2.0, 2.0), Hypergeometric(2.0, 3.0, 2.0), Hypergeometric(2.0, 2.0, 3.0), InverseGaussian(1.0,1.0), InverseGaussian(2.0,7.0), InverseGamma(1.0, 1.0), ... ...
 ... ... @@ -72,11 +72,11 @@ for d in [Arcsine(), Geometric(0.9), Gumbel(3.0, 5.0), Gumbel(5, 3), HyperGeometric(1.0, 1.0, 1.0), HyperGeometric(2.0, 2.0, 2.0), HyperGeometric(3.0, 2.0, 2.0), HyperGeometric(2.0, 3.0, 2.0), HyperGeometric(2.0, 2.0, 3.0), Hypergeometric(1.0, 1.0, 1.0), Hypergeometric(2.0, 2.0, 2.0), Hypergeometric(3.0, 2.0, 2.0), Hypergeometric(2.0, 3.0, 2.0), Hypergeometric(2.0, 2.0, 3.0), InverseGaussian(1.0,1.0), InverseGaussian(2.0,7.0), InverseGamma(1.0,1.0), ... ...
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!