如果我有t-statistic和df(在Perl中),我该如何计算p值?

Abd*_*del 4 statistics perl

我编写了一个执行许多单样本t检验的Perl脚本.我得到了数以千计的自由度(df)统计量.我需要升级脚本以返回它们的p值(在表中手动查找它们太多了).我可以用t-statistic和df作为输入来使用某种公式吗?我希望有人可以帮助我,非常感谢!

AA

bub*_*ker 7

使用Statistics :: Distributions似乎非常简单:

print Statistics::Distributions::tprob($dof,$tstat);
Run Code Online (Sandbox Code Playgroud)