Re: Probability

*To*: mathgroup at smc.vnet.net*Subject*: [mg124640] Re: Probability*From*: Bob Hanlon <hanlonr357 at gmail.com>*Date*: Fri, 27 Jan 2012 06:14:58 -0500 (EST)*Delivered-to*: l-mathgroup@mail-archive0.wolfram.com*References*: <201201260824.DAA23859@smc.vnet.net>

The timing difference is due to caching associated with NProbability; however, there are much faster ways of obtaining your result. Timing[1. - PDF[HypergeometricDistribution[58, 11727, 234546], 0]] {0.010423, 0.948968} Timing[1. - Probability[x == 0, x \[Distributed] HypergeometricDistribution[58, 11727, 234546]]] {0.058417, 0.948968} Now with NProbability Timing[1 - NProbability[x == 0, x \[Distributed] HypergeometricDistribution[58, 11727, 234546]]] {261.489, 0.948968} The NProbability timing bill has been paid Timing[NProbability[x > 0, x \[Distributed] HypergeometricDistribution[58, 11727, 234546]]] {0.208077, 0.948968} Bob Hanlon On Thu, Jan 26, 2012 at 3:24 AM, Benedetto Bongiorno <bongiob at sbcglobal.net> wrote: > Can anyone test & explain why this function's timing is substantial longer > the first time it is executed over subsequent times? > > > > Timing[NProbability[x>0,x=E9HypergeometricDistribution[58,11727,234546]]] > > {260.25,0.948968} > > Timing[NProbability[x>0,x=E9HypergeometricDistribution[58,11727,234546]]] > > {0.234,0.948968} > > > > I ran it on two different PC and the difference is the same. > > > > Mathematica V8.04 > > Windows 7, Professional 64 > > > > Benedetto Bongiorno CPA CRE > > Cell 214-707-6546 > > Land 972-470-9138 > > Fax 972-470-9748 > > bongiob at sbcglobal.net > > > > This Email is covered by the Electronic Communications Privacy Act, 18 > U.S.C. Sections 2510-2521 and is legally privileged. The information > contained in this Email is intended only for the use of the individual > or entity named above. If the reader of this message is not the intended > recipient, you are hereby notified that any dissemination, distributions > or copying of this communication is strictly prohibited. If you have > received this communication in error, please notify sender

**References**:**Probability***From:*"Benedetto Bongiorno" <bongiob@sbcglobal.net>