On Tuesday, May 13, 2014 8:02:22 PM UTC+2, Abhishek K Das wrote:
>
> 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 ! 
>
>
 
In [4]: X = ContinuousRV(x, exp(-x), Interval(0, oo))

In [5]: P(X < Rational(1,2))
Out[5]: 
   -1/2    
- ℯ     + 1

In [15]: integrate(exp(-x), (x, 0, P(X < Rational(1,2))))
Out[15]: 
         -1/2    
   -1 + ℯ        
- ℯ           + 1


Is that the right answer? I thought it would be log(2)

In [18]: integrate(exp(-x), (x, 0, log(2)))
Out[18]: 1/2


I mean, the area below the probability function from 0 to log(2) is 1/2. 
Right?

-- 
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/37022f20-535c-47fe-82c0-a746e1198989%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to