`ClosedFormExpectations.ClosedFormExpectation`

— Type`ClosedFormExpectation`

`ClosedFormExpectations.ExpLogSquare`

— Type`ExpLogSquare(μ, σ)`

ExpLogSquare is a type that represents the exp(-(log(x) - μ)^2/(2σ^2)) function.

`ClosedFormExpectations.Logpdf`

— Type`Logpdf`

The structure to represent the logpdf function of a distribution.

`ClosedFormExpectations.Power`

— TypePower

Power is a type that represents the x^N function.

`ClosedFormExpectations.Square`

— Type`Square`

Square is a type that represents the x^2 function.

`ClosedFormExpectations.xlog2x`

— MethodReturn `x * log(x)^2`

for `x ≥ 0`

, handling $x = 0$ by taking the downward limit.

```
julia> xlog2x(0)
0.0
```

`Statistics.mean`

— Method`mean(::ClosedFormExpectation, f, q)`

Compute the E_q[f(x)] where q is a distribution and f is a function.

`Statistics.mean`

— Method`mean(::ClosedWilliamsProduct, f, q)`

Suppose q is a distribution with density parameterized by θ and f is a function.

Compute the E*q[f(x) ∇*θ log q(x; θ)] where q is a distribution and f is a function.