spey.backends.default_pdf.third_moment.compute_third_moments

spey.backends.default_pdf.third_moment.compute_third_moments#

spey.backends.default_pdf.third_moment.compute_third_moments(absolute_upper_uncertainties: ndarray, absolute_lower_uncertainties: ndarray, return_integration_error: bool = False) Tuple[ndarray, ndarray] | ndarray[source]#

Assuming that the uncertainties are modelled as Gaussian, it computes third moments using Bifurcated Gaussian with asymmetric uncertainties.

\[m^{(3)} = \frac{2}{\sigma^+ + \sigma^-} \left[ \sigma^-\int_{-\infty}^0 x^3 \mathcal{N}(x|0,\sigma^-)dx + \sigma^+ \int_0^{\infty} x^3 \mathcal{N}(x|0,\sigma^+)dx \right]\]

Note

Recall that expectation value of the \(k\) th moment of a function \(f(x)\) can be calculated as

\[\mathbb{E}[(\mathbf{X} - c)^k] = \int_{-\infty}^\infty(x-c)^kf(x)dx\]

Attention

third_moment_expansion() function expects \(8\Sigma_{ii}^3 \geq (m^{(3)}_i)^2\) since this function is constructed with upper and lower uncertainty envelops independent of covariance matrix, it does not guarantee that the condition will be satisfied. This depends on the covariance matrix.

Parameters:
  • absolute_upper_uncertainties (np.ndarray) – absolute value of the upper uncertainties

  • absolute_lower_uncertainties (np.ndarray) – absolute value of the lower uncertainties

  • return_integration_error (bool, default False) – If true returns integration error

Returns:

Diagonal elements of the third moments and integration error.

Return type:

Tuple[np.ndarray, np.ndarray] or np.ndarray