Projects  >  Math.NET Iridium (IRID)

  Issues    

 

 HyperLink  http://tracker.opensourcedotnet.info/Default.aspx?p=2&i=86 
IRID-86 - NormalDistribution Class
Created: 21/09/2007 07:49:25    
Revised: 21/10/2007 04:11:50
   Back to Issue Filter   
      
<< >>
Hi,
I have downloaded your code for my work, it is so amazing. But while using it I have found one bug in it. Actually the class NormalDistribution.cs has incorrect method. That method is InverseCumulativeDistribution. It is not giving the right answer to user. So I have made change it to get right answer, even I have tested it. It's working fine now.
Following is your method:

public double InverseCumulativeDistribution(double x)

{

        return ((_sigma * Constants.Sqrt1_2) * Fn.ErfInverse(2.0 * x - 1.0)) + _mu;

}

According to me it is not giving the exact Inverse Cumulative Distribution of normal distribution.
The change which I have made is as follows:

public double InverseCumulativeDistribution(double x)

{

    return ((_sigma * Constants.Sqrt2) * Fn.ErfInverse(2.0 * x - 1.0)) + _mu;

}
So I hope you will also test it & make the changes in your code so that it will be beneficial for other user.


Thanks,
Reval

 
 
 
Comments (1)Attachments (0)Issue Links (0)History

Christoph Rüegg  

21/10/2007 04:11:50 * CLOSING COMMENT *

Thank you very much for reporting the issue. It indeed was a code bug and is now fixed.

Resolved as Fixed at revision 288.

 

 

Issue ID IRID-86
Type Bug Bug
Priority High High
Severity Major Major
Visibility Everyone 
Assigned To Christoph Rüegg 
Reported By Amit Vadje 
Component Probability Distributions 
Fixed For Version [2008.2.10.364] 2008 February (2008.2.10.364) 
Affected Versions  
Risk Level High 
Status Closed Closed   
Resolution Complete   
Start Date ? 
Due Date ? 
Votes 0  
 Print Friendly