/// <summary> /// Computes a cumulant of the distribution. /// </summary> /// <param name="r">The index of the cumulant to compute.</param> /// <returns>The rth cumulant of the distribution.</returns> /// <seealso href="http://en.wikipedia.org/wiki/Cumulant"/> public virtual double Cumulant(int r) { double[] C = CentralMoments(r); double[] K = MomentMath.CentralToCumulant(Mean, C); return(K[r]); }