private double complementaryDistributionFunction(double x) { if (exact) { // For small samples (< 30) and if there are not very large // differences in samples sizes, this distribution is exact. return(WilcoxonDistribution.exactComplement(x, table)); } if (Correction == ContinuityCorrection.Midpoint) { if (x > Mean) { x = x - 0.5; } else { x = x + 0.5; } } else if (Correction == ContinuityCorrection.KeepInside) { x = x - 0.5; } return(approximation.ComplementaryDistributionFunction(x)); }
/// <summary> /// Gets the cumulative distribution function (cdf) for /// this distribution evaluated at point <c>x</c>. /// </summary> /// /// <param name="x">A single point in the distribution range.</param> /// /// <remarks> /// The Cumulative Distribution Function (CDF) describes the cumulative /// probability that a given value or any value smaller than it will occur. /// </remarks> /// /// <example> /// See <see cref="ShapiroWilkDistribution"/>. /// </example> /// protected internal override double InnerDistributionFunction(double x) { double z = g(x); double cdf = normal.ComplementaryDistributionFunction(z); return(cdf); }
/// <summary> /// Gets the complementary cumulative distribution function /// (ccdf) for this distribution evaluated at point <c>x</c>. /// This function is also known as the Survival function. /// </summary> /// <param name="x">A single point in the distribution range.</param> /// <returns>System.Double.</returns> /// <remarks>The Complementary Cumulative Distribution Function (CCDF) is /// the complement of the Cumulative Distribution Function, or 1 /// minus the CDF.</remarks> protected internal override double InnerComplementaryDistributionFunction(double x) { if (this.exact) { return(exactComplement(x, table)); } if (Correction == ContinuityCorrection.Midpoint) { if (x > Mean) { x = x - 0.5; } else { x = x + 0.5; } } else if (Correction == ContinuityCorrection.KeepInside) { x = x - 0.5; } return(approximation.ComplementaryDistributionFunction(x)); }
/// <summary> /// Gets the complementary cumulative distribution function /// (ccdf) for this distribution evaluated at point <c>x</c>. /// This function is also known as the Survival function. /// </summary> /// /// <param name="x">A single point in the distribution range.</param> /// /// <remarks> /// The Complementary Cumulative Distribution Function (CCDF) is /// the complement of the Cumulative Distribution Function, or 1 /// minus the CDF. /// </remarks> /// public override double ComplementaryDistributionFunction(double x) { if (x <= 0) { return(0); } if (x >= 1) { return(1); } double z = g(x); return(normal.ComplementaryDistributionFunction(z)); }
/// <summary> /// Gets the complementary cumulative distribution function /// (ccdf) for this distribution evaluated at point <c>x</c>. /// This function is also known as the Survival function. /// </summary> /// /// <param name="x">A single point in the distribution range.</param> /// /// <remarks> /// The Complementary Cumulative Distribution Function (CCDF) is /// the complement of the Cumulative Distribution Function, or 1 /// minus the CDF. /// </remarks> /// public override double ComplementaryDistributionFunction(double x) { return(normal.ComplementaryDistributionFunction(g(x))); }