#[OpenSource Project] How do I calculate a quantile if I only have frequency-based binned histogram?
45 messages · Page 1 of 1 (latest)
The image above is a very easy example to see things are going wrong (colors go up then the server crashes), but here's a more common example, where the tick times are usually way low so only q75 and q99 would really be useful
bump plz help
What are you trying to do?
just find out the quantiles for a given histogram
but i do not have the data that generated the histogram, just the frequency
Write a function that identifies quantiles from frequencies
... yeah that's what i'm asking help about
i have no clue how to do that
or even how to calculate by hand
Because this is a web page
and due to ambiguous licensing, i cannot even use many plotting libs
that's why i built that chart from scratch using d3.js
i just need someone to tell me how to calculate that
and i'll code it
use a library
do you know a library that would give me what i'm looking for?
from frequencies? not really, especially since I haven't seen any data
but all typical quantile functions get you a quantile from an array
I do not have an array of numbers to be quantizes, i have already a histogram of frequencies
that's why i'm asking
let me find a dataset, one second
This is what the data looks like
[
0.6303839732888147,
0.1353923205342237,
0.14006677796327213,
0.09365609348914858,
0.000333889816360601,
0.0001669449081803005,
0,
0,
0,
0,
0,
0,
0,
0,
0
]
but usually the distribution center is closer to the second bucket instead of been super to the left
so it's already sorted?
The following error occured while calculating:
Error: Unexpected end of expression (char 9)
,calc cumsum([0.6303839732888147,0.1353923205342237,0.14006677796327213,0.09365609348914858,0.000333889816360601,0.0001669449081803005,0,0,0,0,0,0,0,0,0])
Result:
[0.63038397328881, 0.76577629382304, 0.90584307178631, 0.99949916527546, 0.99983305509182, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
those are the bins of a histogram
the sum will be 1
because that's 100%
If it's already sorted you can do cumulative sum and check for the values
mathjs is apache 2, which is as free as required
https://www.jsdelivr.com/package/npm/mathjs
i have no idea what you mean and how that solves the issue of finding the quantiles
Bro, honestly if you have no idea what you are doing why do you even posting here?
i'm posting here because I have no idea how to calculate that
No one here is going to solve your problem for you, if you haven't noticed