IPython console for SymPy
1.7.dev (Python 3.6.9-64-bit) (ground types: python)
These commands were executed:
>>> from __future__ import division
>>> from sympy import *
>>> x, y, z, t = symbols('x y z t')
>>> k, m, n = symbols('k m n', integer=True)
>>> f, g, h = symbols('f g h', cls=Function)
>>> init_printing()
Documentation can be found at
https://docs.sympy.org/devIn [1]: from sympy.stats import ContinuousRV
In [2]: from sympy import Lambda, log, Pow, exp, symbols, Interval, oo
In [3]: _BETA = 10.56
In [5]: _ETA = -90
In [6]: _ALPHA = 3.11
In [7]: x, beta, alpha, eta = symbols("x, beta, alpha, eta")
In [8]: log_weibull_pdf = ((beta / (alpha * (1 - x - eta))) *
...: (Pow(log(1 - x - eta) / alpha, beta - 1)) *
...: (exp(-Pow(log(1 - x - eta) / alpha, beta))))
In [9]: log_weibull_pdf.subs({beta: _BETA,
...: alpha: _ALPHA,
...: eta: _ETA}
...:
...:
...:
...:
...: )
Out[9]:
10.56
-6.25821230086363e-6⋅log (91 - x) 9.56
6.60867218971199e-5⋅ℯ ⋅log (91 - x)
──────────────────────────────────────────────────────────────────────────
91 - x
In [10]: pdf = _
In [11]: X = ContinuousRV(x, pdf, set=Interval(-oo, -_ETA))
In [12]: X
Out[12]: x
In [14]: from sympy.stats import density
In [15]: density(X)(y)
Out[15]:
⎧ 10.56
⎪ -6.25821230086363e-6⋅log (91 - y) 9.56
⎪6.60867218971199e-5⋅ℯ ⋅log (91 - y)
⎨────────────────────────────────────────────────────────────────────────── f
⎪ 91 - y
⎪
⎩ 0
or y ≥ -∞ ∧ y ≤ 90
otherwise
Is the above what you were trying to do?