public NegativeBinomialDistribution([PositiveInteger] int failures, [Unit] double probability) { if (failures <= 0) throw new ArgumentOutOfRangeException("failures"); if (probability < 0 || probability > 1) throw new ArgumentOutOfRangeException("probability"); this.r = failures; this.p = probability; }