Skip to content

Problems with Student-T distribution #160

@Shimuuar

Description

@Shimuuar

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
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
  1. 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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions