June 22, 2026
©This is an open access article under the terms of the Creative Commons Attribution-NonCommercial License, which permits use, distribution and reproduction in any medium, provided the
original work is properly cited and is not used for commercial purposes.
© 2024 The Author(s) AIChE Journal published by Wiley Periodicals LLC on behalf of American Institute of Chemical Engineers.
In Statistics, the logistic transformation is one of the most common used, foremost in the context of logistic regression for binary, binomial and multinomial data, but also implicitly in Bayesian versions of negative binomial regression. In this paper, we focus on problems where the inverse logit function has been applied to a normal random variable \(X\), with realisation \(x \sim \mathcal{N}(\mu,\sigma^2)\) and hence the random variable \(P := (1+e^{-X})^{-1}\) is distributed logit-normal with parameters \(\mu, \sigma^2\). In frequentist inference, such random variables, including powers of, appear in logistic random intercept models when the link function \(\boldsymbol{\theta}_i\) in cluster \(i\) has the form \(\boldsymbol{\theta}_i ={\boldsymbol{X}}_i\boldsymbol{\beta} + {\boldsymbol{u}}_i, {\boldsymbol{u}} \sim \mathcal{N}(0,\sigma^2_u{\boldsymbol{I}})\). In this setting, logit-normal random variables appear in the marginal likelihood of \(\boldsymbol{\beta}\) [1], [2]. Additionally, the (marginal) response probability in a frequentist treatment of any logistic mixed model is a mean of a logit-normal random variable. In Bayesian inference, logit-normal random variables, including powers of, appear implicitly in Variational Bayes [3]–[5] and Expectation Propagation [6], [7] algorithms used to determine parameters of approximate posteriors in logistic and negative binomial regression.
Despite the need to find a collection of logit-normal moments in many inferential problems, such moments are poorly understood, and assumed analytically unknown. As a result, literature on the logit-normal distribution that discusses moments splits into disconnected strands. One strand gives up on attempting to find analytic formulae for any logit-normal moments, instead promoting the use of standard numerical integration techniques [8], [9]. The second, usually buried in textbooks, are approximations of the first moment based on similarity of the logit and probit link or between the normal and logistic distributions [10], [11]. The last, pioneered in [12], [13] and updated in [14], starts from the expected value of a logit-normal random variable, \(E(P)\), being a special case of the Mordell integral [15] from complex analysis, but restricted to the real numbers. While the Mordell integral based representation of \(E(P)\) given in [14] can be combined with other properties of the logit-normal distribution to determine higher order moments, in practice Mordell integral based estimates of \(E(P)\), and thus higher moments, become numerically unstable when \(|\mu/\sigma^2| \rightarrow \infty\). Moreover, the repeated application of the quotient rule from Calculus needed to find higher order moments from the Mordell integral representation of \(E(P)\) rapidly becomes algebraically very complicated.
In this paper, we change tack from [14], and no longer attempt to estimate moments starting from the Mordell integral representation of \(E(P)\). Instead, we focus on constructing highly accurate approximations of the logistic function and its derivatives using an basis of exponential functions. This allows us to not just determine an approximation for \(E(P)\) but also easily develop a proposition to find the \(k^\text{th}\) non-central moment, \(k \in \mathbb{Z}^+\). We will show our approximations, unlike Mordell integral representations, are numerically stable when \(|\mu/\sigma^2| \rightarrow \infty\). We will show our method is faster to compute than standard numerical integration in the programming language R . However, we will also show the number of terms needed for accurate approximation increases with moment order. Unfortunately, in practice the number of moments our method can calculate has an upper bound around 8. This limits the utility of our method for evaluation of the logistic-normal integral. Nevertheless, getting to the \(8^\text{th}\) moment is more than sufficiently high, which we will illustrate with an example, for performing expectation propagation in logistic regression.
To justify our interest in the logit-normal distribution, we will provide two illustrative inferential problems, one frequentist, the other Bayesian, where a collection of logit-normal moments are needed in order to estimate parameters. First though, we need to define the logit-normal distribution and some of its properties.
A logit-normal distributed random variable \(P\) with realisation \(p \sim \text{logit}N(\mu,\sigma^2)\) has probability density (pdf), \[f(p|\mu,\sigma^2) = \frac{1}{\sigma p(1-p)\sqrt{2\pi}}e^{-\frac{(\text{logit}(p)-\mu)^2}{2\sigma^2}}, \quad p \in (0,1), \text{logit}(p) = \log\bigg(\frac{p}{1-p}\bigg) \label{eq146o}\tag{1}\]
To determine the moments \(k = 1, 2, \ldots\), of \(P\) we will work with the following representations of the \(k^\text{th}\) moment, \[\begin{align} E(P^k) &=& \frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} (1+e^{-x})^{-r}e^{-\frac{z^2}{2}} e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x = \frac{1}{\sqrt{2\pi}}\int_{-\infty}^{\infty} (1+e^{-\mu-\sigma z})^{-r}e^{-\frac{z^2}{2}} {\rm d}z, \label{eq4} \end{align}\tag{2}\] where \(x \sim N(\mu,\sigma^2), z \sim N(0,1)\). However in practice, to find higher order moments of \(P\), \(E(P^2), E(P^3), \ldots\), it is easier to use the recurrence relation given in [14]. This is found by taking the derivative of \(E(P^k)\) with respect to \(\mu\), where \(E(P^k)\) is in the form of (2 ), \[\begin{align} \frac{{\rm d}E(P^k)}{{\rm d}\mu} &=& \frac{1}{\sqrt{2\pi}}\int_{-\infty}^\infty \frac{ {\rm d} (1+e^{-\mu - \sigma z})^{-k} }{{\rm d}\mu} e^{-\frac{z^2}{2}} {\rm d}z \nonumber \\ &=& \frac{k}{\sqrt{2\pi}}\int_{-\infty}^\infty \{(1+e^{-\mu - \sigma z})^{-k}- (1+e^{-\mu - \sigma z})^{-(k+1)}\}e^{-\frac{z^2}{2}} {\rm d}z \tag{3} \nonumber \\ &=& k\{E(P^k) - E(P^{k+1})\}, \tag{4} \\ E(P^{k+1}) &=& E(P^k) - \frac{1}{k} \frac{{\rm d}E(P^k)}{{\rm d}\mu}. \tag{5} \end{align}\] Thus the main challenge for determining logit-normal moments is evaluating the first moment or expected value in a form such that applying the recurrence relation in (5 ) is straightforward for any choice of \(k\).
In order to perform inference in frequentist treatments of a logistic mixed model, the marginal likelihood, \(L(\boldsymbol{\beta}, \boldsymbol{\Sigma})\) is usually needed. This likelihood, where \(\boldsymbol{\beta}\) is a length \(p\) vector of fixed effects, and \(\boldsymbol{\Sigma}\) is a \(q \times q\) positive definite matrix of (co)-variance components is, \[L(\boldsymbol{\beta}, \boldsymbol{\Sigma}) \propto \int \prod_{i=1}^n {\boldsymbol{p}}_i^{{\boldsymbol{y}}_i}(1-{\boldsymbol{p}}_i)^{1-{\boldsymbol{y}}_i} |{\boldsymbol{\Sigma}}|^{-1/2}e^{-{\boldsymbol{u}}'{\boldsymbol{\Sigma}}^{-1}{\boldsymbol{u}}/2}{\rm d}{\boldsymbol{u}}\label{eqGLMM}\tag{6}\] In (6 ), \({\boldsymbol{p}}_i = (1+e^{-{\boldsymbol{x}}_i'\boldsymbol{\beta} - {\boldsymbol{z}}_i'{\boldsymbol{u}}})^{-1}\) [1], [16] are the elements of the \(n\) length vector of success probabilities, where \({\boldsymbol{x}}_i, {\boldsymbol{z}}_i\) correspond to the covariate values for observation \(i\) while \({\boldsymbol{u}}\) is a \(q\) length vector of random effects. In the special case where \({\boldsymbol{u}}\) corresponds to a random intercept, and all observations; \(j =1, \ldots {\boldsymbol{n}}_i\), within each random effect level share the same fixed effect covariate vector, [17], [18] then the marginal likelihood simplifies to, \[\begin{align} L(\boldsymbol{\beta}, \boldsymbol{\Sigma}) &=& \prod_{i=1}^q L_i(\boldsymbol{\beta}, \boldsymbol{\Sigma}), \quad \text{where } L_i(\boldsymbol{\beta}, \boldsymbol{\Sigma}) = \int {{{\boldsymbol{n}}_i}\choose{ {\boldsymbol{y}}_i}} {\boldsymbol{p}}_i^{{\boldsymbol{y}}_i}(1-{\boldsymbol{p}}_i)^{n_i-{\boldsymbol{y}}_i} \frac{1}{\sqrt{2\pi\sigma^2_u}}e^{-\frac{ {\boldsymbol{u}}_i^2}{2\sigma^2} }{\rm d}{\boldsymbol{u}}. \label{eqGLMM2} \end{align}\tag{7}\] By the binomial theorem, \({\boldsymbol{p}}_i^{{\boldsymbol{y}}_i}(1-{\boldsymbol{p}}_i)^{n_i-{\boldsymbol{y}}_i}\) can be rewritten as \[{\boldsymbol{p}}_i^{{\boldsymbol{y}}_i} \sum_{k=0}^{ {\boldsymbol{n}}_i-{\boldsymbol{y}}_i} {{{\boldsymbol{n}}_i-{\boldsymbol{y}}_i}\choose{k}} (-{\boldsymbol{p}}_i)^k = \sum_{k={\boldsymbol{y}}_i}^{{\boldsymbol{n}}_i} {{{\boldsymbol{n}}_i-{\boldsymbol{y}}_i}\choose{k -{\boldsymbol{y}}_i}} (-1)^{k-{\boldsymbol{y}}_i}{\boldsymbol{p}}_i^k. \label{pbinom}\tag{8}\] Substituting (8 ) into (7 ) implies that \(L_i(\boldsymbol{\beta}, \boldsymbol{\Sigma})\) as defined in (7 ) corresponds to a linear combination of logit-normal moments from order \({\boldsymbol{y}}_i\) to \({\boldsymbol{n}}_i\) with location parameter \({\boldsymbol{x}}_i\boldsymbol{\beta}\) and scale parameter \(\sigma_u\). As the value of \({\boldsymbol{n}}_i\) is arbitrary, this example provides our motivation to find a formula for a logit-normal moment of any positive integer order.
Note the model we are describing is also known as an observation level random effect model, often seen in ecology [19].
Expectation Propagation (EP) is a method of approximate Bayesian inference introduced by Minka [6], [7]. In EP, it is assumed the posterior distribution \(p(\boldsymbol{\theta}|{\boldsymbol{y}})\) can be factorised as, \[p(\boldsymbol{\theta}|y_1, \ldots y_n) = \prod_{i=0}^n f_i(\boldsymbol{\theta}),\]
where \(i\) represents a data-point. As the posterior is proportional, up to a constant, to likelihood \(\times\) prior, the natural choice for \(f_i(\boldsymbol{\theta})\) is that when \(i=0\), \(f_i(\boldsymbol{\theta})\) will be proportional to the prior distribution \(p(\boldsymbol{\theta})\), while for \(i = 1, 2, \ldots n\), \(f_i(\boldsymbol{\theta})\) will be proportional to the likelihood of data-point \(i\), \(p(y_i|\boldsymbol{\theta})\). The true posterior \(p(\boldsymbol{\theta}|y_1, \ldots y_n)\) is then approximated with the density \(g(\boldsymbol{\theta})\) such that \(g(\boldsymbol{\theta}) = \prod_{i=0}^ng_i(\boldsymbol{\theta})\). The parameters of the approximate posterior \(g(\boldsymbol{\theta})\) are found by minimising the following Kullback-Leibler divergence \(D_{KL}\{cg_{-i}(\boldsymbol{\theta})f_i(\boldsymbol{\theta})||g(\boldsymbol{\theta})\} =\) \[\int cg_{-i}(\boldsymbol{\theta})f_i(\boldsymbol{\theta}) \{\log(cg_{-i}(\boldsymbol{\theta})f_i(\boldsymbol{\theta}))-\log(g(\boldsymbol{\theta}))\} {\rm d}\boldsymbol{\theta},\] where \(c\) is a normalising constant.
In a generalised linear model (GLM) with fixed dispersion parameter, such as logistic regression, the parameters \(\boldsymbol{\theta}\) are simply the vector of regression coefficients \(\boldsymbol{\beta}\). In this case, the obvious choice is to assume the approximate posterior is normal \(g(\boldsymbol{\beta}) := \mathcal{N}(\boldsymbol{\beta}|\hat{\boldsymbol{\beta}}, \hat{\boldsymbol{\Sigma}})\). In the resulting moment matching algorithm used to determine \(\hat{\boldsymbol{\beta}}, \hat{\boldsymbol{\Sigma}}\) (see [20] for details), the following univariate integrals must be evaluated, \[E_k = \int \boldsymbol{\eta}_i^kg_{-i}(\boldsymbol{\eta}_i)f_i(\boldsymbol{\eta}_i) {\rm d}\boldsymbol{\eta}_i, \quad k = 0, 1, 2, \label{eq46EP}\tag{9}\] where if \(i = 1, \ldots, n\), \(\boldsymbol{\eta}_i = {\boldsymbol{x}}_i'\boldsymbol{\beta}\), \(g_{-i}(\boldsymbol{\eta}_i)\) is a normal density with mean \(\mu_i={\boldsymbol{x}}_i'\hat{\boldsymbol{\beta}}\) and variance \(\sigma^2_i={\boldsymbol{x}}_i'\hat{\boldsymbol{\Sigma}}{\boldsymbol{x}}_i\) and \(f_i(\boldsymbol{\eta}_i)\) is the likelihood term associated with observation \(i\). In most cases, including logistic regression, \(E_k\) is evaluated using numerical integration methods. This is often emphasised for logistic regression, for example in [21], [22] and [23], because the alternative of probit regression is one case where \(E_k\) is analytically known.
To demonstrate that in binary logistic regression, (9 ) is equivalent to a collection of logit-normal moments, we need to re-write (9 ) using repeated application of Stein’s Lemma [24], which states:
If \(X \sim N(\mu,\sigma^2)\), and \(h\) a differentiable function applied to \(X\), then \[\begin{align} \sigma^2E(h'(X)) &=& E((X-\mu)h(X)), \end{align}\] where \(h'(x)\) is the derivative of \(h\) with respect to \(x\).
This leads to an alternative set of univariate integrals for solve in the EP moment matching, as stated below.
The moment matching step in EP for a GLM problem, when \(g(\boldsymbol{\beta})\) is assumed normal, and \(\boldsymbol{\eta}_i = {\boldsymbol{x}}_i'\boldsymbol{\beta}\) can be alternatively solved by finding the integrals \[\begin{align} I_k &=& \int g_{-i}(\boldsymbol{\eta}_i)f_i^{(k)}(\boldsymbol{\eta}_i) {\rm d}\boldsymbol{\eta}_i \quad k = 0, 1, 2 \label{EPeqnew} \end{align}\tag{10}\] where \(f_i^{(k)}(\boldsymbol{\eta}_i)\) is the \(k^\text{th}\) derivative of \(f_i(\boldsymbol{\eta}_i)\). The equations needed to back-transform from (10 ) to (9 ) are \(E_0 = I_0, E_1 = \mu_iI_0 + \sigma^2_iI_1, E_2 = (\mu_i^2+\sigma^2_i)I_0 + 2\mu_i\sigma^2_iI_1 + \sigma^4_iI_2\).
A derivation can be found in the appendix.
For a binary logistic regression, \(f_i(\boldsymbol{\eta}_i)\) corresponds to \({\boldsymbol{p}}_i = (1+ e^{-{\boldsymbol{x}}_i'\boldsymbol{\beta}})^{-1}\), a logit-normal random variable with location parameter \({\boldsymbol{x}}_i'\hat{\boldsymbol{\beta}}\) and scale parameter \(\sqrt{{\boldsymbol{x}}_i'\hat{\boldsymbol{\Sigma}}{\boldsymbol{x}}_i}\) when \(y_i = 1\). When \(y_i = 0\), \(f_i(\boldsymbol{\eta}_i)= 1 - {\boldsymbol{p}}_i\), i.e. 1 minus a logit-normal variable. Lastly, we need an additional result, used to justify the reparametrisation trick used in machine learning [25],
If \(X \sim N(\mu,\sigma^2)\), and \(h\) a differentiable function applied to \(X\), then \[\begin{align} \frac{{\rm d}E(h(X))}{{\rm d}\mu} &=& E(h'(X)), \end{align}\] where \(h'(x)\) is the derivative of \(h\) with respect to \(x\).
Using Result [hxExpect], we can re-write \(I_k\) as \(\frac{\rm d}{{\rm d} \mu^k}\big\{ \int g_{-i}(\boldsymbol{\eta}_i)f_i(\boldsymbol{\eta}_i) {\rm d}\boldsymbol{\eta}_i \big\}; k = 1, 2\). For a binary logistic regression, this means determining the approximate EP posterior requires finding a set of \(n\) logit-normal first moments, \(E({\boldsymbol{p}}_i)\) along with its two derivatives w.r.t \(\mu _i = {\boldsymbol{x}}_i'\hat{\boldsymbol{\beta}}\). By the recurrence relation given in (4 ), this is equivalent to finding the first three moments of \(n\) logit normal random variables. Hence, even if analytic evaluation of logit-normal moments of arbitrary order proves impossible, the case of expectation propagation demonstrates determining formulae for a collection of low order logit-normal moments would remain valuable for inferential problems.
In theory, [14] provided a somewhat user friendly analytic expression for \(E(P)\). This states the first moment, or expected value is: \[E(P) = \frac{1}{2} + \frac{\sum_{n=1}^\infty e^{-{\sigma^2n^2}/{2}}\sinh(n\mu)\tanh(\frac{n\sigma^2}{2}) + {2\pi}/{\sigma^2}\sum_{n=1}^{\infty}\frac{e^{-{(2n-1)^2\pi^2}/{2\sigma^2}}\sin\{(2n-1)\pi\mu/{\sigma^2}\}}{\sinh\{{(2n-1)\pi^2}/{\sigma^2}\}} }{1+2\sum_{n=1}^\infty e^{-{\sigma^2n^2}/{2}}\cosh(n\mu)}. \label{EP46new}\tag{11}\]
In practice though, the inclusion of \(\cosh(n\mu)\) and \(\sinh(n\mu)\) terms in (11 ) makes this expression for \(E(P)\), and implicitly for all higher order moments unusable in some cases. As \(n \rightarrow \infty\), these terms, unless \(\mu =0\), will blow out to \(\pm \infty\) as \(\cosh(n\mu) \rightarrow \infty \forall \mu \in \mathbb{R}\backslash \{0\}\) and \(1\) if \(\mu = 0\) and \(\sinh(n\mu) \rightarrow \infty \text{ if } \mu > 0, -\infty \text{ if } \mu < 0\) and \(0\) if \(\mu = 0\). While the \(\cosh(n\mu), \sinh(n\mu)\) terms in (11 ) are multiplied by \(e^{-{\sigma^2n^2}/{2}}\), which goes to zero as \(n \rightarrow \infty\) as \(\sigma^2 > 0\), if \(|\mu/\sigma^2|\) is large \(|\cosh(n\mu)|,|\sinh(n\mu)| \rightarrow \infty\) at a lower value of \(n\) than \(e^{-{\sigma^2n^2}/{2}} \rightarrow 0\), causing numerical instability.
For the calculation of moments, [14] developed a truncated version of (11 ) based on the decay of the component series which defined the maximum index \(N\) in the truncation as \(N = \max(\text{ceiling}(|\mu/\sigma^2 -\sqrt{2\log(1/\epsilon)}/\sigma|),\text{ceiling}(|\mu/\sigma^2 +\sqrt{2\log(1/\epsilon)}/\sigma|), \text{ceiling}(1/2 + \sigma\sqrt{\log(2/\epsilon)/2}/\pi))\), with \(\epsilon = 1 \times 10^{-4}\). To illustrate why this truncation method will break down because of the inclusion of \(\cosh(n\mu), \sinh(n\mu)\) terms, consider the case where \(\mu =1 \Leftrightarrow \text{Median}(P) = 0.7311\) to 4 d.p., \(\forall \sigma^2 \in \mathbb{R}^+\). We wish to calculate \(E(P)\) for \(\sigma^2= (1, 0.1, 0.01, 0.001) \Leftrightarrow \sigma = (1, 0.3162, 0.1, 0.0316)\) and will use both numerical integration and the truncated sum version of (11 ). Results of the calculation in R , including the largest index used in the truncated sum are given in Table 1.
| \(\sigma\) | Numerical Integration | Truncated sum | \(N\) | ||||
|---|---|---|---|---|---|---|---|
| 1 | 0.6967 | 0.6967 | 6 | ||||
| 0.3162 | 0.7267 | 0.7267 | 24 | ||||
| 0.1 | 0.7306 | 0.7306 | 143 | ||||
| 0.0316 | 0.7310 | NaN | 1136 | ||||
| Performance of Truncated sum at calculating \(E(P)\) for varying \(N\) when \(\mu =1, \sigma^2 =0.001 \Rightarrow E(P) = 0.7310\). | |||||||
| \(N = 400\) | \(N = 450\) | \(N = 500\) | \(N =550\) | \(N = 600\) | \(N = 650\) | \(N = 700\) | \(N =750\) |
| 0.5984 | 0.6103 | 0.6221 | 0.6337 | 0.6452 | 0.6565 | 0.6676 | NaN |
Importantly when \(\mu=1, \sigma = 0.0316\), where the highest index in the truncated sum is \(N =1136\), the representation of \(E(P)\) given in (11 ) could not give a meaningful evaluation. Changing the truncation value \(N\) used in the calculation of \(E(P)\), as shown in the later rows of Table 1, we found the breakdown value of \(N\) occurred before an accurate estimate of \(E(P)\) was found.
We could try to get around this by working, when \(\mu > 0\), with \[\begin{align} e^{-\frac{\sigma^2n^2}{2}+\log(\sinh(n\mu))+\log(\tanh(\frac{n\sigma^2}{2}))} &=& e^{-\frac{\sigma^2n^2}{2}-\log(2) +n\mu+\log(1-e^{-2n\mu})+\log(\tanh(\frac{n\sigma^2}{2}))} \nonumber \\ e^{-\frac{\sigma^2n^2}{2}+\log(\cosh(n\mu))} &=& e^{-\frac{\sigma^2n^2}{2}-\log(2)+n\mu+\log(1+e^{-2n\mu})}\nonumber \end{align}\] and \(e^{-\frac{\sigma^2n^2}{2}-\log(2) -n\mu+\log(1-e^{2n\mu})+\log(\tanh(\frac{n\sigma^2}{2}))}, e^{-\frac{\sigma^2n^2}{2}-\log(2)-n\mu+\log(1+e^{2n\mu})}\) when \(\mu < 0\). However, the high value of \(N\) needed when \(\sigma \rightarrow 0\) indicates (11 ) would no longer always out-perform numerical integration on speed. Hence we must conclude the Mordell integral based representation of \(E(P)\) in (11 ) is unsuitable for use in inferential problems, such as those discussed in sections 2.2 and especially 2.3. Hence we need to develop an alternative method for evaluating logit-normal moments.
Our new approach for determining the moments of the logit-normal distribution is motivated by [26]. This work included an approximation the evidence lower bound (ELBO), the expected value of the joint distribution with respect to the approximate posterior for a variational Bayes implementation of logistic regression. For Bernoulli/binomial likelihoods with a normal distribution for the approximate posterior this bound contains \[\begin{align} E(S) = E(\log(1+e^X)),\label{softplus46new} \end{align}\tag{12}\] where \(X\sim \mathcal{N}(\mu,\sigma^2)\), and \(S = \log(1+e^X)\) is also known as the softplus function [27].
Our interest in the softplus function, \(s(x)= \log(1+e^x)\), is that its first derivative is the logistic function, \[s'(x) = {e^x}/{(1+e^x)} = (1+e^{-x})^{-1} = p(x).\] If \(x\) is a realisation of a normal random variable with mean \(\mu\) and variance \(\sigma^2\), then \(p(x)\) is a realisation of a logit-normal random variable. This means that \(E(p(X)) = E(P)\), the expected value of a logit normal random variable with location and scale parameters \(\mu\) and \(\sigma\) respectively.
The properties of the softplus function we need are those used to approximate \(E[s(X)]\) in [26]. First, we split \(s(x) = \log(1 +e^x)\) into even and odd functions. For this, start by rewriting \(s(x)\) as \[\begin{align} s(x) = \log(1+e^x) = \log[(e^{-x} + 1)e^x] = \log(1+e^{-x}) + \log(e^x) = x + \log(1 + e^{-x}), \label{otherSPdef} \end{align}\tag{13}\] then express \(s(x)\) as a piece-wise function using \(s(x) = \log(1+e^x)\) when \(x < 0\) and (13 ) when \(x \geq 0\), i.e. \[\begin{align} s(x) = \log(1+e^x) &=& \begin{cases} \log(1+e^x) \quad \text{If x < 0} \\ x+ \log(1+e^{-x}) \quad \text{If x \geq 0} \\ \end{cases} \end{align}\] or more compactly \[\begin{align} s(x) = x\mathbb{1}_{x > 0} + \log(1+e^{-|x|}), \label{rampSP} \end{align}\tag{14}\] where \(x\) is an odd, and \(\log(1+e^{-|x|})\) is an even function. Taking the derivative of \(s(x)\) as written in (14 ), we get an alternative representation of the logistic function, \[\begin{align} p(x) = (1+e^{-x})^{-1} = \mathbb{1}_{x>0} + (-1)^{\mathbb{1}_{x>0}}(1+e^{-|x|})^{-1}. \label{rampimpliedL} \end{align}\tag{15}\]
To complete the transformation of \(s(x), p(x)\) into a form where we can take approximate expectations analytically, we used the Maclaurin series of \(\log(1+y)\) [26], \[\begin{align} \log(1+y) = \sum_{i=1}^\infty \frac{(-1)^{i-1}y^i}{i}. \label{MSlog1y} \end{align}\tag{16}\]
The Maclaurin series for \(\log(1+y)\) is convergent when \(|y| \leq 1\), and as we assume \(y = e^{-|x|}, x \in \mathbb{R}\), (16 ) is a convergent series \(\forall x\). Hence we will work with the softplus and logistic functions in the following form, \[\begin{align} s(x) = \log(1+e^x) &\approx& x\mathbb{1}_{x > 0} + \sum_{i=1}^N \frac{(-1)^{i-1}e^{-i|x|}}{i}, \tag{17} \\ p(x) = (1+e^{-x})^{-1} &\approx& \mathbb{1}_{x > 0} + (-1)^{\mathbb{1}_{x>0}}\sum_{i=1}^N (-1)^{i-1}e^{-i|x|}.\tag{18} \end{align}\]
This will be our starting point for determining the moments of the logit-normal distribution.
We now will establish a naive copying of [26], i.e. using (18 ), will not lead to a good approximation of \(p(x)\) for all \(x \in \mathbb{R}\). Consider \(p(x)\) when \(x = 0\), which we know is equal to 0.5. In this case the approximation of \(p(x)\) given in (18 ) can be simplified as \[\begin{align} p(x) \approx (-1)^{\mathbb{1}_{x>0}}\sum_{i=1}^N (-1)^{i-1},\label{ramplogisticKomo2} \end{align}\tag{19}\] where \(\sum_{i=1}^\infty (-1)^{i-1}\) is a divergent series whose partial sums oscillate between \(1\) if \(N\) is odd, and 0 if \(N\) is even. More generally, (18 ) contains a modified finite geometric series truncated at \(N-1\) with \(r = -e^{-|x|}\), \[\begin{align} \sum_{i=1}^N (-1)^{i-1}e^{-i|x|} = e^{-|x|}\sum_{i=0}^{N-1} (-e^{-|x|})^i = -r \sum_{i=0}^{N-1}r^i.\label{ramplogisticKomo3} \end{align}\tag{20}\] To determine \(E(P)\), we want to estimate \({-r}/{(1-r)}\), but \(-r \sum_{i=0}^{N-1}r^i\) estimates \({-r(1-r^N)}/{(1-r)}\). The resulting error in the approximation of \(p(x)\) in (18 ) is \({(-1)^{N}e^{-(N+1)|x|}}/{(1+e^{-|x|})}\). The absolute error function of \(p(x)\), \({e^{-(N+1)|x|}}/{(1+e^{-|x|})}\), when approximated by (18 ), is a product of two functions, \(e^{-N|x|}\), \({e^{-|x|}}/{(1+e^{-|x|})}=(1+e^{|x|})^{-1}\), that are monotonely decreasing with respect to \(|x|\). This means the absolute error in the approximation of \(p(x)\) accumulates in the region near \(x \rightarrow 0\) or equivalently \(p(x) \rightarrow 0.5\). In turn, estimation of \(E(P)\) with (18 ) will be particularly hard when \(\mu \approx 0\) and \(\sigma^2 \rightarrow 0\). This makes the implied estimate of \(E(P)\) we could construct by naive following of [26], like the Mordell integral representation of \(E(P)\) in [14], a particular risk if used in parameter estimation algorithms for large datasets.
To reduce the error in the approximation of \(p(x)\) in the region \((-L,L)\), we propose using the piece-wise function, \[\begin{align} p(x) \approx \mathbb{1}_{x > 0} + (-1)^{\mathbb{1}_{x>0}}\sum_{i=1}^{N} ((-1)^{i-1}\mathbb{1}_{|x| \geq L}+ic_i\mathbb{1}_{|x| < L})e^{-i|x|}, \label{ramplogistic46H}
\end{align}\tag{21}\] where if \(|x| \geq L\), we use a Maclaurin series and if \(|x| < L\), we use a Chebyshev polynomial interpolation [28]. To calculate the coefficients of the Chebyshev interpolating polynomial, \(c_i\), we will use the R package pracma [29], but applied to the function \(\log(1+y)\) on the interval \((e^{-L},1)\) where \(y =e^x\), then take the derivative. By determining the interpolating polynomial for \(\log(1+y)\), rather than \(\frac{y}{1+y}\), we ensure the constant term
\(c_0\) disappears in the approximation of \(p(x)\), leaving only \(c_i\) associated with \(e^{-i|x|}\).
Details on how to choose optimal \(L\) conditional on \(N\) will be presented in section 5. First though, we present formulae for approximating \(E(P)\) as well as higher order moments.
The expectation of \(P\), \(E(P)\), where \(P\) is distributed \(\text{logit}N(\mu, \sigma^2)\) is \[\begin{align} E(P) &\approx& \Phi(\mu/\sigma) + \sum_{i=1}^{N} (-1)^{i-1}\left\{e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) -e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\} \nonumber \\ &&+\sum_{i=1}^{N} ic_ie^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&-\sum_{i=1}^{N} ic_ie^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\} \label{eq46EO} \end{align}\tag{22}\]
where \(\Phi(\cdot)\) is the standard normal cumulative distribution function. A proof can be found in the appendix.
Unlike the Mordell integral based representation of \(E(P)\) in (11 ), the expression for \(E(P)\) given in Proposition [EP46LN2new] will not run into numerical calculation issues. While \(E(P)\) in (22 ) contains terms, \(e^{\pm \mu i+\sigma^2i^2/2}\), which \(\rightarrow \infty\) as \(i \uparrow\), these are multiplied by terms of the form \(\Phi(a-i\sigma)\), with \(a\) constant, which \(\rightarrow 0\) as \(i \uparrow\) at a faster rate than \(e^{\pm \mu i+\sigma^2i^2/2}\) \(\rightarrow \infty\). This means any numerical \(\infty\) that appears in calculation is multiplied by an effective zero.
Higher order moments of \(P\) can be found as a function of \(E(P)\) and its derivatives with respect to \(\mu\), by applying the recursion formula given in (5 ) repeatedly.
By Result [hxExpect], we just need the derivatives of \(p(x)\) from (21 ) and take expectations to approximate higher order moments. As \(p(x)\) is a linear combination of exponentials, the derivatives of \(p(x)\) are highly repetitive, with \[\begin{align} \frac{{\rm d}^k p(x)}{{\rm d}x^k} \approx \begin{cases} \sum_{i=1}^{N} i^k((-1)^{i-1}\mathbb{1}_{|x| \geq L}+ic_i\mathbb{1}_{|x| < L})e^{-i|x|} \quad \text{ If k is odd,} \\ (-1)^{\mathbb{1}_{x>0}}\sum_{i=1}^{N} i^k((-1)^{i-1}\mathbb{1}_{|x| \geq L}+ic_i\mathbb{1}_{|x| < L})e^{-i|x|} \quad \text{If k is even.} \\ \end{cases} \label{ramplogistic46diff} \end{align}\tag{23}\]
To find \(\frac{{\rm d}^kE(P)}{{\rm d}\mu^k}\), we just change the leading coefficients of all components except \(\Phi(\mu/\sigma)\) in the approximation of \(E(P)\) from (22 ), \[\begin{align} \frac{{\rm d}^kE(P)}{{\rm d}\mu^k} &=& \sum_{i=1}^{N} i^k(-1)^{i-1}\left\{e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) +(-1)^{k-1}e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\} \nonumber \\ &&+\sum_{i=1}^{N} i^{k+1}c_ie^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&+(-1)^{k-1}\sum_{i=1}^{N} i^{k+1}c_ie^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}. \label{eq46EOdiff} \end{align}\tag{24}\]
Substituting (24 ) sequentially into (5 ), starting with \(k=1\) to find the second moment, leads to the following proposition for an approximation of positive integer moments,
The \(k^\text{th}\), \(k \geq 2\), integer moment of \(P\), \(E(P^k)\), where \(P\) is distributed \(\text{logit}N(\mu, \sigma^2)\) is approximately \[\begin{align} E(P^k) &\approx& \Phi(\mu/\sigma) + \frac{1}{(k-1)!}\bigg(\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k-1}(j-i) e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&-\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} ic_i\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&-\sum_{i=1}^{N} ic_i\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}\bigg) \label{eq46EOhigh} \end{align}\tag{25}\]
where \(\Phi(\cdot)\) is the standard normal cumulative distribution function.
A proof of Proposition [EP46LN2high] can be found in the appendix.
We have not yet established how accurate our approximations for \(E(P), E(P^2), \ldots\), will be, or what optimal choices for \(N, L\) are. While increasing \(N\) should result in improved accuracy of approximation, we still need to find the optimal \(L\) given \(N\). To determine optimal \(L\), we will work with the underlying functions \(p(x), p'(x), \ldots\), as if we can guarantee accurate approximation of the underlying functions for all \(x\), we can guarantee accuracy of moment estimates.
To choose \(N, L\), we consider accuracy of approximation up to the third derivative of \(p(x)\). This implies we are aiming to achieve accurate approximation up to at least the fourth
moment. As the approximate component of \(p(x)\) in (21 ) is symmetric around zero, to determine optimal \(L\), we only need to look at \(x \in \mathbb{R}^+\) or \(x \in \mathbb{R}^-\). As at \(|x| = 5, N=5\), the absolute error of the Maclaurin series component of \(p(x)\) is \(e^{-30}/(1+e^{-5}) = 9.3 \times 10^{-14}\), we will focus approximation on \(x \in (-5,0)\) and \(N \geq 5\). We
then carried optimisation of \(L\), using Brent’s method [30] as implemented using the optimize function in
R. The cost function we choose to minimise is \(\sum_j |p^{(k)}(x_j)-\tilde{p}^{(k)}(x_j)|\), where \(p^{(k)}(x_j),\tilde{p}^{(k)}(x_j)\) is the \(k^\text{th}; k
=0, 1, 2, 3\) derivative of the logistic function \(p(x)\), and the approximation of the logistic function given in (21 ) respectively, with \(x_{j+1} -
x_{j} = 1 \times 10^{-4}\).
| \(N\) | \(L, p(x)\) | \(\sum |Error|, p(x)\) | \(\max|Error|, p(x)\) | \(L, p'(x)\) | \(\sum |Error|, p'(x)\) | \(\max|Error|, p'(x)\) |
|---|---|---|---|---|---|---|
| 5 | 1.685101 | 0.251862 | 0.000113 | 1.586104 | 3.028510 | 0.002872 |
| 6 | 1.711008 | 0.034265 | 0.000018 | 1.617302 | 0.497280 | 0.000607 |
| 7 | 1.731515 | 0.004680 | 0.000003 | 1.644000 | 0.079812 | 0.000122 |
| 8 | 1.749221 | 0.000641 | 0.000000 | 1.668535 | 0.012593 | 0.000023 |
| 9 | 1.763723 | 0.000088 | 0.000000 | 1.689421 | 0.001961 | 0.000004 |
| 10 | 1.776430 | 0.000012 | 0.000000 | 1.705207 | 0.000302 | 0.000001 |
| 11 | 1.787302 | 0.000002 | 0.000000 | 1.721333 | 0.000046 | 0.000000 |
| \(N\) | \(L, p''(x)\) | \(\sum |Error|, p''(x)\) | \(\max|Error|, p''(x)\) | \(L, p'''(x)\) | \(\sum |Error|, p'''(x)\) | \(\max|Error|, p'''(x)\) |
| 5 | 1.439925 | 40.288286 | 0.042179 | 1.300801 | 498.249325 | 0.466538 |
| 6 | 1.478410 | 8.452863 | 0.011748 | 1.348403 | 135.405588 | 0.170961 |
| 7 | 1.511205 | 1.677197 | 0.002984 | 1.384707 | 33.740484 | 0.054576 |
| 8 | 1.541406 | 0.319176 | 0.000710 | 1.419602 | 7.860548 | 0.015913 |
| 9 | 1.569604 | 0.058792 | 0.000161 | 1.449400 | 1.736764 | 0.004291 |
| 10 | 1.592037 | 0.010550 | 0.000035 | 1.478222 | 0.367689 | 0.001096 |
| 11 | 1.611702 | 0.001853 | 0.000007 | 1.501922 | 0.075145 | 0.000265 |
In Figure 1, we present approximation error for \(p(x)\) and its first three derivatives, while in Table 2, we present the optimal choice of \(L\) for \(N=5, \ldots, 11\) along minimised sum of absolute errors and maximum error for the same functions. Note allowing \(L\) to vary for each derivative of \(p(x)\) reduces the efficiency of any algorithm to calculate moments. This is because, 1. we would need to calculate a new set of evaluations of \(\Phi(\cdot)\) for the expected value of each derivative, and 2. we would not be able to use the result of proposition [EP46LN2high] for higher order moments. Hence, to optimise \(L\), we fix \(N=11\), as we can guarantee the maximum error in the approximation of the four underlying functions needed to evaluate the first four moments of the logit-normal distribution over all \(x\) is \(<2.7 \times 10^{-4}\), and find \(L\) working with the sum of \(p(x)\) and its first three derivatives. This resulted in our final choice of \(L\) being \(1.507306\), with the values of the Chebyshev polynomial coefficients \(c_i\) given in Table 3.
| \(i\) | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 |
| \(c_i\) | 0.999992 | -0.499904 | 0.332651 | -0.246763 | 0.189081 | -0.139468 | 0.091337 | -0.048596 | 0.018998 | -0.004740 | 0.000559 |
Figure 1, by showing we have accurately approximated \(p(x)\) and its first three derivatives indicates our approach should be accurate for estimating \(E(P^k); k = 1, 2, 3, 4\) for any value of \(\mu, \sigma\). Nevertheless, to confirm the accuracy of our method, we will estimate \(E(P), E(P^2), E(P^3), E(P^4)\) using equations (22 ), (25 ) from section 4.1 and 4.2, with values of \(L, c_i\) fixed at those given in section 5 and compare to numerical integration estimates. As the logit-normal distribution has the symmetry \(P \sim \text{logit}N(\mu,\sigma^2)\) then \(1-P \sim \text{logit}N(-\mu,\sigma^2)\), we will only consider values \(\mu \in [0,6]\) in increments of 0.25, which corresponds to \(\text{Median}(P) \in [0.5,0.9975]\). For \(\sigma\) we will consider the values \((0.001, 0.01, 0.1, 0.25, 0.5, 1, 1.5, 2.5)\). This means we cover, when \(\mu\) is near zero, scenarios from near normality for \(P\) (low \(\sigma\)), to near uniform all the way to bi-modality (high \(\sigma\)) with modes at 0 and 1, as shown in Figure 2 (a).

Figure 2: Our implied approximation of \(p(x)^k\) for \(k = 5, 6, 7, 8\). The vertical dashed lines correspond to \(\pm L\), the transition between Maclaurin series and Chebyshev interpolating approximation. Solid lines correspond to the true function, \(p(x)^k\), dashed lines to the approximation \(\tilde{p}(x)^k\).. a — Examples of logit-normal densities with \(\mu =0\).
In Tables 4-5, comparisons between estimates from our piece-wise approximations of order \(N=11\) and numerical integration are provided for the expected value and variance of a logit-normal random variable. Tables showing accuracy for the second to fourth moment, skewness and kurtosis are included in the appendix. For the first four moments and variance, we did obtain accurate estimates for all combinations of \(\mu, \sigma\) considered, with the average and worst case error being \(6.1 \times 10^{-9}\) and \(1.2 \times 10^{-6}\) for \(E(P)\), \(1.4 \times 10^{-8}\) and \(2.2 \times 10^{-6}\) for \(\text{Var}(P)\), \(2.6 \times 10^{-9}\) and \(7.1 \times 10^{-8}\) for \(E(P^2)\), \(1.2 \times 10^{-8}\) and \(2.2 \times 10^{-7}\) for \(E(P^3)\) and \(5.8 \times 10^{-7}\) and \(4.4 \times 10^{-5}\) for \(E(P^4)\). For skewness and kurtosis, the division by a power of \(\text{Var}(P)\) means when \(\sigma \leq 0.25\), estimates obtained are unreliable.
| \(\sigma\) | \(E(P)\) | Error | \(E(P)\) | Error | \(E(P)\) | Error | \(E(P)\) | Error | \(E(P)\) | Error |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | 0.500000 | \(3.7\times 10^{-12 }\) | 0.777300 | \(4.0\times 10^{-11 }\) | 0.924142 | \(6.8\times 10^{-12 }\) | 0.977023 | \(7.3\times 10^{-12 }\) | 0.993307 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.500000 | \(3.7\times 10^{-12 }\) | 0.777295 | \(3.9\times 10^{-11 }\) | 0.924139 | \(6.7\times 10^{-12 }\) | 0.977022 | \(7.2\times 10^{-12 }\) | 0.993307 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.500000 | \(3.7\times 10^{-12 }\) | 0.776821 | \(-2.1\times 10^{-11 }\) | 0.923844 | \(6.7\times 10^{-12 }\) | 0.976915 | \(7.2\times 10^{-12 }\) | 0.993274 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.500000 | \(-1.8\times 10^{-13 }\) | 0.774350 | \(-6.2\times 10^{-10 }\) | 0.922279 | \(7.8\times 10^{-13 }\) | 0.976346 | \(7.2\times 10^{-12 }\) | 0.993099 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.500000 | \(-1.1\times 10^{-16 }\) | 0.766062 | \(-6.0\times 10^{-10 }\) | 0.916661 | \(-1.5\times 10^{-10 }\) | 0.974225 | \(7.3\times 10^{-12 }\) | 0.992439 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.500000 | \(-1.1\times 10^{-16 }\) | 0.739493 | \(-3.5\times 10^{-10 }\) | 0.894638 | \(-2.5\times 10^{-10 }\) | 0.964551 | \(-2.6\times 10^{-11 }\) | 0.989203 | \(6.5\times 10^{-12 }\) |
| 1.500 | 0.500000 | \(0.0 \times 10^{-16}\) | 0.709428 | \(-2.0\times 10^{-10 }\) | 0.862434 | \(-2.0\times 10^{-10 }\) | 0.945982 | \(-8.7\times 10^{-11 }\) | 0.981647 | \(-1.6\times 10^{-11 }\) |
| 2.500 | 0.500000 | \(-1.1\times 10^{-16 }\) | 0.659245 | \(-9.3\times 10^{-11 }\) | 0.793618 | \(-3.0\times 10^{-10 }\) | 0.889532 | \(-5.9\times 10^{-10 }\) | 0.947744 | \(-3.3\times 10^{-10 }\) |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 0.562177 | \(-8.4\times 10^{-11 }\) | 0.817574 | \(1.8\times 10^{-10 }\) | 0.939913 | \(7.0\times 10^{-12 }\) | 0.982014 | \(7.4\times 10^{-12 }\) | 0.994780 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.562175 | \(-8.3\times 10^{-11 }\) | 0.817570 | \(-2.4\times 10^{-9 }\) | 0.939911 | \(6.9\times 10^{-12 }\) | 0.982013 | \(7.3\times 10^{-12 }\) | 0.994780 | \(7.4\times 10^{-12 }\) |
| 0.100 | 0.562024 | \(-7.0\times 10^{-11 }\) | 0.817102 | \(-2.6\times 10^{-9 }\) | 0.939665 | \(7.0\times 10^{-12 }\) | 0.981929 | \(7.3\times 10^{-12 }\) | 0.994754 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.561248 | \(-3.4\times 10^{-11 }\) | 0.814651 | \(-1.4\times 10^{-9 }\) | 0.938353 | \(6.6\times 10^{-12 }\) | 0.981475 | \(7.3\times 10^{-12 }\) | 0.994617 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.558752 | \(-2.7\times 10^{-11 }\) | 0.806309 | \(-7.4\times 10^{-10 }\) | 0.933597 | \(-4.9\times 10^{-11 }\) | 0.979781 | \(7.4\times 10^{-12 }\) | 0.994099 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.551493 | \(-8.6\times 10^{-11 }\) | 0.778527 | \(-3.7\times 10^{-10 }\) | 0.914250 | \(-1.7\times 10^{-10 }\) | 0.971896 | \(-1.3\times 10^{-11 }\) | 0.991540 | \(7.1\times 10^{-12 }\) |
| 1.500 | 0.544085 | \(-5.1\times 10^{-11 }\) | 0.745691 | \(-2.2\times 10^{-10 }\) | 0.884295 | \(-1.8\times 10^{-10 }\) | 0.956037 | \(-6.7\times 10^{-11 }\) | 0.985398 | \(-9.5\times 10^{-12 }\) |
| 2.500 | 0.532731 | \(-1.5\times 10^{-11 }\) | 0.688757 | \(-1.2\times 10^{-10 }\) | 0.816045 | \(-1.0\times 10^{-10 }\) | 0.903957 | \(-8.0\times 10^{-11 }\) | 0.955654 | \(-4.5\times 10^{-11 }\) |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 0.622459 | \(3.3\times 10^{-13 }\) | 0.851953 | \(-6.4\times 10^{-10 }\) | 0.952574 | \(7.1\times 10^{-12 }\) | 0.985936 | \(7.5\times 10^{-12 }\) | 0.995930 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.622457 | \(4.4\times 10^{-13 }\) | 0.851948 | \(-6.4\times 10^{-10 }\) | 0.952572 | \(7.0\times 10^{-12 }\) | 0.985936 | \(7.3\times 10^{-12 }\) | 0.995930 | \(7.4\times 10^{-12 }\) |
| 0.100 | 0.622173 | \(-6.5\times 10^{-14 }\) | 0.851510 | \(-1.2\times 10^{-9 }\) | 0.952369 | \(7.1\times 10^{-12 }\) | 0.985869 | \(7.3\times 10^{-12 }\) | 0.995910 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.620710 | \(-1.7\times 10^{-11 }\) | 0.849201 | \(-1.2\times 10^{-9 }\) | 0.951287 | \(7.0\times 10^{-12 }\) | 0.985510 | \(7.3\times 10^{-12 }\) | 0.995802 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.615976 | \(-8.1\times 10^{-11 }\) | 0.841228 | \(-7.1\times 10^{-10 }\) | 0.947330 | \(-9.1\times 10^{-12 }\) | 0.984163 | \(7.4\times 10^{-12 }\) | 0.995396 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.602027 | \(-1.7\times 10^{-10 }\) | 0.813571 | \(-3.7\times 10^{-10 }\) | 0.930676 | \(-1.4\times 10^{-10 }\) | 0.977793 | \(-4.2\times 10^{-12 }\) | 0.993380 | \(7.4\times 10^{-12 }\) |
| 1.500 | 0.587596 | \(-9.5\times 10^{-11 }\) | 0.779256 | \(-2.3\times 10^{-10 }\) | 0.903389 | \(-1.6\times 10^{-10 }\) | 0.964413 | \(-5.0\times 10^{-11 }\) | 0.988420 | \(-5.2\times 10^{-10 }\) |
| 2.500 | 0.565237 | \(-2.8\times 10^{-11 }\) | 0.717074 | \(-9.0\times 10^{-11 }\) | 0.836848 | \(-9.9\times 10^{-11 }\) | 0.916909 | \(-7.4\times 10^{-11 }\) | 0.962543 | \(-3.9\times 10^{-11 }\) |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 0.679179 | \(4.3\times 10^{-11 }\) | 0.880797 | \(-2.7\times 10^{-11 }\) | 0.962673 | \(7.2\times 10^{-12 }\) | 0.989013 | \(7.5\times 10^{-12 }\) | 0.996827 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.679175 | \(4.3\times 10^{-11 }\) | 0.880793 | \(-2.7\times 10^{-11 }\) | 0.962672 | \(7.1\times 10^{-12 }\) | 0.989013 | \(7.3\times 10^{-12 }\) | 0.996827 | \(7.4\times 10^{-12 }\) |
| 0.100 | 0.678790 | \(2.2\times 10^{-11 }\) | 0.880398 | \(-6.1\times 10^{-11 }\) | 0.962507 | \(7.1\times 10^{-12 }\) | 0.988960 | \(7.3\times 10^{-12 }\) | 0.996812 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.676798 | \(-3.7\times 10^{-13 }\) | 0.878309 | \(-4.2\times 10^{-10 }\) | 0.961625 | \(7.1\times 10^{-12 }\) | 0.988676 | \(7.3\times 10^{-12 }\) | 0.996728 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.670292 | \(-2.0\times 10^{-10 }\) | 0.870994 | \(-5.4\times 10^{-10 }\) | 0.958377 | \(3.5\times 10^{-12 }\) | 0.987611 | \(7.4\times 10^{-12 }\) | 0.996410 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.650703 | \(-2.4\times 10^{-10 }\) | 0.844538 | \(-3.5\times 10^{-10 }\) | 0.944287 | \(-9.4\times 10^{-11 }\) | 0.982500 | \(1.5\times 10^{-12 }\) | 0.994825 | \(7.5\times 10^{-12 }\) |
| 1.500 | 0.629982 | \(-1.4\times 10^{-10 }\) | 0.809947 | \(-2.3\times 10^{-10 }\) | 0.919892 | \(8.4\times 10^{-9 }\) | 0.971336 | \(-3.5\times 10^{-11 }\) | 0.990843 | \(-4.4\times 10^{-10 }\) |
| 2.500 | 0.597296 | \(-4.1\times 10^{-11 }\) | 0.744060 | \(-9.8\times 10^{-11 }\) | 0.856019 | \(-9.6\times 10^{-11 }\) | 0.928465 | \(-6.6\times 10^{-11 }\) | 0.968506 | \(-3.3\times 10^{-11 }\) |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | 0.731059 | \(-1.6\times 10^{-11 }\) | 0.904651 | \(5.0\times 10^{-12 }\) | 0.970688 | \(7.2\times 10^{-12 }\) | 0.991423 | \(7.5\times 10^{-12 }\) | 0.997527 | \(7.6\times 10^{-12 }\) |
| 0.010 | 0.731054 | \(-1.6\times 10^{-11 }\) | 0.904647 | \(5.0\times 10^{-12 }\) | 0.970686 | \(7.2\times 10^{-12 }\) | 0.991422 | \(7.3\times 10^{-12 }\) | 0.997527 | \(7.4\times 10^{-12 }\) |
| 0.100 | 0.730606 | \(4.0\times 10^{-12 }\) | 0.904302 | \(3.3\times 10^{-12 }\) | 0.970554 | \(7.2\times 10^{-12 }\) | 0.991381 | \(7.4\times 10^{-12 }\) | 0.997515 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.728278 | \(-9.9\times 10^{-11 }\) | 0.902471 | \(-6.3\times 10^{-11 }\) | 0.969842 | \(7.2\times 10^{-12 }\) | 0.991158 | \(7.4\times 10^{-12 }\) | 0.997450 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.720581 | \(-3.8\times 10^{-10 }\) | 0.895975 | \(-3.2\times 10^{-10 }\) | 0.967206 | \(6.7\times 10^{-12 }\) | 0.990318 | \(7.4\times 10^{-12 }\) | 0.997201 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.696735 | \(-3.1\times 10^{-10 }\) | 0.871495 | \(-3.0\times 10^{-10 }\) | 0.955459 | \(-5.1\times 10^{-11 }\) | 0.986241 | \(4.9\times 10^{-12 }\) | 0.995957 | \(7.5\times 10^{-12 }\) |
| 1.500 | 0.670739 | \(-3.1\times 10^{-10 }\) | 0.837674 | \(-2.2\times 10^{-10 }\) | 0.934013 | \(-1.1\times 10^{-10 }\) | 0.977017 | \(-2.4\times 10^{-11 }\) | 0.992777 | \(-9.9\times 10^{-11 }\) |
| 2.500 | 0.628698 | \(-5.9\times 10^{-11 }\) | 0.769604 | \(-1.0\times 10^{-10 }\) | 0.873570 | \(-9.2\times 10^{-11 }\) | 0.938713 | \(-1.2\times 10^{-6 }\) | 0.973639 | \(-4.2\times 10^{-10 }\) |
Our second test looked at the applicability of Proposition [EP46LN2high]. In practice, this is a test of how good the underlying approximating functions implied in Proposition [EP46LN2high] are. In Figure 2, we provide evidence of our ability to approximate \(p(x)^k\) for \(k = 5, 6, 7, 8\). For \(k=5, 6\), our choice of \(c_i, L\) remains good enough to enable accurate estimation of the corresponding logit-normal moment. For \(k = 7\) and more so for \(k=8\), we would start seeing systematic error appear when estimating the \(k^\text{th}\) moment for a logit-normal random variable with non-trivial probability in the region \(0.5 \pm \epsilon\) for some \(\epsilon > 0\). If we push \(k\) higher, approximations will get worse. To show this, we calculated \(E(P^{k}); k = 1, 2, \ldots, 10\) using both the proposition and numerical integration when \(\mu =1, \sigma = 0.8\). As shown in Table 6, the Proposition result does hold for \(k > 4\). However, the increasing error in approximation for higher order derivatives of \(p(x)\), shown in Figure 1, means approximation accuracy of \(E(P^k)\) declines noticeably when \(\mu =1, \sigma =0.8\) for \(k \geq 8\), if \(N =11, L = 1.507306\). This implies our method for finding logit-normal moments is not generally applicable to evaluating the integral needed to find the marginal likelihood of \(\boldsymbol{\beta}\), \(L(\boldsymbol{\beta})\) that appears in binomial logistic mixed models with only an observation level random effect.
| \(\sigma\) | \(\text{Var}(P)\) | Error | \(\text{Var}(P)\) | Error | \(\text{Var}(P)\) | Error | \(\text{Var}(P)\) | Error | \(\text{Var}(P)\) | Error |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | 0.000000 | \(-7.1\times 10^{-8 }\) | 0.000000 | \(3.8\times 10^{-10 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) | 0.000000 | \(-7.1\times 10^{-12 }\) | 0.000000 | \(-7.5\times 10^{-12 }\) |
| 0.010 | 0.000006 | \(-4.5\times 10^{-8 }\) | 0.000003 | \(3.7\times 10^{-10 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) | 0.000000 | \(-7.1\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.100 | 0.000622 | \(-7.2\times 10^{-9 }\) | 0.000300 | \(-3.9\times 10^{-10 }\) | 0.000050 | \(-8.3\times 10^{-12 }\) | 0.000005 | \(-7.1\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.250 | 0.003789 | \(-3.3\times 10^{-9 }\) | 0.001884 | \(-7.4\times 10^{-9 }\) | 0.000325 | \(-7.3\times 10^{-11 }\) | 0.000034 | \(-7.1\times 10^{-12 }\) | 0.000003 | \(-7.3\times 10^{-12 }\) |
| 0.500 | 0.013956 | \(-1.9\times 10^{-9 }\) | 0.007587 | \(-7.1\times 10^{-9 }\) | 0.001517 | \(-1.7\times 10^{-9 }\) | 0.000174 | \(-8.2\times 10^{-12 }\) | 0.000016 | \(-7.3\times 10^{-12 }\) |
| 1.000 | 0.043379 | \(-3.5\times 10^{-9 }\) | 0.028821 | \(-4.7\times 10^{-9 }\) | 0.008965 | \(-2.9\times 10^{-9 }\) | 0.001529 | \(-4.2\times 10^{-10 }\) | 0.000176 | \(-2.1\times 10^{-11 }\) |
| 1.500 | 0.073272 | \(-4.1\times 10^{-9 }\) | 0.056026 | \(-3.9\times 10^{-9 }\) | 0.025467 | \(-2.6\times 10^{-9 }\) | 0.007210 | \(-1.1\times 10^{-9 }\) | 0.001361 | \(-2.2\times 10^{-10 }\) |
| 2.500 | 0.118925 | \(-3.4\times 10^{-9 }\) | 0.104409 | \(-3.1\times 10^{-9 }\) | 0.070875 | \(-2.1\times 10^{-9 }\) | 0.037530 | \(-6.1\times 10^{-10 }\) | 0.015707 | \(-2.6\times 10^{-10 }\) |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 0.000000 | \(2.1\times 10^{-10 }\) | 0.000000 | \(-4.8\times 10^{-9 }\) | 0.000000 | \(-6.6\times 10^{-12 }\) | 0.000000 | \(-7.2\times 10^{-12 }\) | 0.000000 | \(-7.5\times 10^{-12 }\) |
| 0.010 | 0.000006 | \(2.0\times 10^{-10 }\) | 0.000002 | \(-3.1\times 10^{-8 }\) | 0.000000 | \(-6.6\times 10^{-12 }\) | 0.000000 | \(-7.1\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.100 | 0.000603 | \(-9.0\times 10^{-10 }\) | 0.000223 | \(-3.0\times 10^{-8 }\) | 0.000032 | \(-6.6\times 10^{-12 }\) | 0.000003 | \(-7.1\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.250 | 0.003680 | \(-2.1\times 10^{-9 }\) | 0.001415 | \(-1.6\times 10^{-8 }\) | 0.000213 | \(-1.1\times 10^{-11 }\) | 0.000021 | \(-7.1\times 10^{-12 }\) | 0.000002 | \(-7.3\times 10^{-12 }\) |
| 0.500 | 0.013608 | \(-1.8\times 10^{-9 }\) | 0.005877 | \(-8.6\times 10^{-9 }\) | 0.001015 | \(-6.3\times 10^{-10 }\) | 0.000109 | \(-7.3\times 10^{-12 }\) | 0.000010 | \(-7.3\times 10^{-12 }\) |
| 1.000 | 0.042667 | \(-3.6\times 10^{-9 }\) | 0.024153 | \(-4.7\times 10^{-9 }\) | 0.006562 | \(-2.3\times 10^{-9 }\) | 0.001017 | \(-2.4\times 10^{-10 }\) | 0.000111 | \(-1.3\times 10^{-11 }\) |
| 1.500 | 0.072486 | \(-4.1\times 10^{-9 }\) | 0.049831 | \(-3.7\times 10^{-9 }\) | 0.020510 | \(-2.3\times 10^{-9 }\) | 0.005322 | \(-8.1\times 10^{-10 }\) | 0.000935 | \(-1.5\times 10^{-10 }\) |
| 2.500 | 0.118306 | \(-3.4\times 10^{-9 }\) | 0.098614 | \(-2.9\times 10^{-9 }\) | 0.063641 | \(-2.2\times 10^{-9 }\) | 0.032114 | \(-1.4\times 10^{-9 }\) | 0.012846 | \(-6.8\times 10^{-10 }\) |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 0.000000 | \(5.8\times 10^{-10 }\) | 0.000000 | \(-7.2\times 10^{-9 }\) | 0.000000 | \(-6.8\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) | 0.000000 | \(-7.5\times 10^{-12 }\) |
| 0.010 | 0.000006 | \(5.7\times 10^{-10 }\) | 0.000002 | \(-7.3\times 10^{-9 }\) | 0.000000 | \(-6.7\times 10^{-12 }\) | 0.000000 | \(-7.2\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.100 | 0.000550 | \(1.6\times 10^{-11 }\) | 0.000160 | \(-1.3\times 10^{-8 }\) | 0.000021 | \(-6.7\times 10^{-12 }\) | 0.000002 | \(-7.2\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) |
| 0.250 | 0.003372 | \(-5.8\times 10^{-10 }\) | 0.001024 | \(-1.4\times 10^{-8 }\) | 0.000137 | \(-6.9\times 10^{-12 }\) | 0.000013 | \(-7.2\times 10^{-12 }\) | 0.000001 | \(-7.4\times 10^{-12 }\) |
| 0.500 | 0.012623 | \(-2.0\times 10^{-9 }\) | 0.004387 | \(-8.2\times 10^{-9 }\) | 0.000666 | \(-1.9\times 10^{-10 }\) | 0.000068 | \(-7.2\times 10^{-12 }\) | 0.000006 | \(-7.3\times 10^{-12 }\) |
| 1.000 | 0.040604 | \(-3.8\times 10^{-9 }\) | 0.019649 | \(-4.5\times 10^{-9 }\) | 0.004696 | \(-1.6\times 10^{-9 }\) | 0.000667 | \(-1.3\times 10^{-10 }\) | 0.000069 | \(-9.5\times 10^{-12 }\) |
| 1.500 | 0.070179 | \(-4.1\times 10^{-9 }\) | 0.043416 | \(-3.5\times 10^{-9 }\) | 0.016216 | \(-2.0\times 10^{-9 }\) | 0.003868 | \(-6.1\times 10^{-10 }\) | 0.000635 | \(9.2\times 10^{-10 }\) |
| 2.500 | 0.116470 | \(-3.3\times 10^{-9 }\) | 0.092190 | \(-2.8\times 10^{-9 }\) | 0.056585 | \(-2.0\times 10^{-9 }\) | 0.027225 | \(-1.2\times 10^{-9 }\) | 0.010415 | \(-5.8\times 10^{-10 }\) |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 0.000000 | \(-2.0\times 10^{-10 }\) | 0.000000 | \(-3.8\times 10^{-10 }\) | 0.000000 | \(-6.9\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) | 0.000000 | \(-7.5\times 10^{-12 }\) |
| 0.010 | 0.000005 | \(-2.0\times 10^{-10 }\) | 0.000001 | \(-3.8\times 10^{-10 }\) | 0.000000 | \(-6.8\times 10^{-12 }\) | 0.000000 | \(-7.2\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) |
| 0.100 | 0.000474 | \(-8.2\times 10^{-11 }\) | 0.000111 | \(-7.5\times 10^{-10 }\) | 0.000013 | \(-6.9\times 10^{-12 }\) | 0.000001 | \(-7.2\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) |
| 0.250 | 0.002922 | \(-1.8\times 10^{-10 }\) | 0.000717 | \(-4.8\times 10^{-9 }\) | 0.000087 | \(-6.9\times 10^{-12 }\) | 0.000008 | \(-7.2\times 10^{-12 }\) | 0.000001 | \(-7.4\times 10^{-12 }\) |
| 0.500 | 0.011152 | \(-2.8\times 10^{-9 }\) | 0.003167 | \(-6.2\times 10^{-9 }\) | 0.000431 | \(-4.9\times 10^{-11 }\) | 0.000042 | \(-7.2\times 10^{-12 }\) | 0.000004 | \(-7.4\times 10^{-12 }\) |
| 1.000 | 0.037397 | \(-4.2\times 10^{-9 }\) | 0.015536 | \(-4.1\times 10^{-9 }\) | 0.003291 | \(-1.1\times 10^{-9 }\) | 0.000432 | \(-7.2\times 10^{-11 }\) | 0.000043 | \(-8.1\times 10^{-12 }\) |
| 1.500 | 0.066503 | \(-4.0\times 10^{-9 }\) | 0.037068 | \(-3.3\times 10^{-9 }\) | 0.012592 | \(-1.7\times 10^{-8 }\) | 0.002770 | \(-4.5\times 10^{-10 }\) | 0.000426 | \(8.0\times 10^{-10 }\) |
| 2.500 | 0.113474 | \(-3.3\times 10^{-9 }\) | 0.085310 | \(-2.7\times 10^{-9 }\) | 0.049823 | \(-1.9\times 10^{-9 }\) | 0.022869 | \(-1.1\times 10^{-9 }\) | 0.008373 | \(-4.8\times 10^{-10 }\) |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.010 | 0.000004 | \(-8.4\times 10^{-11 }\) | 0.000001 | \(-2.5\times 10^{-11 }\) | 0.000000 | \(-7.0\times 10^{-12 }\) | 0.000000 | \(-7.3\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) |
| 0.100 | 0.000386 | \(-3.9\times 10^{-11 }\) | 0.000075 | \(-4.4\times 10^{-11 }\) | 0.000008 | \(-7.0\times 10^{-12 }\) | 0.000001 | \(-7.3\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) |
| 0.250 | 0.002403 | \(-1.3\times 10^{-9 }\) | 0.000488 | \(-7.8\times 10^{-10 }\) | 0.000055 | \(-7.0\times 10^{-12 }\) | 0.000005 | \(-7.3\times 10^{-12 }\) | 0.000000 | \(-7.4\times 10^{-12 }\) |
| 0.500 | 0.009403 | \(-4.7\times 10^{-9 }\) | 0.002220 | \(-3.7\times 10^{-9 }\) | 0.000275 | \(-1.5\times 10^{-11 }\) | 0.000026 | \(-7.3\times 10^{-12 }\) | 0.000002 | \(-7.4\times 10^{-12 }\) |
| 1.000 | 0.033352 | \(-4.5\times 10^{-9 }\) | 0.011955 | \(-3.6\times 10^{-9 }\) | 0.002263 | \(-7.3\times 10^{-10 }\) | 0.000277 | \(-3.8\times 10^{-11 }\) | 0.000027 | \(-7.6\times 10^{-12 }\) |
| 1.500 | 0.061689 | \(-3.8\times 10^{-9 }\) | 0.031025 | \(-3.0\times 10^{-9 }\) | 0.009608 | \(-1.3\times 10^{-9 }\) | 0.001955 | \(-3.2\times 10^{-10 }\) | 0.000283 | \(-1.1\times 10^{-9 }\) |
| 2.500 | 0.109412 | \(-3.2\times 10^{-9 }\) | 0.078150 | \(-2.5\times 10^{-9 }\) | 0.043448 | \(-1.7\times 10^{-9 }\) | 0.019038 | \(2.2\times 10^{-6 }\) | 0.006674 | \(3.6\times 10^{-10 }\) |
| Estimation method | \(E(P)\) | \(E(P^2)\) | \(E(P^3)\) | \(E(P^4)\) | \(E(P^5)\) | \(E(P^6)\) | \(E(P^7)\) | \(E(P^8)\) | \(E(P^9)\) | \(E(P^{10})\) |
|---|---|---|---|---|---|---|---|---|---|---|
| Numerical Integration | 0.707042 | 0.522576 | 0.399138 | 0.312699 | 0.249999 | 0.203222 | 0.167511 | 0.139720 | 0.117736 | 0.100102 |
| Proposition 2 | 0.707042 | 0.522576 | 0.399138 | 0.312699 | 0.249998 | 0.203176 | 0.167343 | 0.138362 | 0.112458 | 0.078556 |
To evaluate speed of calculation, we have chosen to focus on \(E(P), E(P^2), E(P^3), E(P^4), \text{Var}(P)\). Because of the highly sequential nature of the component functions needed to calculate our estimates of
logit-normal moments, the marginal cost of calculating multiple moments simultaneously drops as the number of moments needed increases. This means we will provide two speed comparisons. The first comparison consists of calculating a single moment, \(E(P)\), using our method and numerical integration. The second will be a comparison of calculating \(E(P), E(P^2), E(P^3), E(P^4), \text{Var}(P)\) using our method and numerical integration,
with results presented in Table 7. For speed testing, we implemented our approach in R but written in C++ code using the package Rcpp [31], while numerical integration was done using the integrate function in R. To determine the time distribution, the functions were evaluated 10,000 times and timed using the R
package microbenchmark [32]. The values for \(\mu, \sigma\) were \(\mu =
0.2, 1.2, \sigma = 0.1, 1, 2.5\). This was done to see if speed of evaluation was affected by the choice of parameter values.
| Calculating \(E(P)\) | Calculating \(E(P), \ldots, E(P^4), \text{Var}(P)\) | |||||||||||
| \(\mu =0.2\) | \(\mu =1.2\) | \(\mu =0.2\) | \(\mu =1.2\) | |||||||||
| \(\sigma\) | 0.1 | 1 | 2.5 | 0.1 | 1 | 2.5 | 0.1 | 1 | 2.5 | 0.1 | 1 | 2.5 |
| Quantile | Piecewise approximation | |||||||||||
| 10% | 5.00 | 5.30 | 5.40 | 4.50 | 5.20 | 5.40 | 5.10 | 5.40 | 5.50 | 4.60 | 5.30 | 5.60 |
| 25% | 5.20 | 5.50 | 5.60 | 4.70 | 5.40 | 5.60 | 5.30 | 5.60 | 5.70 | 4.80 | 5.50 | 5.80 |
| 50% | 5.50 | 5.70 | 5.80 | 4.90 | 5.70 | 5.90 | 5.60 | 5.80 | 5.90 | 5.00 | 5.80 | 6.00 |
| 75% | 5.80 | 6.10 | 6.20 | 5.30 | 6.10 | 6.30 | 6.00 | 6.20 | 6.30 | 5.40 | 6.20 | 6.40 |
| 90% | 7.10 | 7.40 | 7.60 | 6.30 | 7.30 | 7.60 | 7.30 | 7.50 | 7.70 | 6.60 | 7.50 | 7.80 |
| Quantile | Numerical integration | |||||||||||
| 10% | 28.00 | 47.79 | 47.60 | 27.60 | 37.50 | 47.40 | 118.10 | 190.60 | 218.70 | 117.10 | 168.70 | 218.60 |
| 25% | 29.00 | 49.40 | 49.10 | 28.58 | 38.80 | 49.00 | 122.10 | 197.30 | 226.30 | 120.90 | 174.40 | 225.90 |
| 50% | 30.20 | 51.40 | 51.20 | 29.80 | 40.40 | 51.00 | 127.10 | 205.70 | 236.10 | 126.10 | 182.30 | 235.80 |
| 75% | 32.10 | 54.70 | 54.30 | 31.90 | 43.10 | 54.12 | 137.00 | 223.50 | 257.70 | 136.10 | 198.80 | 258.10 |
| 90% | 39.10 | 69.70 | 69.60 | 39.50 | 53.50 | 68.71 | 170.80 | 266.60 | 307.81 | 171.00 | 237.11 | 306.80 |
In Table 7, we see evaluation time for \(E(P)\) using numerical integration is somewhat sensitive to choice of \(\sigma\), with evaluation being faster for low \(\sigma\). This was less so for our approach based on piecewise approximation of \(p(x)\). Our approach for finding \(E(P)\) was roughly 5.5-6 times faster when \(\sigma = 0.1\) and was roughly 7-9 times faster when \(\sigma =1, 2.5\). When calculating the first four moments and variance simultaneously, the low marginal cost of obtaining higher order moments and the variance using our approach becomes apparent. On average, obtaining \(E(P^2), E(P^3), E(P^4), \text{Var}(P)\) in addition to \(E(P)\) increased run time by 2 to 3 %, or \(0.1-0.2 \times 10^{-6}\) s. Using standard numerical integration to obtain \(E(P^2), E(P^3), E(P^4), \text{Var}(P)\) in addition to \(E(P)\) caused a linear increase in coast, as numerical solving of four rather than one integral was needed. Our approach to finding \(E(P), E(P^2), E(P^3), E(P^4), \text{Var}(P)\) was on average between 23-25 times faster when \(\sigma =0.1\), 31-35 times faster when \(\sigma =1\) and 39-40 times faster when \(\sigma=2.5\). The low cost of finding higher order moments/expectation with respect to \(\mu\) of \(E(P)\) using our piecewise approximation to \(p(x)\) indicates our approach would be particularly useful in algorithms, such as logistic regression models where parameters are estimated using expectation propagation, where we need moments of multiple order simultaneously.
Our method for approximating logit-normal moments has been shown to have a practical upper limit of 7/8 before losing accuracy. However there are many inferential problems where logit-normal moments under order 7/8 are needed. As an example, we will now demonstrate our results are sufficient to remove the need to use numerical integration when fitting logistic regression in using expectation propagation for many choices of prior. As the illustrative dataset, we chose the lbw dataset from the COUNT package in R, originally given in [33].
The lbw dataset consists of 189 observations with 10 variables. For the response variable, we have chosen to use low, an indicator (1 = yes, 0 = no) whether a birth was classed as low-weight or not . For our illustrative example,
we have chosen to consider only 3 of the possible predictor variables. These are Smoke, a binary variable indicating if the mother had a history of smoking (1 = yes, 0 = no), lwt, a continuous variable giving maternal weight at
last menstrual period in pounds, and Hypertension, a binary variable indicating if the mother had a history of hypertension (1 = yes, 0 = no). For the continuous variable lwt, we will standardise the covariate values to create
Standardised Maternal Weight before running the algorithm,.
Our primary interest in implementing expectation propagation (EP) is to demonstrate that for logistic regression, rewriting the moment matching step into the form of Proposition [prop1] leads to faster implementation, as we know the required logit-normal moments. This means we will implement two versions of EP, written in R code. The first, EP-NI, will implement sequential-EP, as described in [20] using numerical integration to solve the moment matching step. The second, EP-LN, will implement sequential-EP using our formula for \(E(P), \frac{{\rm d}E(P)}{{\rm d} \mu}, \frac{{\rm d}^2E(P)}{{\rm d} \mu^2}\) given in (22 ), (24 ) to avoid numerical integration. For more details on the particulars of the algorithm, particularly for accounting that \(f_i(\boldsymbol{\eta}_i)\) switches between \({\boldsymbol{p}}_i\) and \(1-{\boldsymbol{p}}_i\) when \({\boldsymbol{y}}_i\) changes from 1 to 0, see the appendix. While not of main interest, we will include a MCMC comparison to demonstrate the accuracy of expectation propagation at posterior approximation. This comparison will be with a Gibbs sampler using Pólya-Gamma data augmentation [34]. For all MCMC analyses, 3 chains will be run for 30,000 iterations with the first 15,000 iterations removed as burn-in. Convergence will be checked using Gelman-Rubin statistics [35].
For the prior on the regression coefficients, we choose \(p(\boldsymbol{\beta}) := \mathcal{N}(\boldsymbol{\beta}|\tilde{\boldsymbol{\beta}}, \tilde{\boldsymbol{\Sigma}})\), where \(\tilde{\boldsymbol{\beta}} = (0, -0.1, 0.1, 0.2)\), and \(\tilde{\boldsymbol{\Sigma}}_{ij} = 1.3\times 0.5^{|i-j|}\). There are two motivations for this. The first is with a normal prior, the moment matching step required in the EP algorithm can skip over the prior [21]. Second, in applications of EP to determine the marginal likelihood in frequentist probit mixed models [23], the prior equivalent is also normal. Moreover [23] state the extension of their algorithm to a logistic mixed model requires solving univariate integrals equivalent to (9 ) with \(f_i(\boldsymbol{\eta}_i) = (1-{\boldsymbol{p}}_i)\). Hence showing our approach works for logistic regression with a normal prior implies our work could be extended to the logistic examples mentioned in [23].
In Figure 3, we present posterior density plots estimated using MCMC and EP-NI, EP-LN. As expected, very high accuracy of approximation was obtained. This was confirmed by calculating the accuracy diagnostic from [36], \[\text{accuracy}(g(\boldsymbol{\beta}_i)) = 100 \times \bigg( 1 - 0.5 \int_{-\infty}^\infty
|g(\boldsymbol{\beta}_i)-p(\boldsymbol{\beta}_i|{\boldsymbol{y}})| d\boldsymbol{\beta}_i \bigg),\] where \(g(\boldsymbol{\beta})\) is the approximate posterior and \(p(\boldsymbol{\beta}|{\boldsymbol{y}})\) is the ‘true’ posterior as estimated with MCMC samples. For the 4 parameters in our test model, accuracy of EP approximation was \(0.9882\) for the
Intercept, \(0.9926\) for Smoke, \(0.9788\) for Standardised Maternal Weight and \(0.9934\) for
Hypertension.
| Coefficient \(j\) | ||||||||||
| Coefficient | I =Intercept | S =Smoke | M = Maternal | H =Hypertension | ||||||
| \(i\) | \(\hat{\boldsymbol{\beta}}_i\), | relative error | \(\hat{\boldsymbol{\Sigma}}_{i,j}\), | relative error | \(\hat{\boldsymbol{\Sigma}}_{i,j}\), | relative error | \(\hat{\boldsymbol{\Sigma}}_{i,j}\), | relative error | \(\hat{\boldsymbol{\Sigma}}_{i,j}\), | relative error |
| I | -1.071865 | \(-7.1 \times 10^{-9}\) | 0.041916 | \(1.1 \times 10^{-7}\) | ||||||
| S | 0.456130 | \(-3.7 \times 10^{-8}\) | -0.035515 | \(1.1 \times 10^{-7}\) | 0.089018 | \(-4.6 \times 10^{-8}\) | ||||
| M | -0.456085 | \(-6.5 \times 10^{-9}\) | 0.004408 | \(1.1 \times 10^{-6}\) | 0.003743 | \(-1.6 \times 10^{-6}\) | 0.033009 | \(8.2 \times 10^{-8}\) | ||
| H | 1.166203 | \(2.0 \times 10^{-8}\) | -0.021236 | \(2.1 \times 10^{-7}\) | -0.002845 | \(-2.8 \times 10^{-6}\) | -0.018205 | \(-1.3 \times 10^{-7}\) | 0.300135 | \(6.0 \times 10^{-8}\) |
Focusing on the comparison between EP-NI and EP-LN, we see, as expected, that the two algorithms are effectively equivalent, as shown in Table 8. The relative error in estimates of \(\hat{\boldsymbol{\beta}}, \hat{\boldsymbol{\Sigma}}\) between EP-NI and EP-LN are in the range \(10^{-8} - 10^{-9}\) for elements of \(\hat{\boldsymbol{\beta}}\), and \(10^{-6} - 10^{-8}\) for elements of \(\hat{\boldsymbol{\Sigma}}\).
Lastly, to benchmark the computational speed gain obtained by using EP-LN over EP-NI, we ran both versions of EP 1,000 times, with timings determined using the R package microbenchmark [32]. Results are provided in Table 9. This shows that for a sample of size 189, replacing numerical integration with our approximations of logit-normal moments
reduced computation time by about 58 %.
| Quantile | 10 % | 25 % | 50 % | 75 % | 90 % | |||||
| EP-NI | EP-LN | EP-NI | EP-LN | EP-NI | EP-LN | EP-NI | EP-LN | EP-NI | EP-LN | |
| times \(10^{-3} s\) | 612 | 256 | 631 | 264 | 663 | 277 | 714 | 301 | 790 | 335 |
We would argue this paper fulfils the conclusion of [14] that ‘the possibility of either analytic positive integer moments, or at least a highly accurate and simple approximation could be determined, through further study that utilises the similarity between the log-normal and logit-normal distributions’. Through examples, we have shown our estimates of moments up to order 4 do not suffer the numerical issues that the Mordell integral based representation of \(E(P)\) from [14] has when \(\sigma\) is small, and thus maintain a high level of accuracy in all settings considered.
We have shown our method for estimating low order moments, up to the fourth, of logit-normal random variables is faster than standard numerical integration in R, especially if multiple moments are needed simultaneously. As error in the underlying approximating function accumulates with increasing moment order, a finite limit exists in practice on the highest moment we can calculate accurately. Referring to the implied approximating function of the \(k^\text{th}\) power of the logistic function, this limit is around 7 or 8. However, the highest moment accurately approximated will also depend on \(\mu, \sigma\), as error in the underlying function \(p(x)^k\) first appears for \(x \approx 0\).
The inability of our approach to estimate moments of arbitrarily high order means our work has limited application as an alternative to quadrature to finding the marginal likelihood in frequentist treatments of the logistic mixed model. However, while not initially obvious, we have demonstrated our approach to finding logit-normal moments does enable faster, numerical integration free implementation of expectation propagation for logistic regression. This is because only knowledge of the equivalent to logit-normal moments of order \(1, 2, 3\) are required to solve the expectation propagation moment matching steps as described in [20] related to the likelihood in logistic regression. We do note expectation propagation algorithms for regression type problems with normal priors have been considered for finding the marginal likelihood for fairly general frequentist treatments of generalised linear mixed models [23]. This indicates our illustrative application may have indirect frequentist as well as Bayesian algorithm uses. Lastly, we suspect our results, apart from enabling faster implementation of expectation propagation, can be utilised in other versions of approximate Bayesian inference, such as variational Bayes methods for logistic and negative binomial regression. These applications are the focus of future work.
John Holmes proposed the study and potential illustrative applications. Ness Arps was involved with parameter testing. Marco Reale was involved in manuscript refinement.
None reported.
The authors declare no conflicts of interest.
One of the inferential applications we considered as motivational for researching logit-normal moments was Expectation Propagation (EP) [6], [7] for logistic regression. Specifically, our motivation comes from the EP algorithm for a regression problem with fixed dispersion parameter described in [20], which we outline below.
As we are considering a regression type problem, we assume the approximate posterior is normal \(g(\boldsymbol{\beta}) := \mathcal{N}(\boldsymbol{\beta}|\hat{\boldsymbol{\beta}}, \hat{\boldsymbol{\Sigma}})\). This choice of \(g\) does admit the factorisation \(g(\boldsymbol{\beta}) = \prod_{i=0}^ng_i(\boldsymbol{\beta})\), which we need as the Kullback-Leibler divergence to be minimised is \[D_{KL}\{cg_{-i}(\boldsymbol{\beta})f_i(\boldsymbol{\beta})||g(\boldsymbol{\beta})\} = \int cg_{-i}(\boldsymbol{\beta})f_i(\boldsymbol{\beta}) \{\log(cg_{-i}(\boldsymbol{\beta})f_i(\boldsymbol{\beta}))-\log(g(\boldsymbol{\beta}))\} {\rm d}\boldsymbol{\beta},\] where \(c\) is a normalising constant.
The steps needed to perform this minimisation are given below. As we assume a normal prior, we let \(g_0(\boldsymbol{\beta})\) be equal to the prior. Using a normal prior also means \(g_0(\boldsymbol{\beta})\) will never need updating [21], so moment matching only needs to be applied to the \(n\) terms related to the likelihood.
For \(t = 1, \ldots,\)
For \(i = 1, \ldots, n\)
Compute the (natural) parameters of the cavity distribution \(g_{-i}(\boldsymbol{\beta})\),
\(\hat{\boldsymbol{\Sigma}}_{-i}^{-1} = \hat{\boldsymbol{\Sigma}}^{-1} -\hat{\boldsymbol{\Sigma}}_i^{-1}\), \(\hat{\boldsymbol{\Sigma}}_{-i}^{-1}\hat{\boldsymbol{\beta}}_{-i} =\hat{\boldsymbol{\Sigma}}^{-1}\hat{\boldsymbol{\beta}} - \hat{\boldsymbol{\Sigma}}_i^{-1}\hat{\boldsymbol{\beta}}_i \Rightarrow \hat{\boldsymbol{\beta}}_{-i} = \hat{\boldsymbol{\Sigma}}_{-i}(\hat{\boldsymbol{\Sigma}}^{-1}\hat{\boldsymbol{\beta}} - \hat{\boldsymbol{\Sigma}}_i^{-1}\hat{\boldsymbol{\beta}}_i)\).
Compute the parameters of \(g_{-i}(\boldsymbol{\eta}_i)\), where \(\boldsymbol{\eta}_i = {\boldsymbol{x}}_i'\hat{\boldsymbol{\beta}}\) and \({\boldsymbol{x}}_i\) are the covariate values, including intercept, for the \(i^\text{th}\) observation,
\(M_{-i} = {\boldsymbol{x}}_i'\hat{\boldsymbol{\beta}}_{-i}\), \(V_{-i} = {\boldsymbol{x}}_i'\hat{\boldsymbol{\Sigma}}_{-i}{\boldsymbol{x}}_i\)
Construct the un-normalised tilted distribution and calculate, \[\begin{align} E_k = \int_{-\infty}^{\infty} \boldsymbol{\eta}_i^k g_{-i}(\boldsymbol{\eta}_i)f_i(\boldsymbol{\eta}_i) d\boldsymbol{\eta}_i \quad\text{for k = 0, 1, 2}. \nonumber \end{align}\] Then moment match and set \(M = \frac{E_1}{E_0}\) and \(V = \frac{E_2}{E_0}-M^2\). Note in practice, we will need to specify finite bounds on the integral. The simplest choice would be \(M_{-i} \pm \delta\sqrt{V_{-i}}\) for suitably large \(\delta\).
Determine the natural parameters of \(g_i(\boldsymbol{\eta}_i)\),
\(M_i/V_i = M/V - M_{-i}/V_{-i}\), \(1/V_i = 1/V - 1/V_{-i}\).
Transform the natural parameters found in step 4 to those of \(g_i(\boldsymbol{\beta})\),
\(\hat{\boldsymbol{\Sigma}}_{i}^{-1}\hat{\boldsymbol{\beta}}_{i} = {\boldsymbol{x}}_iM_i/V_i, \hat{\boldsymbol{\Sigma}}_{i}^{-1} = {\boldsymbol{x}}_i(1/V_i){\boldsymbol{x}}_i'\)
Update the natural parameters of \(g(\boldsymbol{\beta})\),
\(\hat{\boldsymbol{\Sigma}}^{-1} = \hat{\boldsymbol{\Sigma}}_i^{-1}+ \hat{\boldsymbol{\Sigma}}_{-i}^{-1}\) and \(\hat{\boldsymbol{\Sigma}}^{-1}\hat{\boldsymbol{\beta}}=
\hat{\boldsymbol{\Sigma}}_i^{-1}\hat{\boldsymbol{\beta}}_i + \hat{\boldsymbol{\Sigma}}_{-i}^{-1}\hat{\boldsymbol{\beta}}_{-i}\).
Stop once estimates have converged.
Some versions, known as parallel EP, skip step 6, updating \(g(\boldsymbol{\beta})\) only after \(g_i(\boldsymbol{\beta})\) has been updated for all \(i\). In our example, we will implement sequential EP, which does not skip step 6.
Our interest for speeding up inference is focused on avoiding the numerical integrations in step 3, \[\begin{align} E_k = \int_{-\infty}^{\infty} \boldsymbol{\eta}_i^k g_{-i}(\boldsymbol{\eta}_i)f_i(\boldsymbol{\eta}_i) d\boldsymbol{\eta}_i \quad\text{for k = 0, 1, 2}. \label{EQEK} \end{align}\tag{26}\] To achieve this for logistic regression, this requires re-writing (26 ) as shown in Proposition [prop1].
Proof. As \(g_{-i}(\boldsymbol{\eta}_i)\) is a normal density with mean \({\boldsymbol{x}}_i\hat{\boldsymbol{\beta}}\) and variance \({{\boldsymbol{x}}_i'\hat{\boldsymbol{\Sigma}}{\boldsymbol{x}}_i}\), the equations in (26 ) correspond to the expected value of some function with respect to a normal random variable. We will now apply Stein’s Lemma [24] (see Result [hxExpect0] from main paper) to rewrite (26 ) in terms of derivatives of \(f_i(\boldsymbol{\eta}_i)\). We will assume that \(f_i(\boldsymbol{\eta}_i)\) is twice differentiable.
For \(E_0\), no change is required, as \(E_0 = E(f_i(\boldsymbol{\eta}_i))\). To re-write \(E_1\), we just re-arrange Result [hxExpect0] to \(E(Xh(X))= \sigma^2E(h'(X)) + \mu E(h(X))\). Hence \[\begin{align} E_1 = M_{-i}E(f_i(\boldsymbol{\eta}_i)) + V_{-i}E(f_i'(\boldsymbol{\eta}_i)) \end{align}\]
Re-writing \(E_2\) is more complicated. First let \(\tilde{h}(X) = Xh(X)\), and apply Result [hxExpect0], noting \(\tilde{h}'(X) = h(X) + Xh'(X)\), \[\begin{align} \sigma^2E((Xh(X))') &=& E((X-\mu)Xh(X)) \nonumber \\ \sigma^2E(h(X)) + \sigma^2E(Xh'(X)) &=& E(X^2h(X)) - \mu E(Xh(X)). \label{eqp2} \end{align}\tag{27}\]
Next substitute the formula for \(E_1\) into parts of both the left and right hand side of (27 ), but with \(h'(X)\) replacing \(h(X)\) in the substitution on the left hand side. \[\begin{align} \sigma^2E(h(X)) + \sigma^2E(Xh'(X)) &=& \sigma^2E(h(X)) + \sigma^2(\sigma^2E(h''(X)) + \mu E(h'(X)) ) \nonumber \\ &=& \sigma^2E(h(X)) + \sigma^4E(h''(X)) + \sigma^2\mu E(h'(X)) ) \tag{28} \\ E(X^2h(X)) - \mu E(Xh(X)) &=& E(X^2h(X)) - \mu (\sigma^2E(h'(X)) + \mu E(h(X))) \nonumber \\ &=& E(X^2h(X)) - \mu\sigma^2E(h'(X)) - \mu^2 E(h(X)). \tag{29} \end{align}\] As (28 29 ) are equal by (27 ), the result for \(E_2\) comes by re-arranging to make \(E(X^2h(X))\) the subject, \[\begin{align} E(X^2h(X)) &=& (\mu^2 + \sigma^2)E(h(X)) + 2\mu\sigma^2E(h'(X)) + \sigma^4E(h''(X)), \end{align}\] hence \[\begin{align} E_2 = (M_{-i}^2+ V_{-i})E(f_i(\boldsymbol{\eta}_i)) + 2M_{-i}V_{-i}E(f_i'(\boldsymbol{\eta}_i)) + V_{-i}^2E(f_i''(\boldsymbol{\eta}_i)). \end{align}\] ◻
Lastly, we can use result [hxExpect] (see main paper),
This allows us to re-write \(E_1, E_2\) as \[\begin{align} E_1 &=& M_{-i}E(f_i(\boldsymbol{\eta}_i)) + V_{-i}\frac{ {\rm d}E(f_i(\boldsymbol{\eta}_i))}{{\rm d}M_{-i}} \\ E_2 &=& (M_{-i}^2+ V_{-i})E(f_i(\boldsymbol{\eta}_i)) + 2M_{-i}V_{-i}\frac{ {\rm d}E(f_i(\boldsymbol{\eta}_i))}{{\rm d}M_{-i}} + V_{-i}^2\frac{ {\rm d}^2E(f_i(\boldsymbol{\eta}_i))}{{\rm d}M_{-i}^2}. \label{eqlat} \end{align}\tag{30}\]
For a binary logistic regression, with \(\boldsymbol{\eta}_i\) being normal, \(f_i(\boldsymbol{\eta}_i)\) corresponds to \({\boldsymbol{p}}_i = (1+ e^{-\boldsymbol{\eta}_i})^{-1}\), a logit-normal random variable with location \({\boldsymbol{x}}_i\hat{\boldsymbol{\beta}}\) and scale \(({\boldsymbol{x}}_i'\hat{\boldsymbol{\Sigma}}{\boldsymbol{x}}_i)^{0.5}\) parameters when \(y_i = 1\). If \(y_i = 0\), \(f_i(\boldsymbol{\eta}_i)= 1 - {\boldsymbol{p}}_i\). In addition, the logit-normal distribution has the symmetry, if \(P \sim \text{logit}\mathcal{N}(\mu,\sigma^2)\) then \(1- P \sim \text{logit}\mathcal{N}(-\mu,\sigma^2)\). Exploiting this symmetry, for binary logistic regression the integrals in (26 ) needed for moment matching can be compactly written as \[\begin{align} E_0 = E({\boldsymbol{p}}_i), \quad E_1 = (2{\boldsymbol{y}}_i-1)E(\boldsymbol{\eta}_i{\boldsymbol{p}}_i), \quad E_2 = E(\boldsymbol{\eta}_i^2{\boldsymbol{p}}_i) \label{bineq3} \end{align}\tag{31}\] where \({\boldsymbol{p}}_i \sim \text{logit}\mathcal{N}((2{\boldsymbol{y}}_i-1)M_{-i},V_{-i}), \boldsymbol{\eta}_i \sim \mathcal{N}((2{\boldsymbol{y}}_i-1)M_{-i},V_{-i})\). Applying the alternative form of \(E_0, E_1, E_2\) given in Proposition [prop1], specifically (30 ), we have shown implementing EP moment matching for logistic regression just requires a logit-normal first moment along with its first two derivatives w.r.t. \((2{\boldsymbol{y}}_i-1)M_{-i}\).
We propose that the expected value of a logit-normal random variable with location parameter \(\mu\) and scale parameter \(\sigma\) is very accurately approximated by the result of Proposition [EP46LN2new]. This result is obtained by determining the expected value of our proposed approximation of the logistic function given in (21 )
Proof. To determine the result given in Proposition [EP46LN2new], start by replacing \((1+e^{-x})^{-1}\) with the result of (21 ). This leads to the following representation of \(E(P)\): \[\begin{align} E(P) &\approx&\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{\infty} \bigg\{ \mathbb{1}_{x > 0} + (-1)^{\mathbb{1}_{x>0}}\sum_{i=1}^{N} ((-1)^{i-1}\mathbb{1}_{|x| \geq L}+ic_i\mathbb{1}_{|x| < L})e^{-i|x|}\bigg\} e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x, \nonumber \\ &=& \frac{1}{\sigma\sqrt{2\pi}}\bigg\{ \int_{0}^{\infty} e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x + \sum_{i=1}^{N}(-1)^{i-1} \int_{-\infty}^{-L} e^{ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x + \sum_{i=1}^{N}ic_i \int_{-L}^{0} e^{ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x \nonumber \\ &&- \sum_{i=1}^{N}(-1)^{i-1} \int_{L}^{\infty} e^{-ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x - \sum_{i=1}^{N}ic_i \int_{0}^{L} e^{-ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x\bigg\}. \label{eq3462} \end{align}\tag{32}\]
The five component integrals in (32 ) are examples of \(E(h(X)), X \sim \mathcal{N}(\mu,\sigma^2)\), that are known analytically. The specific terms are:
The remaining component integrals, denoted 2-5, are examples of a moment generating function of a normal distribution truncated at \((a, b)\) multiplied by \(\Phi((b-\mu)/\sigma)-\Phi((a-\mu)/\sigma)\). This integral is given in (34 ), \[\begin{align} \frac{1}{\sigma\sqrt{2\pi}}\int_{a}^{b}e^{tx} e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x &=& \frac{1}{\sigma\sqrt{2\pi}}\int_{a}^{b} e^{-\frac{(x^2-2(\mu+t\sigma)x+\mu^2)}{2\sigma^2}} {\rm d} x \nonumber \\ &=& \frac{1}{\sigma\sqrt{2\pi}}\int_{a}^{b} e^{-\frac{(x^2-2(\mu+t\sigma^2)x+(\mu+t\sigma^2)^2 -2t\mu\sigma^2 - t^2(\sigma^2)^2)}{2\sigma^2}} {\rm d} x \nonumber \\ &=& e^{t\mu+t^2\sigma^2/2}\times \frac{1}{\sigma\sqrt{2\pi}}\int_{a}^{b} e^{-\frac{(x-(\mu+t\sigma^2))^2}{2\sigma^2}} {\rm d} x \nonumber \\ &=& e^{t\mu+t^2\sigma^2/2}\{\Phi((b-\mu-t\sigma^2)/\sigma) -\Phi((a-\mu-t\sigma^2)/\sigma) \}. \label{eq46logNtrunc} \end{align}\tag{34}\]
Hence the value of the four remaining definite integrals appearing in \(E(P)\) are: \[\begin{align} 2.\frac{1}{\sigma\sqrt{2\pi}}\int_{-\infty}^{-L} e^{ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x &=& e^{i\mu+i^2\sigma^2/2}\{\Phi((-L-\mu-i\sigma^2)/\sigma) -\Phi((-\infty-\mu-i\sigma^2)/\sigma) \} \nonumber \\ &=& e^{i\mu+i^2\sigma^2/2}\Phi((-L-\mu-i\sigma^2)/\sigma).\tag{35} \\ 3.\frac{1}{\sigma\sqrt{2\pi}}\int_{-L}^{-0} e^{ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x &=& e^{i\mu+i^2\sigma^2/2}\{\Phi((0-\mu-i\sigma^2)/\sigma) -\Phi((-L-\mu-i\sigma^2)/\sigma) \} \nonumber \\ &=& e^{i\mu+i^2\sigma^2/2}\{\Phi((-\mu-i\sigma^2)/\sigma) -\Phi((-L-\mu-i\sigma^2)/\sigma) \}. \tag{36}\\ 4.\frac{1}{\sigma\sqrt{2\pi}}\int_{L}^{\infty} e^{-ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x &=& e^{-i\mu+i^2\sigma^2/2}\{\Phi((\infty-\mu+i\sigma^2)/\sigma) -\Phi((L-\mu+i\sigma^2)/\sigma) \} \nonumber \\ &=& e^{-i\mu+i^2\sigma^2/2}\{1-\Phi((L-\mu+i\sigma^2)/\sigma)\} \nonumber \\ &=& e^{-i\mu+i^2\sigma^2/2}\Phi((-L+\mu-i\sigma^2)/\sigma). \tag{37}\\ 5.\frac{1}{\sigma\sqrt{2\pi}}\int_{0}^{L} e^{-ix}e^{-\frac{(x-\mu)^2}{2\sigma^2}} {\rm d} x &=& e^{-i\mu+i^2\sigma^2/2}\{\Phi((L-\mu+i\sigma^2)/\sigma) -\Phi((0-\mu+i\sigma^2)/\sigma) \} \nonumber \\ &=& e^{-i\mu+i^2\sigma^2/2}\{ 1-\Phi((-L+\mu-i\sigma^2)/\sigma) -(1-\Phi((\mu-i\sigma^2)/\sigma)) \} \nonumber \\ &=& e^{-i\mu+i^2\sigma^2/2}\{\Phi((\mu-i\sigma^2)/\sigma) -\Phi((-L+\mu-i\sigma^2)/\sigma) \}.\tag{38} \end{align}\]
Substituting the result of (33 ) and (35 38 ) into (32 ) gives the result stated in Proposition [EP46LN2new]. ◻
We propose the \(k^\text{th}\) moment of a logit-normal random variable can be found using the result of Proposition [EP46LN2high] (see main paper). We now will prove this result using induction. As part of the proof, we will use the formula for the expected value of the derivatives of \(E(P)\) with respect to \(\mu\) given in the main text. As a reminder, this showed that derivatives of the logistic function can be approximated by (23 ) and the expected value of \(\frac{{\rm d}^kE(P)}{{\rm d}\mu^k}\), can be approximated using the same results for component integrals from (35 38 ) as shown in (24 ).
Proof. 1. Proving the result holds for \(k = 2\).
To find \(E(P^2)\), we need \(E(P)\) and \(\frac{{\rm d}E(P)}{{\rm d}\mu}\). \(E(P)\) was given in Proposition [EP46LN2new], and \(\frac{{\rm d}E(P)}{{\rm d}\mu}\) can be found by setting \(k=1\) in (24 ), and corresponds to \[\begin{align} \frac{{\rm d}E(P)}{{\rm d}\mu} &=& \sum_{i=1}^{N} i(-1)^{i-1}\left\{e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) +e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\} \nonumber \\ &&+\sum_{i=1}^{N} i^2c_ie^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&+\sum_{i=1}^{N} i^{2}c_ie^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}. \label{eq46EO1diff} \end{align}\tag{39}\]
Putting these together, \(E(P^2)\) is approximately: \[\begin{align} E(P^2) &=& E(P)- \frac{{\rm d}E(P)}{{\rm d}\mu} \nonumber \\ &\approx& \Phi(\mu/\sigma) + \sum_{i=1}^{N} (-1)^{i-1}(1-i)e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&- \sum_{i=1}^{N} (-1)^{i-1}(1+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} i(1-i)c_ie^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&-\sum_{i=1}^{N} i(1+i)c_ie^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\} \label{eq46EP2} \end{align}\tag{40}\]
If \(k=2\), then \(\prod_{j=1}^{k-1}(j-i), \prod_{j=1}^{k-1}(j+i)\) are equal to \(1-i\) and \(1+i\) respectively, and \({1}/{(k-1)!} =1\). Hence (40 ) satisfies Proposition [EP46LN2high].
2. Assume Proposition [EP46LN2high] holds for \(k\), and show this means \(E(P^{k+1})\) must satisfy the proposition.
To find \(E(P^{k+1})\), we need \(E(P^k)\) and \({{\rm d}E(P^k)}/{{\rm d}\mu}\). We assume \(E(P^k)\) follows the result of Proposition [EP46LN2high]. This leaves us needing to find \({{\rm d}E(P^k)}/{{\rm d}\mu}\). To find this derivative, we use the re-parametrisation trick, \({{\rm d}E(P^k)}/{{\rm d}\mu}= E({{\rm d}p(x)^k}/{{\rm d}x})\).
Undoing the expectation step for \(P^k\), the underlying function \(p(x)^k\) corresponds to \[\begin{align} p(x)^k &\approx& \mathbb{1}_{x>0} + \frac{(-1)^{\mathbb{1}_{x>0}}}{(k-1)!}\sum_{i=1}^{N} \bigg(\prod_{j=1}^{k-1}(j-i(-1)^{\mathbb{1}_{x>0}})\bigg)\{(-1)^{i-1}\mathbb{1}_{|x| \geq L} +ic_i\mathbb{1}_{|x| < L}\} e^{-i|x|}, \label{pk} \end{align}\tag{41}\] which follows as
Negative terms before the sums in the expectation of \(P^k\) correspond to integrals of a function w.r.t a normal density taken over positive real numbers, and positive terms to integrals of a function w.r.t a normal density taken over negative real numbers. Hence \((-1)^{\mathbb{1}_{x>0}}\) appears before the sum in the underlying function.
The product term contained \(j+i\) when the integral was over positive real numbers, and \(j-i\) when the integral was over negative real numbers. Hence \(\prod_{j=1}^{k-1}(j-i(-1)^{\mathbb{1}_{x>0}})\) must appear in the underlying function.
The term \(\Phi(\mu/\sigma)\) implies an integration of a normal density over all positive real numbers. Hence \(\mathbb{1}_{x>0}\) appears in the underlying function.
Having determined \(p(x)^k\), \({{\rm d}p(x)^k}/{{\rm d}x}\) is \[\begin{align} \frac{{\rm d}p(x)^k}{{\rm d}x} &\approx& \frac{1}{(k-1)!}\sum_{i=1}^{N}i \bigg(\prod_{j=1}^{k-1}(j-i(-1)^{\mathbb{1}_{x>0}})\bigg)\{(-1)^{i-1}\mathbb{1}_{|x| \geq L} +ic_i\mathbb{1}_{|x| < L}\} e^{-i|x|}, \label{Epk} \end{align}\tag{42}\] where \((-1)^{\mathbb{1}_{x>0}}\) disappears as the derivative of \(e^{-i|x|}\) is \(ie^{-i|x|}\) if \(x \leq 0\) and \(-ie^{-i|x|}\) if \(x \geq 0\). Note: while strictly speaking \(e^{-i|x|}\) would not be differentiable at 0, our function is designed as piecewise with transition point at 0.
Hence, \({{\rm d}E(P^k)}/{{\rm d}\mu}\) can be evaluated using the component integrals (35 38 ), first used to determine \(E(P)\) as \[\begin{align} \frac{{\rm d}E(P^k)}{{\rm d}\mu} &=& \frac{1}{(k-1)!}\bigg(\sum_{i=1}^{N} i(-1)^{i-1}\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ && +\sum_{i=1}^{N} i(-1)^{i-1}\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} i^{2}c_i\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&+\sum_{i=1}^{N} i^{2}c_i\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}\bigg). \label{eq46EPkdiff} \end{align}\tag{43}\]
Lastly, we know by the recursion formula (see main text) that for a logit-normal random variable, \(E(P^{k+1})= E(P^k) - \frac{1}{k} \frac{{\rm d}E(P^k)}{{\rm d}\mu}\). This means that \(E(P^{k+1})\) is \[\begin{align} E(P^{k+1}) &=& E(P^k) - \frac{1}{k} \frac{{\rm d}E(P^k)}{{\rm d}\mu} \nonumber \\ &\approx& \Phi(\mu/\sigma) + \frac{1}{(k-1)!}\bigg(\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k-1}(j-i) e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&-\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} ic_i\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&-\sum_{i=1}^{N} ic_i\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}\bigg) \nonumber \\ && - \frac{1}{k}\frac{1}{(k-1)!}\bigg(\sum_{i=1}^{N} i(-1)^{i-1}\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ && +\sum_{i=1}^{N} i(-1)^{i-1}\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} i^{2}c_i\prod_{j=1}^{k-1}(j-i)e^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&+\sum_{i=1}^{N} i^{2}c_i\prod_{j=1}^{k-1}(j+i)e^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}\bigg). \label{eqEPK} \end{align}\tag{44}\]
Grouping like terms in (44 ), we just need to simplify, \[\begin{align} \frac{1}{(k-1)!}\prod_{j=1}^{k-1}(j-i) - \frac{1}{k!}i\prod_{j=1}^{k-1}(j-i) &=& \frac{k-i}{k!}\prod_{j=1}^{k-1}(j-i) = \frac{1}{k!}\prod_{j=1}^{k}(j-i) \\ -\frac{1}{(k-1)!}\prod_{j=1}^{k-1}(j+i) - \frac{1}{k!}i\prod_{j=1}^{k-1}(j+i) &=& \frac{-k-i}{k!}\prod_{j=1}^{k-1}(j+i) = -\frac{1}{k!}\prod_{j=1}^{k}(j+i), \end{align}\] giving us \[\begin{align} E(P^{k+1}) &\approx& \Phi(\mu/\sigma) + \frac{1}{k!}\bigg(\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k}(j-i) e^{\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&-\sum_{i=1}^{N} (-1)^{i-1}\prod_{j=1}^{k}(j+i)e^{-\mu i+\sigma^2i^2/2}\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \nonumber \\ &&+\sum_{i=1}^{N} ic_i\prod_{j=1}^{k}(j-i)e^{\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{-\mu-\sigma^2 i}{\sigma}\right) - \Phi\left(\frac{-L-\mu-\sigma^2 i}{\sigma}\right)\right\}\nonumber \\ &&-\sum_{i=1}^{N} ic_i\prod_{j=1}^{k}(j+i)e^{-\mu i+\sigma^2i^2/2}\left\{\Phi\left(\frac{\mu-\sigma^2 i}{\sigma}\right)-\Phi\left(\frac{-L+\mu-\sigma^2 i}{\sigma}\right) \right\}\bigg) \label{eqEPKfinal} \end{align}\tag{45}\] which corresponds to Proposition [EP46LN2high], if \(k\) is replaced with \(k+1\). Hence by induction Proposition [EP46LN2high] holds for all \(k \geq 2\). ◻
In the main text, we showed that our approach provided accurate estimates of the expected value and variance of a logit-normal random variable for a wide range of values of \(\mu, \sigma\). In this section, we will show our approximations maintain accuracy up to at least the fourth moment. This is unsurprising as our approximation of the underlying functions is accurate up to the third derivative of the logistic function. We also include calculations for skewness and kurtosis. This have been put in to highlight when the numerator moments are divided by a variance near zero, numerical instability will result, even if the component moments are well estimated.
| \(\sigma\) | \(E(P^2)\) | Error | \(E(P^2)\) | Error | \(E(P^2)\) | Error | \(E(P^2)\) | Error | \(E(P^2)\) | Error |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | 0.250000 | \(-7.1\times 10^{-8}\) | 0.604195 | \(4.4\times 10^{-10}\) | 0.854038 | \(5.2\times 10^{-12}\) | 0.954573 | \(7.1\times 10^{-12}\) | 0.986659 | \(7.5\times 10^{-12}\) |
| 0.010 | 0.250006 | \(-4.5\times 10^{-8}\) | 0.604191 | \(4.4\times 10^{-10}\) | 0.854033 | \(5.2\times 10^{-12}\) | 0.954571 | \(7.1\times 10^{-12}\) | 0.986658 | \(7.3\times 10^{-12}\) |
| 0.100 | 0.250622 | \(-7.2\times 10^{-9}\) | 0.603751 | \(-4.2\times 10^{-10}\) | 0.853538 | \(4.0\times 10^{-12}\) | 0.954369 | \(7.1\times 10^{-12}\) | 0.986594 | \(7.3\times 10^{-12}\) |
| 0.250 | 0.253789 | \(-3.3\times 10^{-9}\) | 0.601501 | \(-8.4\times 10^{-9}\) | 0.850924 | \(-7.2\times 10^{-11}\) | 0.953285 | \(7.1\times 10^{-12}\) | 0.986249 | \(7.3\times 10^{-12}\) |
| 0.500 | 0.263956 | \(-1.9\times 10^{-9}\) | 0.594438 | \(-8.0\times 10^{-9}\) | 0.841786 | \(-2.0\times 10^{-9}\) | 0.949288 | \(6.0\times 10^{-12}\) | 0.984951 | \(7.4\times 10^{-12}\) |
| 1.000 | 0.293379 | \(-3.5\times 10^{-9}\) | 0.575671 | \(-5.2\times 10^{-9}\) | 0.809342 | \(-3.4\times 10^{-9}\) | 0.931887 | \(-4.7\times 10^{-10}\) | 0.978699 | \(-8.0\times 10^{-12}\) |
| 1.500 | 0.323272 | \(-4.1\times 10^{-9}\) | 0.559314 | \(-4.1\times 10^{-9}\) | 0.769259 | \(-3.0\times 10^{-9}\) | 0.902092 | \(-1.2\times 10^{-9}\) | 0.964992 | \(-2.5\times 10^{-10}\) |
| 2.500 | 0.368925 | \(-3.4\times 10^{-9}\) | 0.539014 | \(-3.2\times 10^{-9}\) | 0.700705 | \(-2.5\times 10^{-9}\) | 0.828797 | \(-1.7\times 10^{-9}\) | 0.913925 | \(-8.9\times 10^{-10}\) |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 0.316043 | \(1.2\times 10^{-10}\) | 0.668428 | \(-4.6\times 10^{-9 }\) | 0.883437 | \(6.5\times 10^{-12}\) | 0.964351 | \(7.2\times 10^{-12}\) | 0.989587 | \(7.5\times 10^{-12}\) |
| 0.010 | 0.316047 | \(1.1\times 10^{-10}\) | 0.668423 | \(-3.5\times 10^{-8 }\) | 0.883433 | \(6.5\times 10^{-12}\) | 0.964349 | \(7.1\times 10^{-12}\) | 0.989587 | \(7.3\times 10^{-12}\) |
| 0.100 | 0.316474 | \(-9.8\times 10^{-10}\) | 0.667878 | \(-3.4\times 10^{-8 }\) | 0.883002 | \(6.4\times 10^{-12}\) | 0.964187 | \(7.1\times 10^{-12}\) | 0.989536 | \(7.3\times 10^{-12}\) |
| 0.250 | 0.318679 | \(-2.1\times 10^{-9}\) | 0.665071 | \(-1.8\times 10^{-8 }\) | 0.880719 | \(1.9\times 10^{-12}\) | 0.963315 | \(7.1\times 10^{-12}\) | 0.989265 | \(7.3\times 10^{-12}\) |
| 0.500 | 0.325812 | \(-1.8\times 10^{-9}\) | 0.656012 | \(-9.8\times 10^{-9 }\) | 0.872619 | \(-7.2\times 10^{-10}\) | 0.960079 | \(7.2\times 10^{-12}\) | 0.988242 | \(7.4\times 10^{-12}\) |
| 1.000 | 0.346812 | \(-3.7\times 10^{-9}\) | 0.630256 | \(-5.3\times 10^{-9 }\) | 0.842416 | \(-2.6\times 10^{-9}\) | 0.945599 | \(-2.6\times 10^{-10}\) | 0.983263 | \(1.3\times 10^{-12}\) |
| 1.500 | 0.368515 | \(-4.2\times 10^{-9}\) | 0.605885 | \(-4.0\times 10^{-9 }\) | 0.802489 | \(-2.6\times 10^{-9}\) | 0.919330 | \(-9.4\times 10^{-10}\) | 0.971945 | \(-1.7\times 10^{-10}\) |
| 2.500 | 0.402108 | \(-3.4\times 10^{-9}\) | 0.573000 | \(-3.1\times 10^{-9 }\) | 0.729570 | \(-2.4\times 10^{-9}\) | 0.849251 | \(-1.5\times 10^{-9}\) | 0.926121 | \(-7.6\times 10^{-10}\) |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 0.387456 | \(5.8\times 10^{-10}\) | 0.725824 | \(-8.3\times 10^{-9}\) | 0.907397 | \(6.7\times 10^{-12}\) | 0.972071 | \(7.4\times 10^{-12}\) | 0.991876 | \(7.5\times 10^{-12}\) |
| 0.010 | 0.387458 | \(5.7\times 10^{-10}\) | 0.725818 | \(-8.4\times 10^{-9}\) | 0.907394 | \(6.7\times 10^{-12}\) | 0.972069 | \(7.2\times 10^{-12}\) | 0.991876 | \(7.3\times 10^{-12}\) |
| 0.100 | 0.387649 | \(1.6\times 10^{-11}\) | 0.725228 | \(-1.5\times 10^{-8}\) | 0.907028 | \(6.7\times 10^{-12}\) | 0.971939 | \(7.2\times 10^{-12}\) | 0.991836 | \(7.4\times 10^{-12}\) |
| 0.250 | 0.388653 | \(-6.0\times 10^{-10}\) | 0.722166 | \(-1.6\times 10^{-8}\) | 0.905084 | \(6.4\times 10^{-12}\) | 0.971243 | \(7.2\times 10^{-12}\) | 0.991623 | \(7.4\times 10^{-12}\) |
| 0.500 | 0.392049 | \(-2.1\times 10^{-9}\) | 0.712052 | \(-9.4\times 10^{-9}\) | 0.898100 | \(-2.1\times 10^{-10}\) | 0.968645 | \(7.3\times 10^{-12}\) | 0.990820 | \(7.4\times 10^{-12}\) |
| 1.000 | 0.403041 | \(-4.0\times 10^{-9}\) | 0.681546 | \(-5.1\times 10^{-9}\) | 0.870854 | \(-1.9\times 10^{-9}\) | 0.956745 | \(-1.4\times 10^{-10}\) | 0.986873 | \(5.2\times 10^{-12}\) |
| 1.500 | 0.415449 | \(-4.2\times 10^{-9}\) | 0.650656 | \(-3.9\times 10^{-9}\) | 0.832328 | \(-2.3\times 10^{-9}\) | 0.933962 | \(-7.1\times 10^{-10}\) | 0.977610 | \(-1.1\times 10^{-10}\) |
| 2.500 | 0.435962 | \(-3.4\times 10^{-9}\) | 0.606385 | \(-3.0\times 10^{-9}\) | 0.756900 | \(-2.2\times 10^{-9}\) | 0.867946 | \(-1.3\times 10^{-9}\) | 0.936904 | \(-6.5\times 10^{-10}\) |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 0.461284 | \(-1.4\times 10^{-10}\) | 0.775803 | \(-4.2\times 10^{-10}\) | 0.926740 | \(6.9\times 10^{-12}\) | 0.978147 | \(7.4\times 10^{-12}\) | 0.993665 | \(7.5\times 10^{-12}\) |
| 0.010 | 0.461283 | \(-1.4\times 10^{-10}\) | 0.775798 | \(-4.3\times 10^{-10}\) | 0.926736 | \(6.8\times 10^{-12}\) | 0.978146 | \(7.2\times 10^{-12}\) | 0.993664 | \(7.3\times 10^{-12}\) |
| 0.100 | 0.461229 | \(-5.3\times 10^{-11}\) | 0.775211 | \(-8.6\times 10^{-10}\) | 0.926432 | \(6.9\times 10^{-12}\) | 0.978043 | \(7.2\times 10^{-12}\) | 0.993633 | \(7.4\times 10^{-12}\) |
| 0.250 | 0.460978 | \(-1.8\times 10^{-10}\) | 0.772143 | \(-5.6\times 10^{-9}\) | 0.924809 | \(6.8\times 10^{-12}\) | 0.977489 | \(7.2\times 10^{-12}\) | 0.993467 | \(7.4\times 10^{-12}\) |
| 0.500 | 0.460443 | \(-3.1\times 10^{-9}\) | 0.761797 | \(-7.1\times 10^{-9}\) | 0.918918 | \(-4.2\times 10^{-11}\) | 0.975418 | \(7.4\times 10^{-12}\) | 0.992837 | \(7.4\times 10^{-12}\) |
| 1.000 | 0.460811 | \(-4.5\times 10^{-9}\) | 0.728780 | \(-4.7\times 10^{-9}\) | 0.894970 | \(-1.3\times 10^{-9}\) | 0.965738 | \(-6.9\times 10^{-11}\) | 0.989719 | \(6.7\times 10^{-12}\) |
| 1.500 | 0.463380 | \(-4.2\times 10^{-9}\) | 0.693082 | \(-3.6\times 10^{-9}\) | 0.858792 | \(-1.9\times 10^{-9}\) | 0.946264 | \(-5.2\times 10^{-10}\) | 0.982197 | \(-6.9\times 10^{-11}\) |
| 2.500 | 0.470236 | \(-3.3\times 10^{-9}\) | 0.638936 | \(-2.8\times 10^{-9}\) | 0.782592 | \(-2.0\times 10^{-9}\) | 0.884917 | \(-1.2\times 10^{-9}\) | 0.946376 | \(-5.5\times 10^{-10}\) |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | 0.534447 | \(-1.1\times 10^{-10}\) | 0.818393 | \(-1.6\times 10^{-11}\) | 0.942235 | \(7.0\times 10^{-12}\) | 0.982919 | \(7.4\times 10^{-12}\) | 0.995061 | \(7.5\times 10^{-12}\) |
| 0.010 | 0.534444 | \(-1.1\times 10^{-10}\) | 0.818387 | \(-1.6\times 10^{-11}\) | 0.942232 | \(7.0\times 10^{-12}\) | 0.982918 | \(7.3\times 10^{-12}\) | 0.995061 | \(7.4\times 10^{-12}\) |
| 0.100 | 0.534171 | \(-3.3\times 10^{-11}\) | 0.817836 | \(-3.8\times 10^{-11}\) | 0.941983 | \(7.0\times 10^{-12}\) | 0.982836 | \(7.3\times 10^{-12}\) | 0.995036 | \(7.4\times 10^{-12}\) |
| 0.250 | 0.532792 | \(-1.5\times 10^{-9}\) | 0.814942 | \(-8.9\times 10^{-10}\) | 0.940649 | \(7.0\times 10^{-12}\) | 0.982398 | \(7.3\times 10^{-12}\) | 0.994906 | \(7.4\times 10^{-12}\) |
| 0.500 | 0.528640 | \(-5.3\times 10^{-9}\) | 0.804991 | \(-4.2\times 10^{-9}\) | 0.935763 | \(-1.8\times 10^{-12}\) | 0.980755 | \(7.4\times 10^{-12}\) | 0.994413 | \(7.4\times 10^{-12}\) |
| 1.000 | 0.518791 | \(-4.9\times 10^{-9}\) | 0.771459 | \(-4.1\times 10^{-9}\) | 0.915164 | \(-8.3\times 10^{-10}\) | 0.972949 | \(-2.9\times 10^{-11}\) | 0.991958 | \(7.3\times 10^{-12}\) |
| 1.500 | 0.511579 | \(-4.2\times 10^{-9}\) | 0.732723 | \(-3.3\times 10^{-9}\) | 0.881989 | \(-1.5\times 10^{-9}\) | 0.956517 | \(-3.7\times 10^{-10}\) | 0.985890 | \(-1.3\times 10^{-9}\) |
| 2.500 | 0.504674 | \(-3.3\times 10^{-9}\) | 0.670439 | \(-2.7\times 10^{-9}\) | 0.806572 | \(-1.8\times 10^{-9}\) | 0.900219 | \(-1.0\times 10^{-9}\) | 0.954646 | \(-4.6\times 10^{-10}\) |
| \(\sigma\) | \(E(P^3)\) | Error | \(E(P^3)\) | Error | \(E(P^3)\) | Error | \(E(P^3)\) | Error | \(E(P^3)\) | Error |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | 0.125000 | \(-1.1\times 10^{-7 }\) | 0.469641 | \(-3.2\times 10^{-9 }\) | 0.789252 | \(-1.9\times 10^{-12 }\) | 0.932640 | \(6.9\times 10^{-12 }\) | 0.980056 | \(7.4\times 10^{-12 }\) |
| 0.010 | 0.125009 | \(-6.7\times 10^{-8 }\) | 0.469639 | \(-3.2\times 10^{-9 }\) | 0.789246 | \(-2.0\times 10^{-12 }\) | 0.932637 | \(6.9\times 10^{-12 }\) | 0.980055 | \(7.2\times 10^{-12 }\) |
| 0.100 | 0.125933 | \(-1.1\times 10^{-8 }\) | 0.469472 | \(-3.4\times 10^{-9 }\) | 0.788628 | \(-1.0\times 10^{-11 }\) | 0.932347 | \(6.9\times 10^{-12 }\) | 0.979960 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.130684 | \(-5.0\times 10^{-9 }\) | 0.468658 | \(-5.4\times 10^{-8 }\) | 0.785386 | \(-5.3\times 10^{-10 }\) | 0.930803 | \(6.9\times 10^{-12 }\) | 0.979449 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.145933 | \(-2.8\times 10^{-9 }\) | 0.466537 | \(-5.2\times 10^{-8 }\) | 0.774340 | \(-1.3\times 10^{-8 }\) | 0.925154 | \(-1.9\times 10^{-12 }\) | 0.977535 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.190069 | \(-5.3\times 10^{-9 }\) | 0.463836 | \(-3.2\times 10^{-8 }\) | 0.738415 | \(-2.2\times 10^{-8 }\) | 0.901605 | \(-3.3\times 10^{-9 }\) | 0.968469 | \(-9.9\times 10^{-11 }\) |
| 1.500 | 0.234908 | \(-6.2\times 10^{-9 }\) | 0.464784 | \(-2.0\times 10^{-8 }\) | 0.699445 | \(-1.8\times 10^{-8 }\) | 0.864833 | \(-7.9\times 10^{-9 }\) | 0.949646 | \(-1.7\times 10^{-9 }\) |
| 2.500 | 0.303387 | \(-5.1\times 10^{-9 }\) | 0.470603 | \(-9.5\times 10^{-9 }\) | 0.641524 | \(-1.1\times 10^{-8 }\) | 0.786117 | \(-8.6\times 10^{-9 }\) | 0.888054 | \(-5.1\times 10^{-9 }\) |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 0.177672 | \(1.3\times 10^{-8 }\) | 0.546490 | \(2.7\times 10^{-08 }\) | 0.830354 | \(5.8\times 10^{-12 }\) | 0.947006 | \(7.1\times 10^{-12 }\) | 0.984421 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.177680 | \(1.2\times 10^{-8 }\) | 0.546486 | \(-2.0\times 10^{-7 }\) | 0.830349 | \(5.7\times 10^{-12 }\) | 0.947004 | \(7.0\times 10^{-12 }\) | 0.984421 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.178543 | \(-6.5\times 10^{-9 }\) | 0.546088 | \(-2.2\times 10^{-7 }\) | 0.829786 | \(5.3\times 10^{-12 }\) | 0.946769 | \(7.0\times 10^{-12 }\) | 0.984346 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.182969 | \(-6.9\times 10^{-9 }\) | 0.544081 | \(-1.2\times 10^{-7 }\) | 0.826822 | \(-2.6\times 10^{-11 }\) | 0.945511 | \(7.0\times 10^{-12 }\) | 0.983943 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.197026 | \(-4.9\times 10^{-9 }\) | 0.538053 | \(-6.5\times 10^{-8 }\) | 0.816526 | \(-4.9\times 10^{-9 }\) | 0.940878 | \(6.2\times 10^{-12 }\) | 0.982429 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.236755 | \(-1.1\times 10^{-8 }\) | 0.524085 | \(-3.3\times 10^{-8 }\) | 0.780988 | \(-1.7\times 10^{-8 }\) | 0.920884 | \(-1.9\times 10^{-9 }\) | 0.975159 | \(-3.6\times 10^{-11 }\) |
| 1.500 | 0.276117 | \(-9.7\times 10^{-9 }\) | 0.514345 | \(-2.1\times 10^{-8 }\) | 0.739409 | \(-1.6\times 10^{-8 }\) | 0.887551 | \(5.3\times 10^{-8 }\) | 0.959401 | \(-1.1\times 10^{-9 }\) |
| 2.500 | 0.334990 | \(-6.1\times 10^{-9 }\) | 0.505548 | \(-1.0\times 10^{-8 }\) | 0.673335 | \(-1.1\times 10^{-8 }\) | 0.810109 | \(-7.9\times 10^{-9 }\) | 0.903176 | \(-4.5\times 10^{-9 }\) |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 0.241175 | \(2.0\times 10^{-9 }\) | 0.618367 | \(-5.7\times 10^{-8 }\) | 0.864363 | \(6.4\times 10^{-12 }\) | 0.958400 | \(7.3\times 10^{-12 }\) | 0.987839 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.241182 | \(2.0\times 10^{-9 }\) | 0.618362 | \(-5.8\times 10^{-8 }\) | 0.864358 | \(6.4\times 10^{-12 }\) | 0.958398 | \(7.1\times 10^{-12 }\) | 0.987839 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.241869 | \(-3.4\times 10^{-10 }\) | 0.617810 | \(-1.0\times 10^{-7 }\) | 0.863865 | \(6.4\times 10^{-12 }\) | 0.958209 | \(7.1\times 10^{-12 }\) | 0.987780 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.245393 | \(-2.8\times 10^{-9 }\) | 0.614985 | \(-1.0\times 10^{-7 }\) | 0.861255 | \(4.7\times 10^{-12 }\) | 0.957195 | \(7.1\times 10^{-12 }\) | 0.987463 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.256636 | \(-8.9\times 10^{-9 }\) | 0.606103 | \(-6.3\times 10^{-8 }\) | 0.852035 | \(-1.4\times 10^{-9 }\) | 0.953437 | \(7.2\times 10^{-12 }\) | 0.986270 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.288603 | \(-1.7\times 10^{-8 }\) | 0.582812 | \(-3.3\times 10^{-8 }\) | 0.818423 | \(-1.2\times 10^{-8 }\) | 0.936736 | \(-1.0\times 10^{-9 }\) | 0.980474 | \(-9.3\times 10^{-12 }\) |
| 1.500 | 0.320344 | \(-1.3\times 10^{-8 }\) | 0.563295 | \(-2.1\times 10^{-8 }\) | 0.776046 | \(-1.4\times 10^{-8 }\) | 0.907121 | \(-4.7\times 10^{-9 }\) | 0.967424 | \(-7.5\times 10^{-10 }\) |
| 2.500 | 0.367749 | \(-7.2\times 10^{-9 }\) | 0.540375 | \(-1.1\times 10^{-8 }\) | 0.703849 | \(-1.0\times 10^{-8 }\) | 0.832295 | \(-7.2\times 10^{-9 }\) | 0.916684 | \(-3.8\times 10^{-9 }\) |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 0.313294 | \(-4.0\times 10^{-9 }\) | 0.683325 | \(-3.0\times 10^{-9 }\) | 0.892147 | \(6.6\times 10^{-12 }\) | 0.967400 | \(7.3\times 10^{-12 }\) | 0.990512 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.313298 | \(-3.9\times 10^{-9 }\) | 0.683319 | \(-3.0\times 10^{-9 }\) | 0.892143 | \(6.6\times 10^{-12 }\) | 0.967399 | \(7.2\times 10^{-12 }\) | 0.990512 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.313720 | \(-1.2\times 10^{-9 }\) | 0.682689 | \(-6.0\times 10^{-9 }\) | 0.891722 | \(6.6\times 10^{-12 }\) | 0.967247 | \(7.2\times 10^{-12 }\) | 0.990466 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.315905 | \(-1.1\times 10^{-9 }\) | 0.679429 | \(-3.8\times 10^{-8 }\) | 0.889487 | \(6.5\times 10^{-12 }\) | 0.966436 | \(7.2\times 10^{-12 }\) | 0.990217 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.323076 | \(-1.8\times 10^{-8 }\) | 0.668848 | \(-4.8\times 10^{-8 }\) | 0.881482 | \(-3.3\times 10^{-10 }\) | 0.963416 | \(7.3\times 10^{-12 }\) | 0.989280 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.344614 | \(-2.3\times 10^{-8 }\) | 0.638745 | \(-3.1\times 10^{-8 }\) | 0.850805 | \(-8.5\times 10^{-9 }\) | 0.949650 | \(-5.0\times 10^{-10 }\) | 0.984681 | \(1.4\times 10^{-12 }\) |
| 1.500 | 0.367003 | \(-1.6\times 10^{-8 }\) | 0.610889 | \(-2.1\times 10^{-8 }\) | 0.809179 | \(-1.2\times 10^{-8 }\) | 0.923801 | \(-3.4\times 10^{-9 }\) | 0.973974 | \(-4.8\times 10^{-10 }\) |
| 2.500 | 0.401438 | \(-8.1\times 10^{-9 }\) | 0.574815 | \(-1.1\times 10^{-8 }\) | 0.732901 | \(-9.8\times 10^{-9 }\) | 0.852665 | \(-3.8\times 10^{-9 }\) | 0.928670 | \(-3.3\times 10^{-9 }\) |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | 0.390712 | \(3.1\times 10^{-9 }\) | 0.740359 | \(-1.5\times 10^{-10 }\) | 0.914616 | \(6.8\times 10^{-12 }\) | 0.974488 | \(7.4\times 10^{-12 }\) | 0.992601 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.390713 | \(3.1\times 10^{-9 }\) | 0.740353 | \(-1.5\times 10^{-10 }\) | 0.914612 | \(6.8\times 10^{-12 }\) | 0.974486 | \(7.2\times 10^{-12 }\) | 0.992600 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.390832 | \(1.1\times 10^{-9 }\) | 0.739706 | \(-3.0\times 10^{-10 }\) | 0.914261 | \(6.8\times 10^{-12 }\) | 0.974366 | \(7.2\times 10^{-12 }\) | 0.992564 | \(7.4\times 10^{-12 }\) |
| 0.250 | 0.391483 | \(-9.4\times 10^{-9 }\) | 0.736336 | \(-6.2\times 10^{-9 }\) | 0.912387 | \(6.7\times 10^{-12 }\) | 0.973722 | \(7.2\times 10^{-12 }\) | 0.992369 | \(7.4\times 10^{-12 }\) |
| 0.500 | 0.393962 | \(-3.4\times 10^{-8 }\) | 0.725109 | \(-2.8\times 10^{-8 }\) | 0.905600 | \(-5.5\times 10^{-11 }\) | 0.971310 | \(7.4\times 10^{-12 }\) | 0.991634 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.403509 | \(-2.8\times 10^{-8 }\) | 0.690856 | \(-2.7\times 10^{-8 }\) | 0.878400 | \(-5.6\times 10^{-9 }\) | 0.960088 | \(-2.3\times 10^{-10 }\) | 0.988000 | \(5.5\times 10^{-12 }\) |
| 1.500 | 0.415404 | \(-1.8\times 10^{-8 }\) | 0.656459 | \(-2.0\times 10^{-8 }\) | 0.838757 | \(-9.9\times 10^{-9 }\) | 0.937877 | \(-2.4\times 10^{-9 }\) | 0.979287 | \(-3.0\times 10^{-10 }\) |
| 2.500 | 0.435809 | \(-8.9\times 10^{-9 }\) | 0.608611 | \(-1.1\times 10^{-8 }\) | 0.760358 | \(-9.2\times 10^{-9 }\) | 0.871238 | \(-5.8\times 10^{-9 }\) | 0.939237 | \(-2.8\times 10^{-9 }\) |
| \(\sigma\) | \(E(P^4)\) | Error | \(E(P^4)\) | Error | \(E(P^4)\) | Error | \(E(P^4)\) | Error | \(E(P^4)\) | Error |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | 0.062456 | \(-4.4\times 10^{-5 }\) | 0.365052 | \(-1.5\times 10^{-8 }\) | 0.729381 | \(-3.3\times 10^{-11 }\) | 0.911210 | \(6.8\times 10^{-12 }\) | 0.973496 | \(7.4\times 10^{-12 }\) |
| 0.010 | 0.062476 | \(-3.3\times 10^{-5 }\) | 0.365054 | \(-1.5\times 10^{-8 }\) | 0.729374 | \(-3.4\times 10^{-11 }\) | 0.911206 | \(6.7\times 10^{-12 }\) | 0.973495 | \(7.2\times 10^{-12 }\) |
| 0.100 | 0.063427 | \(-6.8\times 10^{-6 }\) | 0.365237 | \(-3.2\times 10^{-8 }\) | 0.728696 | \(-7.3\times 10^{-11 }\) | 0.910839 | \(6.7\times 10^{-12 }\) | 0.973370 | \(7.2\times 10^{-12 }\) |
| 0.250 | 0.068223 | \(-2.8\times 10^{-6 }\) | 0.366230 | \(-2.9\times 10^{-7 }\) | 0.725165 | \(-2.7\times 10^{-9 }\) | 0.908882 | \(6.7\times 10^{-12 }\) | 0.972699 | \(7.2\times 10^{-12 }\) |
| 0.500 | 0.083944 | \(-1.4\times 10^{-6 }\) | 0.369890 | \(-3.3\times 10^{-7 }\) | 0.713441 | \(-6.7\times 10^{-8 }\) | 0.901792 | \(-3.8\times 10^{-11 }\) | 0.970190 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.131594 | \(-7.6\times 10^{-7 }\) | 0.383118 | \(-4.8\times 10^{-7 }\) | 0.678263 | \(-1.4\times 10^{-7 }\) | 0.873391 | \(-1.8\times 10^{-8 }\) | 0.958497 | \(-5.3\times 10^{-10 }\) |
| 1.500 | 0.182192 | \(-5.5\times 10^{-7 }\) | 0.398645 | \(-4.4\times 10^{-7 }\) | 0.644062 | \(-2.1\times 10^{-7 }\) | 0.832344 | \(-6.1\times 10^{-8 }\) | 0.935361 | \(-1.0\times 10^{-8 }\) |
| 2.500 | 0.262113 | \(-3.5\times 10^{-7 }\) | 0.424049 | \(-3.3\times 10^{-7 }\) | 0.598329 | \(-2.4\times 10^{-7 }\) | 0.752938 | \(-1.4\times 10^{-7 }\) | 0.866777 | \(-6.5\times 10^{-8 }\) |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 0.099883 | \(-1.5\times 10^{-8 }\) | 0.446796 | \(-2.4\times 10^{-8 }\) | 0.780461 | \(3.8\times 10^{-12 }\) | 0.929973 | \(7.0\times 10^{-12 }\) | 0.979282 | \(7.4\times 10^{-12 }\) |
| 0.010 | 0.099893 | \(-1.9\times 10^{-8 }\) | 0.446794 | \(-1.1\times 10^{-6 }\) | 0.780455 | \(3.8\times 10^{-12 }\) | 0.929970 | \(6.9\times 10^{-12 }\) | 0.979281 | \(7.2\times 10^{-12 }\) |
| 0.100 | 0.100917 | \(-3.4\times 10^{-7 }\) | 0.446654 | \(-1.2\times 10^{-6 }\) | 0.779806 | \(1.8\times 10^{-12 }\) | 0.929668 | \(6.9\times 10^{-12 }\) | 0.979183 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.106173 | \(-1.7\times 10^{-6 }\) | 0.446000 | \(-6.2\times 10^{-7 }\) | 0.776407 | \(-1.5\times 10^{-10 }\) | 0.928057 | \(6.9\times 10^{-12 }\) | 0.978652 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.122943 | \(-1.2\times 10^{-6 }\) | 0.444530 | \(-3.5\times 10^{-7 }\) | 0.764844 | \(-2.5\times 10^{-8 }\) | 0.922162 | \(1.7\times 10^{-12 }\) | 0.976660 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.170878 | \(-7.5\times 10^{-7 }\) | 0.444461 | \(-4.0\times 10^{-7 }\) | 0.727644 | \(-1.0\times 10^{-7 }\) | 0.897574 | \(-9.7\times 10^{-9 }\) | 0.967219 | \(-2.2\times 10^{-10 }\) |
| 1.500 | 0.219043 | \(-5.5\times 10^{-7 }\) | 0.448498 | \(-4.0\times 10^{-7 }\) | 0.688289 | \(-1.7\times 10^{-7 }\) | 0.859412 | \(-4.5\times 10^{-8 }\) | 0.947610 | \(-6.9\times 10^{-9 }\) |
| 2.500 | 0.292034 | \(-3.5\times 10^{-7 }\) | 0.458973 | \(-3.1\times 10^{-7 }\) | 0.631745 | \(-2.2\times 10^{-7 }\) | 0.779319 | \(-1.2\times 10^{-7 }\) | 0.884109 | \(-5.5\times 10^{-8 }\) |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 0.150122 | \(-3.3\times 10^{-8 }\) | 0.526820 | \(-2.8\times 10^{-7 }\) | 0.823370 | \(6.0\times 10^{-12 }\) | 0.944921 | \(7.2\times 10^{-12 }\) | 0.983819 | \(7.4\times 10^{-12 }\) |
| 0.010 | 0.150132 | \(-3.3\times 10^{-8 }\) | 0.526816 | \(-2.9\times 10^{-7 }\) | 0.823364 | \(6.0\times 10^{-12 }\) | 0.944919 | \(7.0\times 10^{-12 }\) | 0.983818 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.151122 | \(-8.1\times 10^{-9 }\) | 0.526418 | \(-5.1\times 10^{-7 }\) | 0.822775 | \(5.9\times 10^{-12 }\) | 0.944674 | \(7.0\times 10^{-12 }\) | 0.983740 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.156186 | \(-3.8\times 10^{-7 }\) | 0.524421 | \(-5.3\times 10^{-7 }\) | 0.819669 | \(-2.4\times 10^{-12 }\) | 0.943363 | \(7.0\times 10^{-12 }\) | 0.983322 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.172137 | \(-8.7\times 10^{-7 }\) | 0.518570 | \(-3.2\times 10^{-7 }\) | 0.808886 | \(-7.2\times 10^{-9 }\) | 0.938532 | \(6.7\times 10^{-12 }\) | 0.981748 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.216440 | \(-7.1\times 10^{-7 }\) | 0.506114 | \(-3.2\times 10^{-7 }\) | 0.771920 | \(-7.1\times 10^{-8 }\) | 0.917665 | \(-5.2\times 10^{-9 }\) | 0.974180 | \(-7.9\times 10^{-11 }\) |
| 1.500 | 0.259610 | \(-5.4\times 10^{-7 }\) | 0.498773 | \(-3.5\times 10^{-7 }\) | 0.729508 | \(-1.4\times 10^{-7 }\) | 0.883015 | \(4.6\times 10^{-8 }\) | 0.957764 | \(-4.4\times 10^{-9 }\) |
| 2.500 | 0.323398 | \(-3.5\times 10^{-7 }\) | 0.494138 | \(-3.0\times 10^{-7 }\) | 0.664104 | \(-2.0\times 10^{-7 }\) | 0.803925 | \(-1.1\times 10^{-7 }\) | 0.899710 | \(-4.5\times 10^{-8 }\) |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 0.212783 | \(-3.3\times 10^{-9 }\) | 0.601871 | \(-1.5\times 10^{-8 }\) | 0.858846 | \(6.4\times 10^{-12 }\) | 0.956771 | \(7.2\times 10^{-12 }\) | 0.987370 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.212791 | \(-3.2\times 10^{-9 }\) | 0.601865 | \(-1.5\times 10^{-8 }\) | 0.858841 | \(6.3\times 10^{-12 }\) | 0.956769 | \(7.1\times 10^{-12 }\) | 0.987369 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.213603 | \(1.9\times 10^{-10 }\) | 0.601295 | \(-3.0\times 10^{-8 }\) | 0.858325 | \(6.3\times 10^{-12 }\) | 0.956572 | \(7.1\times 10^{-12 }\) | 0.987308 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.217764 | \(-3.6\times 10^{-8 }\) | 0.598380 | \(-1.9\times 10^{-7 }\) | 0.855592 | \(5.9\times 10^{-12 }\) | 0.955516 | \(7.1\times 10^{-12 }\) | 0.986979 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.230937 | \(-5.4\times 10^{-7 }\) | 0.589322 | \(-2.4\times 10^{-7 }\) | 0.845942 | \(-1.7\times 10^{-9 }\) | 0.951601 | \(7.3\times 10^{-12 }\) | 0.985739 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.267701 | \(-6.5\times 10^{-7 }\) | 0.566519 | \(-2.5\times 10^{-7 }\) | 0.810896 | \(-4.7\times 10^{-8 }\) | 0.934180 | \(-2.6\times 10^{-9 }\) | 0.979708 | \(-2.4\times 10^{-11 }\) |
| 1.500 | 0.303466 | \(-5.2\times 10^{-7 }\) | 0.548641 | \(-3.0\times 10^{-7 }\) | 0.767373 | \(-1.1\times 10^{-7 }\) | 0.903362 | \(-2.3\times 10^{-8 }\) | 0.966114 | \(-2.8\times 10^{-9 }\) |
| 2.500 | 0.356008 | \(-3.5\times 10^{-7 }\) | 0.529268 | \(-2.8\times 10^{-7 }\) | 0.695202 | \(-1.8\times 10^{-7 }\) | 0.826710 | \(-9.1\times 10^{-8 }\) | 0.913659 | \(-3.7\times 10^{-8 }\) |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | 0.285633 | \(9.0\times 10^{-9 }\) | 0.669766 | \(-7.5\times 10^{-10 }\) | 0.887806 | \(6.6\times 10^{-12 }\) | 0.966129 | \(7.3\times 10^{-12 }\) | 0.990146 | \(7.5\times 10^{-12 }\) |
| 0.010 | 0.285639 | \(9.0\times 10^{-9 }\) | 0.669760 | \(-7.6\times 10^{-10 }\) | 0.887802 | \(6.6\times 10^{-12 }\) | 0.966127 | \(7.1\times 10^{-12 }\) | 0.990146 | \(7.3\times 10^{-12 }\) |
| 0.100 | 0.286161 | \(3.4\times 10^{-9 }\) | 0.669101 | \(-1.5\times 10^{-9 }\) | 0.887362 | \(6.6\times 10^{-12 }\) | 0.965970 | \(7.2\times 10^{-12 }\) | 0.990098 | \(7.3\times 10^{-12 }\) |
| 0.250 | 0.288866 | \(-5.3\times 10^{-8 }\) | 0.665698 | \(-3.1\times 10^{-8 }\) | 0.885025 | \(6.5\times 10^{-12 }\) | 0.965126 | \(7.2\times 10^{-12 }\) | 0.989840 | \(7.3\times 10^{-12 }\) |
| 0.500 | 0.297692 | \(-3.6\times 10^{-7 }\) | 0.654724 | \(-1.4\times 10^{-7 }\) | 0.876653 | \(-3.0\times 10^{-10 }\) | 0.961981 | \(7.3\times 10^{-12 }\) | 0.988865 | \(7.4\times 10^{-12 }\) |
| 1.000 | 0.323692 | \(-5.7\times 10^{-7 }\) | 0.624280 | \(-1.9\times 10^{-7 }\) | 0.844632 | \(-2.9\times 10^{-8 }\) | 0.947630 | \(-1.2\times 10^{-9 }\) | 0.984083 | \(-3.4\times 10^{-12 }\) |
| 1.500 | 0.350041 | \(-4.8\times 10^{-7 }\) | 0.597310 | \(-2.5\times 10^{-7 }\) | 0.801677 | \(-8.1\times 10^{-8 }\) | 0.920714 | \(-1.6\times 10^{-8 }\) | 0.972932 | \(-1.7\times 10^{-9 }\) |
| 2.500 | 0.389640 | \(-3.4\times 10^{-7 }\) | 0.564087 | \(-2.6\times 10^{-7 }\) | 0.724861 | \(-1.6\times 10^{-7 }\) | 0.847657 | \(-7.7\times 10^{-8 }\) | 0.926047 | \(-3.0\times 10^{-8 }\) |
| \(\sigma\) | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. |
|---|---|---|---|---|---|---|---|---|---|---|
| \(\mu = 0\) | \(\mu = 1.25\) | \(\mu = 2.5\) | \(\mu = 3.75\) | \(\mu = 5.00\) | ||||||
| 0.001 | NaN | -0.059301 | -793.892 | -0.667082 | -14.2326 | -17.0125 | 0.000000 | -600.488 | 0.000000 | -19977.2 |
| 0.010 | 0.000000 | -0.000059 | -0.815861 | -0.017308 | -0.039774 | -0.042376 | -0.028628 | -0.637634 | -0.028711 | -24.6356 |
| 0.100 | 0.000000 | 0.000000 | -0.165709 | -0.165241 | -0.254678 | -0.254666 | -0.287411 | -0.288009 | -0.297573 | -0.321755 |
| 0.250 | 0.000000 | 0.000000 | -0.398809 | -0.398371 | -0.637851 | -0.637794 | -0.734077 | -0.734111 | -0.765221 | -0.766599 |
| 0.500 | 0.000000 | 0.000000 | -0.700880 | -0.700826 | -1.258130 | -1.257990 | -1.569970 | -1.569970 | -1.693560 | -1.693680 |
| 1.000 | 0.000000 | 0.000000 | -0.918570 | -0.918565 | -1.995830 | -1.995810 | -3.285780 | -3.285750 | -4.575250 | -4.575230 |
| 1.500 | 0.000000 | 0.000000 | -0.867341 | -0.867340 | -1.947800 | -1.947800 | -3.545410 | -3.545400 | -6.125330 | -6.125310 |
| 2.500 | 0.000000 | 0.000000 | -0.664027 | -0.664027 | -1.434290 | -1.434290 | -2.460820 | -2.460820 | -4.005940 | -4.005940 |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | 830.004 | -0.088667 | 16962.5 | -1.212320 | -1.370750 | -34.1905 | 0.000000 | -1246.16 | -3.171340 | -36844.1 |
| 0.010 | 0.792044 | -0.003818 | -36.2603 | -0.020275 | -0.027774 | -0.060459 | -0.028887 | -1.298900 | -0.026951 | -51.8039 |
| 0.100 | -0.037189 | -0.036857 | -0.232955 | -0.189570 | -0.264387 | -0.264418 | -0.290521 | -0.291768 | -0.298491 | -0.349454 |
| 0.250 | -0.086747 | -0.086732 | -0.462361 | -0.460887 | -0.665807 | -0.665802 | -0.743540 | -0.743611 | -0.768076 | -0.770979 |
| 0.500 | -0.144372 | -0.144371 | -0.828815 | -0.828719 | -1.340510 | -1.340420 | -1.605970 | -1.605980 | -1.705690 | -1.705930 |
| 1.000 | -0.178212 | -0.178212 | -1.117090 | -1.117080 | -2.238940 | -2.238920 | -3.555900 | -3.555870 | -4.797870 | -4.797860 |
| 1.500 | -0.167221 | -0.167221 | -1.058540 | -1.058540 | -2.213630 | -2.213620 | -3.964980 | -3.965120 | -6.809510 | -6.809490 |
| 2.500 | -0.129654 | -0.129654 | -0.805732 | -0.805732 | -1.612900 | -1.612900 | -2.716830 | -2.716830 | -4.415180 | -4.415180 |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | 72.334 | -0.138492 | -46345.8 | -2.266410 | -0.139677 | -69.3929 | 0.000000 | -2572.76 | -3.333680 | -63848.1 |
| 0.010 | 0.062054 | -0.007484 | -19.0441 | -0.023401 | -0.027295 | -0.096421 | -0.029146 | -2.686260 | -0.036663 | -108.968 |
| 0.100 | -0.072677 | -0.072649 | -0.243807 | -0.210444 | -0.272221 | -0.272289 | -0.292968 | -0.295576 | -0.299210 | -0.406728 |
| 0.250 | -0.171576 | -0.171567 | -0.517992 | -0.515918 | -0.688702 | -0.688706 | -0.751028 | -0.751177 | -0.770311 | -0.776431 |
| 0.500 | -0.287744 | -0.287740 | -0.949656 | -0.949515 | -1.412370 | -1.412320 | -1.635374 | -1.635390 | -1.715290 | -1.715800 |
| 1.000 | -0.357816 | -0.357814 | -1.323300 | -1.323290 | -2.490940 | -2.490920 | -3.823459 | -3.823420 | -5.002180 | -5.002180 |
| 1.500 | -0.335975 | -0.335974 | -1.259940 | -1.259940 | -2.502700 | -2.502700 | -4.427979 | -4.427970 | -7.559880 | -7.559780 |
| 2.500 | -0.260084 | -0.260084 | -0.952517 | -0.952517 | -1.802980 | -1.802980 | -2.995759 | -2.995760 | -4.869750 | -4.869740 |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | -350.547 | -0.225599 | -1742.91 | -4.364530 | -0.014357 | -141.899 | -0.173062 | -5210.67 | -7.019330 | -102217 |
| 0.010 | -0.354979 | -0.010974 | -1.691060 | -0.027217 | -0.027780 | -0.169836 | -0.029414 | -5.599510 | -0.035089 | -229.040000 |
| 0.100 | -0.106529 | -0.106428 | -0.231351 | -0.228045 | -0.278486 | -0.278625 | -0.294889 | -0.300357 | -0.299776 | -0.526737 |
| 0.250 | -0.252743 | -0.252739 | -0.564751 | -0.563484 | -0.707254 | -0.707262 | -0.756932 | -0.757244 | -0.772057 | -0.784975 |
| 0.500 | -0.429064 | -0.429053 | -1.062140 | -1.061970 | -1.474100 | -1.474070 | -1.659170 | -1.659200 | -1.722860 | -1.723920 |
| 1.000 | -0.540187 | -0.540185 | -1.538120 | -1.538110 | -2.750680 | -2.750660 | -4.084890 | -4.084860 | -5.186650 | -5.186660 |
| 1.500 | -0.507820 | -0.507819 | -1.473680 | -1.473680 | -2.818470 | -2.818480 | -4.939170 | -4.939160 | -8.379630 | -8.379480 |
| 2.500 | -0.392076 | -0.392075 | -1.105430 | -1.105430 | -2.006300 | -2.006300 | -3.300950 | -3.300950 | -5.376360 | -5.376360 |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | 435.085 | -0.380924 | -151.884 | -8.572380 | 0.000000 | -291.578 | -0.722125 | -10357.6 | 14.7975 | -149558 |
| 0.010 | 0.415796 | -0.014243 | -0.176634 | -0.032803 | -0.028238 | -0.321606 | -0.029240 | -11.7310 | -0.014794 | -480.461 |
| 0.100 | -0.137300 | -0.137453 | -0.242961 | -0.242667 | -0.283467 | -0.283755 | -0.296394 | -0.307884 | -0.300220 | -0.779660 |
| 0.250 | -0.328785 | -0.328731 | -0.604286 | -0.603922 | -0.722166 | -0.722183 | -0.761576 | -0.762231 | -0.773422 | -0.800708 |
| 0.500 | -0.567190 | -0.567164 | -1.165220 | -1.165050 | -1.526339 | -1.526330 | -1.678300 | -1.678350 | -1.728810 | -1.731050 |
| 1.000 | -0.726673 | -0.726670 | -1.762190 | -1.762180 | -3.016413 | -3.016380 | -4.336620 | -4.336590 | -5.350560 | -5.350600 |
| 1.500 | -0.684374 | -0.684373 | -1.702100 | -1.702100 | -3.164690 | -3.164680 | -5.503380 | -5.503360 | -9.270860 | -9.271500 |
| 2.500 | -0.526441 | -0.526441 | -1.265600 | -1.265600 | -2.224833 | -2.224830 | -3.636210 | -3.635680 | -5.942780 | -5.942770 |
| \(\sigma\) | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. | P.W. | N.I. |
|---|---|---|---|---|---|---|---|---|---|---|
| 0.001 | -616668 | 121.617 | -420787 | 2991.06 | -636577 | 224125 | -3496.87 | 259482 | 0.000000 | 276097 |
| 0.010 | -856080 | 3.011660 | -442.290 | 3.301710 | -61.0697 | 25.3095 | 3.321160 | 2653.74 | 0.000000 | 367302 |
| 0.100 | 0.000000 | 0.000000 | 2.780680 | 3.034590 | 3.096950 | 3.111810 | 3.145340 | 3.404200 | 3.158360 | 39.0431 |
| 0.250 | 0.000000 | 0.000000 | 3.149120 | 3.191330 | 3.674980 | 3.685030 | 3.956290 | 3.962050 | 4.053710 | 4.842450 |
| 0.500 | 0.000000 | 0.000000 | 3.493000 | 3.496450 | 5.572690 | 5.584860 | 7.476750 | 7.477540 | 8.420690 | 8.449350 |
| 1.000 | 0.000000 | 0.000000 | 3.374880 | 3.375370 | 8.339780 | 8.340770 | 21.0096 | 21.0128 | 45.1782 | 45.1852 |
| 1.500 | 0.000000 | 0.000000 | 2.804230 | 2.804360 | 6.926430 | 6.926670 | 19.8409 | 19.8416 | 62.0938 | 62.0965 |
| 2.500 | 0.000000 | 0.000000 | 2.016500 | 2.016530 | 3.925600 | 3.925650 | 8.745550 | 8.745630 | 21.1813 | 21.1815 |
| \(\mu = 0.25\) | \(\mu = 1.5\) | \(\mu = 2.75\) | \(\mu = 4.0\) | \(\mu = 5.25\) | ||||||
| 0.001 | -118555 | 204.640 | -43547 | 6636.970000 | -75346.0 | 568364 | -4562.89 | 684956 | 183213 | 624387 |
| 0.010 | -1246.01 | 3.020000 | -122042 | 3.669950 | -4.591260 | 59.6883 | 2.280830 | 7062.33 | 0.000000 | 990585 |
| 0.100 | 2.076390 | 2.982990 | -8.284760 | 3.051840 | 3.118250 | 3.125320 | 3.148970 | 3.837920 | 3.167470 | 100.084 |
| 0.250 | 2.776590 | 2.899890 | 3.147170 | 3.296550 | 3.757980 | 3.759480 | 3.985380 | 4.000660 | 4.062870 | 6.191260 |
| 0.500 | 2.660590 | 2.667180 | 3.848050 | 3.853160 | 6.015620 | 6.025370 | 7.738920 | 7.739670 | 8.520460 | 8.597360 |
| 1.000 | 2.184700 | 2.185100 | 3.982070 | 3.982600 | 10.088500 | 10.08970 | 24.9067 | 24.9104 | 51.1256 | 51.1332 |
| 1.500 | 1.858520 | 1.858620 | 3.290810 | 3.290950 | 8.477790 | 8.478090 | 24.7707 | 24.7796 | 78.6087 | 78.6125 |
| 2.500 | 1.520380 | 1.520410 | 2.260920 | 2.260950 | 4.574260 | 4.574310 | 10.3673 | 10.3674 | 25.5622 | 25.5624 |
| \(\mu = 0.5\) | \(\mu = 1.75\) | \(\mu = 3.0\) | \(\mu = 4.25\) | \(\mu = 5.5\) | ||||||
| 0.001 | -117410 | 367.811 | -162063 | 15294.4 | -9062.18 | 146063 | 12013.9 | 179503 | 0.000000 | 12996 |
| 0.010 | -1180.64 | 3.036400 | -49317.8 | 4.543980 | 2.057180 | 149.056 | 3.603180 | 18893.0 | -164.434 | 267003 |
| 0.100 | 2.966820 | 2.990770 | -5.592240 | 3.068600 | 3.128020 | 3.142510 | 3.151890 | 4.994570 | 3.130600 | 265.422 |
| 0.250 | 2.908710 | 2.941710 | 3.173400 | 3.402740 | 3.822740 | 3.823240 | 4.008710 | 4.049440 | 4.070870 | 9.821820 |
| 0.500 | 2.768840 | 2.774210 | 4.245400 | 4.253280 | 6.436280 | 6.442750 | 7.960550 | 7.962110 | 8.600340 | 8.807310 |
| 1.000 | 2.323680 | 2.324090 | 4.751680 | 4.752270 | 12.186100 | 12.1877 | 29.3036 | 29.3083 | 57.2219 | 57.2303 |
| 1.500 | 1.968580 | 1.968680 | 3.913120 | 3.913280 | 10.423400 | 10.4238 | 31.0307 | 31.0267 | 99.6597 | 99.6602 |
| 2.500 | 1.579730 | 1.579750 | 2.564490 | 2.564520 | 5.351500 | 5.351550 | 12.3297 | 12.3299 | 30.9772 | 30.9775 |
| \(\mu = 0.75\) | \(\mu = 2.0\) | \(\mu = 3.25\) | \(\mu = 4.5\) | \(\mu = 5.75\) | ||||||
| 0.001 | 310570 | 702.869 | -542399 | 36588.3 | -1065.43 | 379098 | -63706.5 | 460157 | 887784 | 243369 |
| 0.010 | 310.1330 | 3.070030 | -5101.33 | 6.666550 | 2.822720 | 383.583 | 3.184430 | 50685.0 | 443.768 | 719214 |
| 0.100 | 3.017190 | 3.002780 | 2.076390 | 3.084240 | 3.135120 | 3.172380 | 3.153890 | 8.097200 | 3.189370 | 713.368 |
| 0.250 | 3.003800 | 3.007740 | 3.346970 | 3.505030 | 3.876220 | 3.877080 | 4.027320 | 4.136330 | 4.076620 | 19.6437 |
| 0.500 | 2.946620 | 2.950610 | 4.673810 | 4.684610 | 6.823970 | 6.827510 | 8.145180 | 8.149210 | 8.663970 | 9.222270 |
| 1.000 | 2.561430 | 2.561860 | 5.711600 | 5.712290 | 14.6783 | 14.6803 | 34.1823 | 34.1878 | 63.3369 | 63.3474 |
| 1.500 | 2.157020 | 2.157130 | 4.699750 | 4.699930 | 12.8685 | 12.8691 | 38.9961 | 38.9977 | 126.448 | 126.446 |
| 2.500 | 1.680290 | 1.680320 | 2.935620 | 2.935660 | 6.283030 | 6.283090 | 14.7135 | 14.7136 | 37.7024 | 37.7028 |
| \(\mu = 1.0\) | \(\mu = 2.25\) | \(\mu = 3.5\) | \(\mu = 4.75\) | \(\mu = 6.0\) | ||||||
| 0.001 | -210310 | 1414.10 | -558892 | 89841.7 | 0.000000 | 990527 | 0.000000 | 114993 | -239975 | 404306 |
| 0.010 | -17.7853 | 3.141920 | -556.894 | 11.9408 | 2.980570 | 1003.80 | -8.489280 | 136335 | -1199.53 | 193126 |
| 0.100 | 3.018400 | 3.017830 | 2.986990 | 3.098540 | 3.140750 | 3.238600 | 3.155570 | 16.4591 | 3.145170 | 1928.11 |
| 0.250 | 3.087680 | 3.092950 | 3.547050 | 3.599910 | 3.920310 | 3.922500 | 4.042080 | 4.334900 | 4.076220 | 46.2559 |
| 0.500 | 3.189940 | 3.193100 | 5.120740 | 5.133300 | 7.171800 | 7.173440 | 8.297070 | 8.307780 | 8.714510 | 10.2229 |
| 1.000 | 2.907330 | 2.907780 | 6.894940 | 6.895760 | 17.6078 | 17.6102 | 39.497900 | 39.5041 | 69.3386 | 69.3548 |
| 1.500 | 2.431690 | 2.431800 | 5.688020 | 5.688230 | 15.9491 | 15.9497 | 49.146900 | 49.1490 | 160.446 | 160.543 |
| 2.500 | 1.824640 | 1.824670 | 3.384910 | 3.384940 | 7.400970 | 7.401040 | 17.620600 | 17.6142 | 46.0955 | 46.0959 |
In this section, we present functions for finding \(E(P)\) and \(E(P), E(P^2), E(P^3), E(P^4), \text{Var}(P)\). Note these are in C++ and users will need the R package
Rcpp[31] for compiling the functions, before these can be used in R. The input parameters are \(\mu,
\sigma\), but there is an additional C++ function included for the evaluation of the standard normal cdf \(\Phi(\cdot)\).
#include <Rcpp.h>
#include <cmath>
#include <cstddef>
#include <limits>
#include <vector>
// normal_cdf is a C++ function for calculating the standard normal CDF.
// [[Rcpp::export]]
static inline double normal_cdf(const double x) {
// Standard normal CDF using erfc for numerical stability
return 0.5 * std::erfc(-x / std::sqrt(2.0));
}
// EP_logitnormalkpartcplus(double mu, double sigma) is a C++ function for
// calculating the expectation of a logit normal random variable with
// location parameter mu and scale parameter sigma.
// [[Rcpp::export]]
double EP_logitnormalkpartcplus(double mu, double sigma) {
// In part one we calculate the component functions and fixed inputs, coef_nearzero, L and k.
const double sigma2 = sigma * sigma;
double sum_EP_terms = 0.0;
double sum_EdiffP = 0.0;
double sum_E2diffP_terms = 0.0;
double sum_E3diffP = 0.0;
double L = 1.507306;
std::size_t k = 11;
std::vector<double> coef_nearzero = {0,0.999991820, -0.499903021, 0.332646462, -0.246745120,
0.189036359, -0.139389342, 0.091239940, -0.048514467, 0.018953113, -0.004725329, 0.000556454};
for (std::size_t i = 1; i <= k; ++i) {
const double N = static_cast<double>(i);
double p0a = std::exp(N * mu + 0.5 * N * N * sigma2);
double p0b = std::exp(-N * mu + 0.5 * N * N * sigma2);
// if element is infinity, the cdf to be multiplied
// is zero. Adding this line stops NaN.
if (!std::isfinite(p0a)) p0a = 0.0;
if (!std::isfinite(p0b)) p0b = 0.0;
const double p0c = coef_nearzero[i] * N;
const double p1 = ((i const double p2 = p0a * normal_cdf((-L - mu - N * sigma2) / sigma);
const double p3 = p0b * normal_cdf((mu - L - N * sigma2) / sigma);
const double p4 = p0c * (p0a * normal_cdf((-mu - N * sigma2) / sigma));
const double p5 = p0c * (p0b * normal_cdf((mu - N * sigma2) / sigma));
// In part two, we use the results of part one to find E(P) and the first three derivatives.
sum_EP_terms += p1 * (p2 - p3) + p4 - p5;
}
const double EP = normal_cdf(mu / sigma) + sum_EP_terms;
return EP;
}
// EP1to4_logitnormalkpartcplus(double mu, double sigma) is a C++ function
// for calculating the expectation of a logit normal random variable with
// location parameter mu and scale parameter sigma, along with the second,
// third, fourth moments and the variance.
// [[Rcpp::export]]
std::vector<double> EP1to4_logitnormalkpartcplus(double mu, double sigma) {
// In part one we calculate the component functions.
const double sigma2 = sigma * sigma;
double sum_EP_terms = 0.0;
double sum_EdiffP = 0.0;
double sum_E2diffP_terms = 0.0;
double sum_E3diffP = 0.0;
double L = 1.507306;
std::size_t k = 11;
std::vector<double> coef_nearzero = {0,0.999991820, -0.499903021, 0.332646462, -0.246745120,
0.189036359, -0.139389342, 0.091239940, -0.048514467, 0.018953113, -0.004725329, 0.000556454};
for (std::size_t i = 1; i <= k; ++i) {
const double N = static_cast<double>(i);
double p0a = std::exp(N * mu + 0.5 * N * N * sigma2);
double p0b = std::exp(-N * mu + 0.5 * N * N * sigma2);
// if element is infinity, the cdf to be multiplied
// is zero. Adding this line stops NaN.
if (!std::isfinite(p0a)) p0a = 0.0;
if (!std::isfinite(p0b)) p0b = 0.0;
const double p0c = coef_nearzero[i] * N;
const double p1 = ((i const double p2 = p0a * normal_cdf((-L - mu - N * sigma2) / sigma);
const double p3 = p0b * normal_cdf((mu - L - N * sigma2) / sigma);
const double p4 = p0c * (p0a * normal_cdf((-mu - N * sigma2) / sigma));
const double p5 = p0c * (p0b * normal_cdf((mu - N * sigma2) / sigma));
// In part two, we use the results of part one to find E(P) and the first three derivatives.
sum_EP_terms += p1 * (p2 - p3) + p4 - p5;
sum_EdiffP += N * (p1 * (p2 + p3) + p4 + p5);
sum_E2diffP_terms += (N * N) * (p1 * (p2 - p3) + p4 - p5);
sum_E3diffP += (N * N * N) * (p1 * (p2 + p3) + p4 + p5);
}
const double EP = normal_cdf(mu / sigma) + sum_EP_terms;
const double EdiffP = sum_EdiffP;
const double E2diffP = sum_E2diffP_terms;
const double E3diffP = sum_E3diffP;
// In part three, we find higher order moments.
const double EP2 = EP - EdiffP;
const double EP3 = EP2 - 0.5 * (EdiffP - E2diffP);
const double EP4 = EP3 - (1.0 / 3.0) * (EdiffP - E2diffP - 0.5 * (E2diffP - E3diffP));
// In part four, we calculate central moments (Var, skewness and kurtosis)
const double VarP = EP2 - EP * EP;
std::vector<double> results;
results.reserve(5);
results.push_back(EP);
results.push_back(EP2);
results.push_back(EP3);
results.push_back(EP4);
results.push_back(VarP);
return results;
}
Additional code for implementing the EP examples to illustrate EP logistic regression is (1) requires the first-third moment of logit-normal random variables can be found at https://github.com/johnbholmes/Logit-normal-moments-with-EP-applications. This contains R code for implementing expectation propagation, and a Gibbs sampler for MCMC based comparison.