New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Generating Functions for sympy.stats #6323
Comments
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c1 |
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c2 |
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c3 |
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c4 |
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c5 |
Original comment: http://code.google.com/p/sympy/issues/detail?id=3224#c6 |
Currently sympy/sympy/stats/rv_interface.py Lines 19 to 22 in 3b4c1a6
sympy/sympy/stats/rv_interface.py Lines 197 to 201 in 3b4c1a6
sympy/sympy/stats/rv_interface.py Lines 218 to 222 in 3b4c1a6
sympy/sympy/stats/rv_interface.py Lines 314 to 319 in 3b4c1a6
Lines 969 to 973 in 3b4c1a6
Lines 1002 to 1006 in 3b4c1a6
IMHO, this can be safely closed. Should we close this @Upabjojr @czgdp1807 ? |
Do we have the symbolic class for all of them? It's important to have a class to express unevaluated functions, so we can leave the unevaluated |
For unevaluated results, we can use In [1]: from sympy.stats import *
In [2]: X = Normal('X', 1, 3)
In [3]: moment(X, 4, evaluate=False)
Out[3]:
∞
⌠
⎮ 2
⎮ -(X - 1)
⎮ ──────────
⎮ 4 18
⎮ √2⋅X ⋅ℯ
⎮ ───────────────── dX
⎮ 6⋅√π
⌡
-∞
In [4]: moment(X, 4)
Out[4]: 298
In [5]: cmoment(X, 3, evaluate=False)
Out[5]:
∞
⌠
⎮ 3
⎮ ⎛ ∞ ⎞
⎮ ⎜ ⌠ ⎟
⎮ ⎜ ⎮ 2 ⎟
⎮ ⎜ ⎮ -(X - 1) ⎟ 2
⎮ ⎜ ⎮ ────────── ⎟ -(X - 1)
⎮ ⎜ ⎮ 18 ⎟ ──────────
⎮ ⎜ ⎮ √2⋅X⋅ℯ ⎟ 18
⎮ √2⋅⎜X - ⎮ ──────────────── dX⎟ ⋅ℯ
⎮ ⎜ ⎮ 6⋅√π ⎟
⎮ ⎜ ⌡ ⎟
⎮ ⎝ -∞ ⎠
⎮ ──────────────────────────────────────────── dX
⎮ 6⋅√π
⌡
-∞
In [6]: cmoment(X, 3)
Out[6]: 0
In [7]: factorial_moment(X, 2)
Out[7]: 9
In [8]: factorial_moment(X, 2, evaluate=False)
Out[8]:
∞
⌠
⎮ 2
⎮ -(X - 1)
⎮ ──────────
⎮ 18
⎮ √2⋅X⋅(X - 1)⋅ℯ
⎮ ──────────────────────── dX
⎮ 6⋅√π
⌡
-∞
|
Is there a |
That is returning the unevaluated integral, that is not the unevaluated |
Sure I get it, It Will be nice additions. |
Original issue for #6323: http://code.google.com/p/sympy/issues/detail?id=3224
Original author: https://code.google.com/u/109882876523836932473/
The text was updated successfully, but these errors were encountered: