haskell / haskell/statistics

Problems with Student-T distribution

未关闭
#160 1 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
Bug
主要语言
Haskell
星标
309
派生
76
PR 合并指标
30 天内没有已合并 PR

描述

So far following problems with Student-T distribution were identified:

1. `quantile` lose precision for p≈0.5 since x becomes close to 1, while p is near zero
```haskell
quantile :: StudentT -> Double -> Double
quantile (StudentT ndf) p
| p >= 0 && p <= 1 =
let x = invIncompleteBeta (0.5 * ndf) 0.5 (2 * min p (1 - p))
in case sqrt $ ndf * (1 - x) / x of
r | p < 0.5 -> -r
| otherwise -> r
```

2. Both precision and performance suffer greatly for large degrees of freedom. Reason is likely incomplete beta and its inverse perform poorly for large parameters. However distribution becomes close to normal so other approximations could work!

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。