Bug 61130

Summary: Percentile and Median : Document algorithms used
Product: JMeter - Now in Github Reporter: Philippe Mouawad <p.mouawad>
Component: MainAssignee: JMeter issues mailing list <issues>
Status: NEW ---    
Severity: enhancement CC: abalanonline, ajay.singhes, p.mouawad
Priority: P2    
Version: 3.2   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Philippe Mouawad 2017-05-27 22:47:19 UTC
Issue related to Bug 61071 and Bug 61078
Comment 1 Philippe Mouawad 2017-05-27 22:47:40 UTC
*** Bug 61071 has been marked as a duplicate of this bug. ***
Comment 2 Philippe Mouawad 2017-05-27 22:48:02 UTC
*** Bug 61078 has been marked as a duplicate of this bug. ***
Comment 3 Aleksei Balan 2017-05-28 00:05:41 UTC
Hello Apache community.

I use JMeter almost every day and attach its data to my reports.
That is why I care about accurate results so much.
The median is calculating incorrectly. It is not corresponding to wikipedia example.
https://en.wikipedia.org/wiki/Median (example at the top right corner of the page)
The percentile is calculating incorrectly. It is not corresponding to wikipedia example.
https://en.wikipedia.org/wiki/Percentile (Example 3)
To help with the fixes I provided pull requests for both of them.

And now you are discussing is it a bug or a feature and wondering should something be changed or not.

All right then.
Comment 4 Philippe Mouawad 2017-05-28 06:50:18 UTC
Hello Aleksei,
I didn't want to be rude by closing issue.
First thanks for your time, your PR and work.

I closed the PR for the following reasons:
- My understanding is that on large set of data which should be the case for correctly ran tests, the different percentiles algorithm will lead to similar values. "There is no standard definition of percentile,[2][3][4] however all definitions yield similar results when the number of observations is very large and the probability distribution is continuous"
- As per Felix note, there doesn't seem to be 1 truth
- Changing the algorithm might lead to changes in results that will trigger potentially a lot of "false" issues.


Still maybe there is a better way of fixing the issue, SO I reopened the bugs.
It appears to me we could fix median as per your PR and use Math Percentile setup with R_1 accross all JMeter library.

But I won't touch them myself as I have no firm opinion.

Thank you
Comment 5 Philippe Mouawad 2017-09-02 19:35:03 UTC
*** Bug 61078 has been marked as a duplicate of this bug. ***
Comment 6 Philippe Mouawad 2017-09-02 19:35:10 UTC
*** Bug 61071 has been marked as a duplicate of this bug. ***
Comment 7 Aleksei Balan 2017-09-02 20:42:29 UTC
Hello Apache community,

Can you please review these two pull requests
https://github.com/apache/jmeter/pull/295
https://github.com/apache/jmeter/pull/296

They are fixing some calculation defects. I understand that these errors
affect the results very rarely (especially on big number of samples)
but still I think it is a good idea to have more precise calculations.

Thank you.

Aleksei Balan
Comment 8 Felix Schumacher 2018-03-30 09:53:36 UTC
*** Bug 61725 has been marked as a duplicate of this bug. ***
Comment 9 The ASF infrastructure team 2022-09-24 20:38:09 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/4399