Status: Accepted
Owner: ----
CC: [email protected]
Labels: Type-Defect Priority-Medium Integration

New issue 3016 by [email protected]: Integrals involving symbolic Beta distributions hang
http://code.google.com/p/sympy/issues/detail?id=3016

Some statistical integrals involving beta distributions fail. The integrals hang. I've included the sympy.stats code as well as copy-paste-able integral expressions and their expected results.

a, b, x = symbols('a b x', positive=True)
B = Beta(a,b, symbol=x)
E(B, evaluate=False)
Integral(x*x**(a - 1)*(-x + 1)**(b - 1)*gamma(a + b)/(gamma(a)*gamma(b)), (x, 0, 1))

E(B)
Hangs

Should evaluate to
a / (a + b)

Similarly
Var(B) should equal (a*b) / ((a+b)**2 * (a+b+1))
Var(B, evaluate=False)
-Integral(x*x**(a - 1)*(-x + 1)**(b - 1)*gamma(a + b)/(gamma(a)*gamma(b)), (x, 0, 1))**2 + Integral(x**2*x**(a - 1)*(-x + 1)**(b - 1)*gamma(a + b)/(gamma(a)*gamma(b)), (x, 0, 1))


--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to