Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2011

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: EmpiricalDistribution bug

  • To: mathgroup at smc.vnet.net
  • Subject: [mg123012] Re: EmpiricalDistribution bug
  • From: Mark Fisher <particlefilter at gmail.com>
  • Date: Sun, 20 Nov 2011 05:37:45 -0500 (EST)
  • Delivered-to: l-mathgroup@mail-archive0.wolfram.com
  • References: <201111181122.GAA06440@smc.vnet.net> <ja85ff$ile$1@smc.vnet.net>

On Nov 19, 6:55 am, Andrzej Kozlowski <a... at mimuw.edu.pl> wrote:
> There is also another less awkward workaround:
>
> In[41]:= PDF[EmpiricalDistribution[{1}]][1]
>
> Out[41]= 1
>
> Note that
>
> PDF[EmpiricalDistribution[{1}]]
>
> returns a pure function.
>
> Andrzej Kozlowski
>
> On 18 Nov 2011, at 12:22, Mark Fisher wrote:
>
>
>
>
>
>
>
> > Here is a (bad) bug involving EmpriicalDistribution:
>
> > PDF[EmpiricalDistribution[{1}], 1]
>
> > produces error messages and returns
>
> > Boole[{1}[[GeometricFunctions`BinarySearch[{{1}, "Sorted"}, 1]]] ==
> >   1] {1}[[GeometricFunctions`BinarySearch[{{1}, "Sorted"}, 1]]]
>
> > Here is an (awkward) workaround:
>
> > PDF[EmpiricalDistribution[{1}], x] /. x -> 1
>
> > which returns 1.
>
> > I have submitted this to supp... at wolfram.com, but I'm hoping someone
> > lurking from wolfram will look into this and figure out a code patch
> > that can be applied right away. Thanks.
>
> > --Mark
>
> > "8.0 for Microsoft Windows (64-bit) (October 7, 2011)"

Excellent!



  • Prev by Date: How-to create a mathematica notebook in a Java program ?
  • Next by Date: Re: Timing graphics in the real world
  • Previous by thread: Re: EmpiricalDistribution bug
  • Next by thread: Re: EmpiricalDistribution bug