Пример #1
0
        /// <summary>
        /// Estimates {min, lower-quantile, median, upper-quantile, max} from the provided samples.
        /// Approximately median-unbiased regardless of the sample distribution (R8).
        /// </summary>
        /// <param name="data">The data sample sequence.</param>
        public static double[] FiveNumberSummary(this IEnumerable <double?> data)
        {
            if (data == null)
            {
                throw new ArgumentNullException("data");
            }
            var array = data.Where(d => d.HasValue).Select(d => d.Value).ToArray();

            return(ArrayStatistics.FiveNumberSummaryInplace(array));
        }
Пример #2
0
        /// <summary>
        /// Estimates {min, lower-quantile, median, upper-quantile, max} from the provided samples.
        /// Approximately median-unbiased regardless of the sample distribution (R8).
        /// </summary>
        /// <param name="data">The data sample sequence.</param>
        public static double[] FiveNumberSummary(this IEnumerable <double?> data)
        {
            var array = data.Where(d => d.HasValue).Select(d => d.Value).ToArray();

            return(ArrayStatistics.FiveNumberSummaryInplace(array));
        }
Пример #3
0
        /// <summary>
        /// Estimates {min, lower-quantile, median, upper-quantile, max} from the provided samples.
        /// Approximately median-unbiased regardless of the sample distribution (R8).
        /// </summary>
        /// <param name="data">The data sample sequence.</param>
        public static double[] FiveNumberSummary(this IEnumerable <double> data)
        {
            var array = data.ToArray();

            return(ArrayStatistics.FiveNumberSummaryInplace(array));
        }