Ejemplo n.º 1
0
        /// <summary>
        ///   Gets the log-probability density function (pdf) for
        ///   this distribution evaluated at point <c>x</c>.
        /// </summary>
        ///
        /// <param name="x">A single point in the distribution range.</param>
        ///
        /// <returns>
        ///   The logarithm of the probability of <c>u</c>
        ///   occurring in the current distribution.
        /// </returns>
        ///
        /// <remarks>
        ///   The Probability Density Function (PDF) describes the
        ///   probability that a given value <c>u</c> will occur.
        /// </remarks>
        ///
        /// <example>
        ///   See <see cref="MannWhitneyDistribution"/>.
        /// </example>
        ///
        protected internal override double InnerLogProbabilityDensityFunction(double x)
        {
            if (exact)
            {
                return(Math.Log(WilcoxonDistribution.count(x, table)) - Math.Log(table.Length));
            }

            return(approximation.ProbabilityDensityFunction(x));
        }
Ejemplo n.º 2
0
        /// <summary>
        ///   Gets the probability density function (pdf) for
        ///   this distribution evaluated at point <c>u</c>.
        /// </summary>
        ///
        /// <param name="x">A single point in the distribution range.</param>
        ///
        /// <returns>
        ///   The probability of <c>u</c> occurring
        ///   in the current distribution.
        /// </returns>
        ///
        /// <remarks>
        ///   The Probability Density Function (PDF) describes the
        ///   probability that a given value <c>u</c> will occur.
        /// </remarks>
        ///
        /// <example>
        ///   See <see cref="MannWhitneyDistribution"/>.
        /// </example>
        ///
        protected internal override double InnerProbabilityDensityFunction(double x)
        {
            if (this.exact)
            {
                return(WilcoxonDistribution.count(x, table) / (double)table.Length);
            }

            return(approximation.ProbabilityDensityFunction(x));
        }