Accord.Statistics.Distributions.Univariate.RademacherDistribution.DistributionFunction C# (CSharp) Method

DistributionFunction() public method

Gets P(X ≤ k), the cumulative distribution function (cdf) for this distribution evaluated at point k.
The Cumulative Distribution Function (CDF) describes the cumulative probability that a given value or any value smaller than it will occur.
public DistributionFunction ( int k ) : double
k int A single point in the distribution range.
return double
        public override double DistributionFunction(int k)
        {
            if (k < -1)
                return 0;
            if (k >= 1)
                return 1;
            return 0.5;
        }