Generally when debugging sympy.stats I recommend inspecting the integrals that it produces using the evaluate=False keyword. Sympy.stats almost always shoves off most of the hard work onto another SymPy module like integrals.
In [1]: from sympy.stats import * In [2]: X = ContinuousRV(x, exp(-x), Interval(0, oo)) In [3]: P(X < log(2), evaluate=False) Out[3]: 0 ⌠ ⎮ -z ⎮ ℯ ⎮ ─── dz ⎮ 2 ⌡ -∞ On Wed, May 14, 2014 at 11:21 AM, Aaron Meurer <[email protected]> wrote: > That looks like an issue in the integration module. There should be > some way to get the integral that it computes, so that we can debug > from there. > > Aaron Meurer > > On Wed, May 14, 2014 at 2:24 AM, F. B. <[email protected]> wrote: > > Sorry again, I wasn't using the latest version from master, in any case: > > > > In [1]: from sympy.stats import * > > > > In [2]: from sympy import * > > > > In [3]: ;var x > > Out[3]: x > > > > In [4]: X = ContinuousRV(x, exp(-x), Interval(0, oo)) > > > > In [5]: P(X < log(2).n()) > > Out[5]: 0.500000000000000 > > > > In [6]: P(X < log(2)) > > Out[6]: oo > > > > > > I would expect 1/2 as Out[6] > > > > -- > > You received this message because you are subscribed to the Google Groups > > "sympy" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > To post to this group, send email to [email protected]. > > Visit this group at http://groups.google.com/group/sympy. > > To view this discussion on the web visit > > > https://groups.google.com/d/msgid/sympy/5024a59c-5ef1-480e-a1ce-e30b4c25d1f7%40googlegroups.com > . > > > > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "sympy" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/sympy. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/CAKgW%3D6%2BvrUtKCu1fU_78Hy7jYXLxWTE6V-YdOvrhBWtQ9T6_Cg%40mail.gmail.com > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAJ8oX-Gu0YPhVxUMVXfhqC3QXaAvUU7PDggp83M_CpmDnZ7VcA%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
