In this part, we first give an expression of the smooth surface in which specifies the boundary of the region of interest in the η-space. The tube-coordinate system is then defined as a pair of the coordinate system on the surface and the coordinate along the normal direction. The signed distance from the boundary is slightly modified for generalization, and named as a modified signed distance characterized by a coefficient vector
. The
-formula is derived as an expression of the distribution function of the modified signed distance, which is obtained up to
terms ignoring the error of
.
This section initializes the Mathematica session.
This section summarizes the results for the exponential family derived in the previous part.
Here we give the log of the expectation of the exponential of , where a1, a2, and a3 are of order
, and a4 is
.
is a multivariate normal random vector
of dim-dimensions with mean
, and the identity covariance matrix.
is obtained up to
terms.
Here we give the canonical form of log f(y;η) for the exponential family of distributions, and store it in logdensityy. The metric phi2eta=is also given here.
First, the expression of the surface is specified in the Taylor series. Then, the tangent vectors and the normal vector are obtained. The tube-coordinates (u,v) are defined and used instead of the η-parametrization. Here u is dim-1 dimensional vector specifying a point on the surface, and v is the signed distance. The density function is obtained from
, where the parameter value is specified as
without losing the generality.
Some functions and tensors are defined here.
The surface is specified by ,
and
. They are stored in "foo1" and "foo2" or corresponding "rule1" and "rule2". The region of interest is specified by
. The tangent vectors are given by foo3=
and foo4=
, or corresponding "rule3" and "rule4". We also obtain phi2bu=
, which is the metric in the tangent space. The elements of the normal vector are denoted as
, a=1,...,dim, which are given in foo15=
and foo16=
, or in the corresponding "rule15" and "rule16". The reparametrization between η-coordinates and (u,v)-coordinates are specified by
, and given in foo21 =
and foo22 =
, or in "rule21", "rule22", and "rule22b".
The Jacobian of the change of variables η↔(u,v) is . The asymptotic expression of
is obtained up to
term in "logdetJ". The density function
is obtained from
as shown in "logdensityuv", where the parameter value is specified as
.
We modify the signed distance v to obtain a modified signed distance specified by . The density function of w and its cumulants are obtained up to
terms. The distribution function of w is calculated by applying the Cornish-Fisher expansion to the cumulants of w. We would also take account of the scaling by the factor tau as well as the local coordinates at the projection in the below.
The inverse series of the modified signed distance specifies . We have assumed that cbr[0] and cbr[2] are
and cbr[1], cbr[3], and all br[a',r] are
. The other coefficients are
for r>=4. Then the same order applies to cr[r]'s. The modified signed distance w is characterized by the coefficient vector c=(cr[0],cr[1],cr[2],cr[3]) up to
terms, since we can ignore the linear term in u as explained later. The change of variable is given in "rulevinuw" for v expressed in terms of u and w. The Jacobian is given in logjvw=log
. The joint density of (u,w) is obtained by f(u,w|v0)=f(u,v(w,u)|v0)J , and log f(u,w|v0) is stored in "logdensityuw". We then calculate
as an application of "logeexppoly" to logdensityuw, and stored in "logdensityw". In fact, the linear term in
, namely
does not contribute to the argument for deriving the distribution function of w as seen in logdensityw. By using "logeexppoly" again, we obtain the cumulants of
as shown in "cumulantw".
The Cornish-Fisher expansion for the standardized random variable is taken from Johnson and Kotz (1994) as shown in "cfexpx" below. We first obtain the same expansion for nonstandardized variable as shown in "cfexpw", and apply it to the cumulants of w. This gives the distribution function of w, and we obtain , where
is the quantile function of the standard normal distribution. The same expression, but without MathTensor notation, is also given in "zform". Finally, the scaling by the factor "tau" is applied to these results, and zc-formula is stored in "zformulatau" as well as in "zformtau".
We consider a local coordinate Δη around a point η(u0,0) on the surface, where u0 indicates any specified value of u. This will be used for u0 specifying the projection of y onto the surface. The change of variable η↔Δη is specified by for each u0. The expression for
is given in "rule93", and that for
is in "rule94". The surface is expressed as
, where the coefficients are shown in foo101 and foo102. Next, the expression for
is obtained and stored in foo114[ua,ub]. This is equated with
, and the coefficients
,
, and
are obtained in foo121. The inverse of the metric=
is in rule131, which is used for
. These conversion rules are summarized in "rulesproj". zc-formula evaluated at η(u0,0) is shown in zformulau0, and that for scaling tau is in zformulatauu0.