commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kalpa rajadurai <arka...@gmail.com>
Subject NormalDistribution
Date Sat, 20 Feb 2010 12:47:37 GMT
Hi Team,

We are working on a small project in designing a web based statistical
calculator, supporting certain distribution functions.

we used  method *cummulativeProbability(double x)* of *class
NormalDistributionImpl* for implementing Normal distribution function.

We tried to cross check Apache API's result with that of OpenOffice Calc and
Excel's result. In most of the cases, the results matched with each other.
But in certain rare cases, the cumulativeProbability() method returned by
slightly different result when compared to the result returned by NORMDIST()
function of openoffice calc and Excel.

Here goes the illustration of the case where we found the mismatch in
results:

*Using Apache's API:*
NormalDistribution normDist = new NormalDistributionImpl(40,1.5)
;
try{
System.out.println("cummulative probability::
"+normDist.cumulativeProbability(0.908789));
}
catch(MathException e){
e.printStackTrace();
}

*Result:*
cummulative probability:: *-8.104628079763643E-15*

*Using openoffice calc:*
Same input values given in openoffice calc using the formula:
*=NORMDIST(0.908789;40;1.5;1)*

*Result:*
*0.0*

*Using Microsoft Excel:*
Same input values given in excel using the formula:
*=NORMDIST(0.908789;40;1.5;1)*

*Result:*
*5.0738E-150*

*Different results:*
Apache  -8.104628079763643E-15
Openoffice 0.0
Excel 5.0738E-150

We wish to know the following things,
1.) What is the reason for this variation in results?
2.) Which result is more accurate?
3.) Is there any possibility to get the same results as Open Office or Excel
for this case, using Apache's API?

Hope to receive reply from your team at the earliest as possible.
Thanks in Advance

-- 
Karpaga R

"Did you always know that?"
"No, I didn't. But I believed"
 ---Matrix III

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message