It requires an Interval as the third input parameter , what you are passing
is basically a tuple of two numbers . If you write it as Interval(0,oo)
instead of (0.oo) .
It works fine !
On Tuesday, May 13, 2014 5:44:16 PM UTC+5:30, F. B. wrote:
>
> I tried this:
>
> In [1]: from sympy.stats import ContinuousRV, P
>
> In [2]: var('x')
> Out[2]: x
>
> In [3]: X = ContinuousRV(x, exp(-x), (0, oo))
>
> In [4]: P(X < Rational(1,2))
>
> TypeError: Input must be Sets or iterables of Sets
>
> I get the right answer when avoiding the stats module:
>
> In [6]: var('k')
> Out[6]: k
>
> In [7]: cdf = integrate(exp(-x), (x, 0, k))
>
> In [8]: solve(cdf - Rational(1, 2), k)
> Out[8]: [log(2)]
>
>
>
>
--
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/69212ce1-4a49-4d2c-a13e-562bf18341fc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.