Using Apache Commons Math to determine confidence intervals

前端 未结 2 1345
暖寄归人
暖寄归人 2021-02-07 13:30

I have a set of benchmark data for which I compute summary statistics using Apache Math Commons. Now I want to use the package to compute confidence intervals for the arithmetic

2条回答
  •  北恋
    北恋 (楼主)
    2021-02-07 14:03

    Apache Commons Math does not have direct support for constructing confidence intervals. However, it does have everything needed to compute them.

    First, use SummaryStatistics, or some other StatisticalSummary implementation to summarize your data into sample statistics.

    Next, use TDistribution to compute critical values for your desired confidence level. The degrees of freedom can be inferred from the summary statistics' n property.

    Last, use the mean, variance, and n property values from the summary statistics and the t critical value from the distribution to compute your lower and upper confidence limits.

提交回复
热议问题