/// <summary>
        /// Cumulative Density Function
        /// </summary>
        /// <see cref="https://en.wikipedia.org/wiki/Cumulative_distribution_function"/>
        /// <seealso cref="https://en.wikipedia.org/wiki/Beta_function#Incomplete_beta_function"/>
        public override double Cdf(double x)
        {
            if (x < 0 || x > 1.0)
            {
                throw new ArgumentOutOfRangeException(nameof(x), "value must be in [0..1] range");
            }

            return(GammaFunctions.BetaIncompleteRegular(x, Alpha, Beta));
        }
Пример #2
0
        /// <summary>
        /// Cumulative Density Function
        /// </summary>
        /// <see cref="https://en.wikipedia.org/wiki/Cumulative_distribution_function"/>
        public override double Cdf(double x)
        {
            if (x < 0)
            {
                throw new ArgumentOutOfRangeException(nameof(x), "value must not be negative");
            }

            return(1.0 - GammaFunctions.BetaIncompleteRegular(DegreeOfFreedom / (x * x + DegreeOfFreedom), DegreeOfFreedom / 2, 0.5) / 2);
        }
Пример #3
0
        /// <summary>
        /// Cumulative Density Function
        /// </summary>
        /// <see cref="https://en.wikipedia.org/wiki/Cumulative_distribution_function"/>
        public override double Cdf(double x)
        {
            if (x <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(x), "value must be positive");
            }

            return(GammaFunctions.BetaIncompleteRegular(DegreeOfFreedom1 * x / (DegreeOfFreedom1 * x + DegreeOfFreedom2),
                                                        DegreeOfFreedom1 / 2,
                                                        DegreeOfFreedom2 / 2));
        }