Problem:

Find the expectation of $-4.2 x^2+5. x+1.9$ where $x \sim $ \text{PoissonDistribution}[0.9]

from sympy import *
from sympy.stats import *

x = Poisson('x', 0.9)
print(E(-4.2*x**2+5.*x+1.9))
