作者投稿和查稿 主编审稿 专家审稿 编委审稿 远程编辑

计算机工程

• 体系结构与软件技术 • 上一篇    下一篇

一种逆t分布数值算法的原理与实现

郝萌,范轶翔,夏翔,刘龙,王鹏,黄宁   

  1. (四川大学原子核科学技术研究所辐射物理及技术教育部重点实验室,成都 610065)
  • 收稿日期:2014-11-07 出版日期:2015-07-15 发布日期:2015-07-15
  • 作者简介:郝萌(1989-),男,硕士研究生,主研方向:测控技术,系统仿真,数值算法及实现;范轶翔(通讯作者)、夏翔,助理研究员、硕士;刘龙,硕士研究生;王鹏,助理研究员、硕士;黄宁,副研究员、博士。

Principle and Implementation of a Numerical Algorithm of Inverse t-distribution

HAO Meng,FAN Yixiang,XIA Xiang,LIU Long,WANG Peng,HUANG Ning   

  1. (Key Laboratory of Radiation Physics and Technology of Education of Ministry,Institute of Nuclear Science and Technology,Sichuan University,Chengdu 610065,China)
  • Received:2014-11-07 Online:2015-07-15 Published:2015-07-15

摘要: 为在代码开发中应用逆t分布进行计算,分析并实现一种数值算法。基于不完全Beta函数,利用公式推导得到不完全Beta函数的逆近似值,采用哈雷求根法求出其精确解,根据精确解得到逆t分布的值。该算法是对Matlab实现算法的一种补充,适用于需要嵌入代码的项目。通过C++实现算法,将其计算结果与Excel,Matlab进行对比,结果显示相对误差低于10-11,验证了该算法在工程应用中的正确性。

关键词: 逆t分布, 不完全Beta函数, Matlab仿真, 相对误差

Abstract: To utilize the inverse t-distribution in a practical code development project,a numerical algorithm based on the incomplete Beta function is analyzed and implemented.First,an initial approximation of the inverse of incomplete Beta function is deducted according to the formula.Then Halley root-finding algorithm is employed to hunt exact solution of the inverse.At last,the value of inverse t-distribution is obtained on the base of exact solution.The analyzed algorithm can be regarded as a supplement to that of Matlab.It can be applied to the project needing to calculate the value of inverse t-distribution in code embedding manner.The algorithm is implemented in C++ language.Compared with the result of Matlab and Excel,the relative error between the algorithm and Matalb and Excel is less than 10-11,this data shows the correctness of the algorithm in engineering applications.

Key words: inverse t-distribution, incomplete Beta function, Matlab simulation, relative error

中图分类号: