Accord.Statistics.Distributions.Univariate.ChiSquareDistribution.SurvivalFunction C# (CSharp) Method

SurvivalFunction() public method

Gets the complementary cumulative distribution function for the χ² evaluated at point x.
public SurvivalFunction ( double x ) : double
x double
return double
        public double SurvivalFunction(double x)
        {
            return Special.ChiSqc(degreesOfFreedom, x);
        }

Usage Example

        /// <summary>
        ///   Constructs a Chi-Square Test.
        /// </summary>
        /// <param name="statistic">The test statistic.</param>
        /// <param name="degreesOfFreedom">The chi-square distribution degrees of freedom.</param>
        /// <param name="threshold">The significance threshold. By default, 0.05 will be used.</param>
        /// 
        public ChiSquareTest(double statistic, int degreesOfFreedom, double threshold)
        {
            this.Statistic = statistic;
            this.Threshold = threshold;
            this.distribution = new ChiSquareDistribution(degreesOfFreedom);

            this.PValue = distribution.SurvivalFunction(Statistic);
        }
All Usage Examples Of Accord.Statistics.Distributions.Univariate.ChiSquareDistribution::SurvivalFunction