[
https://issues.apache.org/jira/browse/MATH-1462?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17373739#comment-17373739
]
Amar Prakash Pandey commented on MATH-1462:
-------------------------------------------
[~erans] I looked into the test to found out the reason why
`{color:#00875a}testMath1462{color}` is failing.
So when we try to compute {color:#00875a}_inverseCumulativeProbability_{color}
with {color:#00875a}_p=0.5_{color} for the given data, then the value of
`{color:#00875a}_cP_{color}` in
{color:#00875a}_inverseCumulativeProbability_{color} function is
{color:#00875a}_1.0_{color}
!Screenshot from 2021-07-03 00-31-54.png!
So to calculate {color:#00875a}_inverseCumulativeProbability_{color}, it calls
the method {color:#00875a}_inverseCumulativeProbability_{color} of
{color:#00875a}_kernel_{color} object with value as {color:#00875a}1d{color}.
Which then calls this method with a value of {color:#00875a}P as 1{color}.
!Screenshot from 2021-07-03 00-34-23.png!
Now for the value of {color:#00875a}1{color}, the {color:#00875a}*inverse error
function*{color} return {color:#00875a}Infinite{color}. because of which we are
facing this issue.
Let me know your thoughts on this. If anything is unclear, let me know.
> EmpiricalDistribution:inverseCumulativeProbability return Infinity
> ------------------------------------------------------------------
>
> Key: MATH-1462
> URL: https://issues.apache.org/jira/browse/MATH-1462
> Project: Commons Math
> Issue Type: Bug
> Affects Versions: 3.6.1
> Reporter: elyes belarbi
> Assignee: Amar Prakash Pandey
> Priority: Critical
> Fix For: 4.0
>
> Attachments: Screenshot from 2021-07-03 00-31-54.png, Screenshot from
> 2021-07-03 00-34-23.png
>
>
> Hi,
> inverseCumulativeProbability(0.5) return "infinity" which is absurd while it
> return correct values for 0.499999 and 0.511111, Here is the test :
> {code:java}
> double[] data = {6464.0205, 6449.1328, 6489.4569, 6497.5533, 6251.6487,
> 6252.6513, 6339.7883,
> 6356.2622, 6222.1251, 6157.3813, 6242.4741, 6332.5347, 6468.0633, 6471.2319,
> 6473.9929, 6589.1322,
> 6511.2191, 6339.4349, 6307.7735, 6288.0915, 6354.0572, 6385.8283, 6325.3756,
> 6433.1699, 6433.6507,
> 6424.6806, 6380.5268, 6407.6705, 6241.2198, 6230.3681, 6367.5943, 6358.4817,
> 6272.8039, 6269.0211,
> 6312.9027, 6349.5926, 6404.0775, 6326.986, 6283.8685, 6309.9021, 6336.8554,
> 6389.1598, 6281.0372,
> 6304.8852, 6359.2651, 6426.519, 6400.3926, 6440.6798, 6292.5812, 6398.4911,
> 6307.0002, 6284.2111, 6271.371, 6368.6377, 6323.3372, 6276.2155,
> 6335.0117, 6319.2466, 6252.9969, 6445.2074, 6461.3944, 6384.1345};
> EmpiricalDistribution ed = new EmpiricalDistribution(data.length);
> ed.load(data);
> double p50 = ed.inverseCumulativeProbability(0.5);
> double p51 = ed.inverseCumulativeProbability(0.51111);
> double p49 = ed.inverseCumulativeProbability(0.49999);
> assertTrue(p51<6350);
> assertTrue(p49<6341);
> assertTrue(p50<7000);
> {code}
> Any clue to fix this ?
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)