private void RecordAllocationResult()
        {
            BasicStatistics stats = new BasicStatistics(this.allDistances);
            var CI = new ConfidenceIntervalStandardNormal(stats);

            this.allocationResult = new AllocationResult()
            {
                Mean = stats.Mean,
                LCI = CI.LowerBound,
                UCI = CI.UpperBound,
                Stats = stats,
            };
        }
 protected void AddConfidenceIntervalStatisics(BasicStatistics statistics)
 {
     var ci = new ConfidenceIntervalStandardNormal(statistics);
     AddStatistic(STANDARD_ERROR, ci.StandardError);
     AddStatistic(LOWER_CONFIDENCE_INTERVAL, ci.LowerBound);
     AddStatistic(UPPER_CONFIDENCE_INTERVAL, ci.UpperBound);
 }
        /// <summary>
        /// Create a LocalityResult object to store result for locality
        /// </summary>
        /// <param name="locality">Name of locality</param>
        /// <param name="data">data points for locality</param>
        protected void RecordLocalityResults(string locality, List<double> data)
        {
            BasicStatistics stats = new BasicStatistics(data);
            var CI = new ConfidenceIntervalStandardNormal(stats);

            var localityResult = new LocalityResult()
            {
                Locality = locality,
                Mean = Math.Round(stats.Mean, DECIMAL_PLACES),
                LCI = Math.Round(CI.LowerBound, DECIMAL_PLACES),
                UCI = Math.Round(CI.UpperBound, DECIMAL_PLACES),
                FifthPercentile = Math.Round(stats.Percentile(FIFTH_PERCENTILE), DECIMAL_PLACES),
                NinetyFifthPercentile = Math.Round(stats.Percentile(NINETYFIFTH_PERCENTILE), DECIMAL_PLACES)
            };

            resultsByLocality.Add(localityResult);
        }