Skip to content
This repository was archived by the owner on Jul 7, 2020. It is now read-only.
This repository was archived by the owner on Jul 7, 2020. It is now read-only.

p10 > p50, p90 > p99 for a simple digest #138

@rodrigofarnhamsc

Description

@rodrigofarnhamsc
        TDigest tdigest = new TDigest(100);
        tdigest.add(0.18615591526031494);
        tdigest.add(0.4241943657398224);
        tdigest.add(0.8813006281852722);

        System.out.println("p10: " + tdigest.quantile(0.1));
        System.out.println("p50: " + tdigest.quantile(0.5));
        System.out.println("p90: " + tdigest.quantile(0.9));
        System.out.println("p95: " + tdigest.quantile(0.95));
        System.out.println("p99: " + tdigest.quantile(0.99));

The output doesn't look right:

p10: 0.35278283059597015
p50: 0.30517514050006866
p90: 1.018432506918907
p95: 0.9498665675520899
p99: 0.8950138160586358
  • p10 > p50
  • p90 > p95 > p99

Should I use https://github.com/tdunning/t-digest/blob/master/src/main/java/com/tdunning/math/stats/MergingDigest.java instead?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions