Percentile

看起来好像是个简单的分位数,其实还是蛮复杂的,各种不同的算法,Excel内的算法也很独特,初中课本上的算法也不一定对。

就看计算时候的要求了,具体实现我就不再赘述了

    public enum PercentileMethod
    {
        /// <summary>
        ///  http://www.itl.nist.gov/div898/handbook/prc/section2/prc252.htm
        /// </summary>
        Nist = 0,

        /// <summary>
        /// http://en.wikipedia.org/wiki/Percentile#Nearest_Rank
        /// </summary>
        Nearest,

        /// <summary>
        ///  http://www.itl.nist.gov/div898/handbook/prc/section2/prc252.htm
        /// </summary>
        Excel,

        /// <summary>
        ///  http://en.wikipedia.org/wiki/Percentile#Linear_Interpolation_Between_Closest_Ranks
        /// </summary>
        Interpolation
    }

  

posted @ 2013-06-06 16:40  kwok.io  阅读(355)  评论(0编辑  收藏  举报