Exact expressions and numerical evaluation of average evolvability measures for characterizing and comparing \documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{G}$$\end{document}G matrices

Theory predicts that the additive genetic covariance (\documentclass[12pt]{minimal} \usepackage{amsmath} \usepackage{wasysym} \usepackage{amsfonts} \usepackage{amssymb} \usepackage{amsbsy} \usepackage{mathrsfs} \usepackage{upgreek} \setlength{\oddsidemargin}{-69pt} \begin{document}$$\textbf{G}$$\end{document}G) matrix determines a population’s short-term (in)ability to respond to directional selection—evolvability in the Hansen–Houle sense—which is typically quantified and compared via certain scalar indices called evolvability measures. Often, interest is in obtaining the averages of these measures across all possible selection gradients, but explicit formulae for most of these average measures have not been known. Previous authors relied either on approximations by the delta method, whose accuracy is generally unknown, or Monte Carlo evaluations (including the random skewers analysis), which necessarily involve random fluctuations. This study presents new, exact expressions for the average conditional evolvability, average autonomy, average respondability, average flexibility, average response difference, and average response correlation, utilizing their mathematical structures as ratios of quadratic forms. The new expressions are infinite series involving top-order zonal and invariant polynomials of matrix arguments, and can be numerically evaluated as their partial sums with, for some measures, known error bounds. Whenever these partial sums numerically converge within reasonable computational time and memory, they will replace the previous approximate methods. In addition, new expressions are derived for the average measures under a general normal distribution for the selection gradient, extending the applicability of these measures into a substantially broader class of selection regimes. Supplementary Information The online version contains supplementary material available at 10.1007/s00285-023-01930-8.


Introduction
The quantitative genetic theory of multivariate trait evolution provides a powerful framework to analyze and predict phenotypic evolution (Steppan et al. 2002;Blows 2007;Blows and Walsh 2009;Walsh and Blows 2009;Teplitsky et al. 2014). At the core of the theory is the Lande equation, which describes a population's response to directional selection under certain simplifying conditions (Lande 1979;Lande and Arnold 1983): where β is a p-dimensional selection gradient vector (partial regression coefficients of trait values to relative fitness), G is a p × p (additive) genetic covariance matrix, and z is a p-dimensional vector of per-generation change of the population's mean trait values. (Throughout the paper, p denotes the (nominal) number of the traits/variables analyzed, and all vectors are column vectors without transposition.) In light of this theory, the G matrix is supposed to represent the population's (in)ability to respond to directional selection-what has been termed evolvability by Hansen, Houle and colleagues (Houle 1992;Hansen 2003;Hansen et al. 2003aHansen et al. , b, 2011Hansen and Houle 2008;Hansen and Pélabon 2021). 1 The theory has motivated extensive investigations into aspects of the G matrix or its substitutes, ranging from theoretical and simulation-based analyses (e.g., Pavlicev and Hansen 2011;Jones et al. 2012;Chevin 2013;Melo and Marroig 2015;Hansen et al. 2019) to empirical inter-population/specific comparisons of trait covariation and its expansion to interpopulation divergences (e.g., Cheverud 1982Cheverud , 1989Schluter 1996;Porto et al. 2009;Marroig et al. 2009;Rolian 2009;Bolstad et al. 2014;Haber 2016;Puentes et al. 2016;Costa e Silva et al. 2020;Machado 2020;McGlothlin et al. 2022;Opedal et al. 2022Opedal et al. , 2023Hubbe et al. 2023).
Based on this framework, and following earlier theoretical developments (Hansen 2003;Hansen et al. 2003a, b), Hansen and Houle (2008) proposed several scalar indices to capture certain aspects of the multivariate evolvability represented in G (see also Kirkpatrick 2009;Marroig et al. 2009). Of these, (unconditional) evolvability e, conditional evolvability c, autonomy a, integration i, respondability r , and flexibility f (due to Marroig et al. 2009) concern a single G matrix (Fig. 1A), whereas response difference d concerns comparison between two G matrices. Related to the latter is the use of response correlation ρ for matrix comparison (Cheverud 1996;Cheverud and Marroig 2007) (Fig. 1B). Notably, all these indices are simple or multiple ratios of quadratic forms in β (see below). In this paper, they are collectively called evolvability measures. Many of them can be related to the rate of adaptation or evolutionary constraint/bias (e.g., Hansen and Houle 2008;Chevin 2013;Bolstad et al. 2014;Hansen et al. 2019), providing means to characterize and compare G matrices in biologically meaningful ways.

Fig. 1
Geometric interpretations of evolvability measures. In a hypothetical bivariate trait space, genetic covariance matrices G are schematically represented by equiprobability ellipses around the mean phenotypē z, and selection gradients β by acute-headed brown arrows. Response vectors z are matrix products of G and β, represented by broad-headed red/magenta arrows. (a) One-matrix measures: evolvability e is the norm of z projected on β, standardized by the norm of the latter, |β|; conditional evolvability c is the same but when z is constrained along β; autonomy a is the ratio of c to e; respondability r is | z| standardized by |β|; and flexibility f is the similarity in direction (cosine of the angle) between z and β. (b) Two-matrix comparison measures: response difference d is the distance between the end points of the two z's standardized by |β|, and response correlation ρ is their similarity in direction The evolvability measures are primarily defined with respect to a given selection gradient β. In this sense, they represent aspects of G matrices under a fixed, deterministic selection. In many theoretical and comparative analyses of evolvability (see references above), however, interest is often in characterizing G matrices without referring to β. For this purpose, it is sensible to take the expectation of an evolvability measure assuming a certain probability distribution of β. Most typically, although not necessarily, the uniform distribution on a unit hypersphere is assumed for this purpose, representing a completely randomly directed and uncorrelated selection regime. The resultant quantities are called average measures hereafter. 2 Biologically speaking, the average measures may be regarded as representations of general evolvability (in the sense of Riederer et al. 2022), as compared to specific evolvability which is represented by the evolvability measures as functions of a fixed β.
However, there is a major obstacle to using average measures for practical or even theoretical investigations. That is, most of the average measures lack known explicit, exact expressions beyond as expectations, except for the average evolvabilityē and, under certain special conditions, the average conditional evolvabilityc and the average respondabilityr (Hansen and Houle 2008;Kirkpatrick 2009). Consequently, previous studies had to rely on approximations of average measures. Presumably the most widely used approximation method is Monte Carlo evaluation (e.g., Marroig et al. 2009;Bolstad et al. 2014;Haber 2016;Grabowski and Porto 2017), in which a large number of β is randomly generated on a computer and the resultant values calculated with the primary definition are literally averaged to yield an estimate of average measure. This has long been done in the so-called random skewers analysis for matrix comparison using response correlation ρ (e.g., Cheverud 1996;Cheverud and Marroig 2007;Revell 2007; see also Rohlf 2017). It is implemented in the R packages evolvability (Bolstad et al. 2014) and evolqg (Melo et al. 2016) for calculating various average measures. This method necessarily involves random fluctuations in the estimate and can take a large computational time, although the latter is becoming less of a concern with modern-day computers. On the other hand, Hansen andHoule (2008, 2009) themselves provided approximate expressions for average measures based on the delta method (which they called "analytical" or "standard" approximations). Apart from ill-defined notations used therein, a practical problem there is that the accuracy of this sort of approximation is generally unknown, so a separate Monte Carlo evaluation is usually required to ascertain whether the delta method approximation has an acceptable accuracy. This approximation has been used in some subsequent studies (e.g., Hansen and Voje 2011;Brommer 2014;Delahaie et al. 2017;Saltzberg et al. 2022) and is available in the evolvability package. Apart from these methods, Kirkpatrick (2009) used numerical integration to evaluate his average selection response, a measure equivalent to respondability (below), but this method has not been widely used in evaluating average measures.
This technical paper provides exact expressions for the following average measures: average evolvabilityē, average conditional evolvabilityc, average autonomyā, average respondabilityr , average flexibilityf , average response differenced, and average response correlationρ. These expressions are derived from existing and new results on the moments of simple or multiple ratios of quadratic forms in normal variables. They are expressed as infinite series involving zonal or invariant polynomials of matrix arguments, and in most cases can be numerically evaluated as their partial sums to yield quasi-exact values. For some of the expressions, an upper bound for the truncation error is available. In addition to the special condition where β is spherically distributed as assumed in most previous studies (but see also Chevin 2013), this study also concerns the general condition that β is normally distributed with potentially nonzero mean and nonspherical covariance. The latter condition can be of substantial biological interest, as it can model a fairly wide range of random directional and/or correlated selection regimes.
The paper is structured as follows. Section 2 first reviews the definition of the evolvability measures; some of them are redefined to accommodate potentially singular G matrices. After reviewing some known results on the moment of a ratio of quadratic forms, it then provides new expressions for average evolvability measures under the spherical distribution of β. Section 3 presents a new R implementation of the analytic results and evaluate its performance by numerical experiments. Section 4 concludes the main body of the paper by adding some theoretical and practical considerations on the use of average measures. As the zonal and invariant polynomials appear to have rarely been used in the biological literature, Appendix A gives a brief overview on their theories, providing a basis for the present mathematical results.
Appendix B states a new result on the moment of a multiple ratio of quadratic forms in normal variables, and Appendix C presents new expressions for average measures under the general normal distribution of β. Appendix D clarifies connections to previous results derived under special conditions (Hansen and Houle 2008;Kirkpatrick 2009).

Notations
In the following discussion, it is convenient to define the linear combination of the variables (traits) along the direction of β. For this purpose, consider the decomposition β = |β|u, where |·| is the vector norm or length, |a| = √ a T a for an arbitrary vector a (the superscript T denotes matrix transpose), and u is a unit vector: u T u = 1. Define the p × ( p − 1) matrix U (−1) so that the matrix U = (u, U (−1) ) is orthogonal. With these, the orthogonal linear transform of the variables z * = U T z will be considered; the first entry of this new vector u T z represents the score along the direction of β. Note that the covariance matrix of the new variables z * can be written as .
Previous authors (Hansen and Houle 2008;Marroig et al. 2009;Grabowski and Porto 2017) defined some evolvability measures under the (sometimes implicit) constraint |β| = 1. To avoid potential confusion, this standardized vector is always denoted by u herein. Throughout this paper, G is assumed to be given rather than random and validly constructed as a covariance matrix, that is, symmetric and nonnegative definite (i.e., either positive definite or positive semidefinite, in the terminology of Schott 2016). Although Hansen and Houle (2008) assumed G to be positive definite, this assumption is not imposed here to accommodate potentially singular (and positive semidefinite) G where possible. This is done by using the generalized inverse; for a matrix A, a generalized inverse A − is such a matrix that satisfies For notational simplicity, the range or column space and the null space of a nonzero p × q matrix A are defined: R (A) = {y : y = Ax, x ∈ R q }, and N (A) = {x : 0 p = Ax, x ∈ R q }, where 0 p is the p-dimensional vector of zeros. When A is nonnegative definite, these are the spaces spanned by the eigenvectors corresponding to its nonzero and zero eigenvalues, respectively. The p-dimensional identity matrix is denoted by I p .

Evolvability measures: fixed selection
Evolvability e(β) is the variance in G along the direction of selection u, or equivalently the norm of the response vector z projected onto β, standardized by |β| (Hansen and Houle 2008) (Fig. 1): The numerator in (1) can be related to the rate of adaptation (change in mean fitness) under simple directional selection (Agrawal and Stinchcombe 2009;Chevin 2013). Conditional evolvability c(β) is conceptually defined as the variance along u when evolution in other traits/directions is not allowed due to stabilizing selection (Hansen 2003;Hansen et al. 2003aHansen et al. , 2019. With above notations, it is the conditional variance of the first element of z * given the other elements (redefined here after Hansen and Houle 2008): Here, the equation of (3) is from well-known results on the (generalized) inverse of a partitioned matrix (e.g., Schott 2016, theorems 7.1 and 7.12), for which Hansen and Houle (2008) restated a proof in nonsingular G. A lack of conditional variance along β results in c(β) = 0, which happens when G is singular and β / ∈ R (G); the expressions (3) and (4) do not hold in this case.
Autonomy a(β) is defined as the complement of the squared multiple correlation of the first element of z * with respect to the other elements: This quantity is undefined when e(β) = u T Gu = 0. Hansen and Houle (2008) also defined the integration i(β), which is the squared correlation just mentioned: Respondability r (β) is the magnitude of response standardized by that of selection, or the ratio of the norms of z and β: The definition and terminology of r here follows Hansen and Houle (2008), but it should be noted that Kirkpatrick (2009) independently devised an equivalent measure as the (relative) selection response (R in the latter author's notation) with a slightly different standardization. Flexibility f (β) quantifies similarity in direction between z and β in terms of vector correlation (cosine of the angle formed by two vectors), and is also the ratio of e(β) to r (β) (Hansen and Houle 2008;Marroig et al. 2009): This quantity is undefined if | z| = 0, i.e., β ∈ N (G). Otherwise, 0 < f (β) ≤ 1 from the nonnegative definiteness of G and the definition of vector correlation. The term flexibility was coined by Marroig et al. (2009) due to Hansen's suggestion, although the use of the vector correlation or angle was suggested in a few different works Rolian 2009). All the above indices are one-matrix measures that primarily concern characterization of a single G matrix. On the other hand, the following two indices concern pairwise comparisons between two G matrices in terms of (dis)similarity of the response vectors given the same β. The two G matrices and z are denoted here with subscripts: G i , z i . Response difference d(β) is a measure of dissimilarity, defined as a standardized difference between the two response vectors (Hansen and Houle 2008): Response correlation ρ(β) is a measure of similarity in direction, defined as the vector correlation between the two response vectors (e.g., Cheverud 1996;Cheverud and Marroig 2007): This quantity is undefined when at least one of | z 1 | and | z 2 | is 0. Otherwise, −1 ≤ ρ(β) ≤ 1. 3

Ratio of quadratic forms
A key to derive expressions for average measures is that the measures defined above are simple or multiple ratios of quadratic forms in β or u. Ratios of quadratic forms, especially those in normal random variables, play a pivotal role in statistics, as many practically important test statistics can be written as a ratio of quadratic forms. Naturally, there is a vast body of literature regarding the distribution and moments of quadratic forms and ratios thereof (e.g., Magnus 1986;Jones 1986Jones , 1987Smith 1989Smith , 1993Mathai and Provost 1992;Hillier 2001;Forchini 2002;Hillier et al. 2009Hillier et al. , 2014Bao and Kan 2013).
Regarding the ratio of quadratic forms in normal variables, there are several equivalent ways to derive its moments. One starts from the joint moment-generation function (e.g., Cressie et al. 1981;Meng 2005) of quadratic forms, and typically results in integrations which does not have simple closed-form expressions (e.g., Magnus 1986;Jones 1986Jones , 1987Gupta and Kabe 1998). Another way is to expand a ratio into infinite series, which in turn is integrated using the zonal and invariant polynomials (e.g., Smith 1989Smith , 1993Hillier 2001;Hillier et al. 2009Hillier et al. , 2014. (See Bao and Kan (2013) for connections between these two approaches.) The latter way typically yields an infinite series including zonal or invariant polynomials, which can be evaluated with reasonable speed and accuracy with the aid of recent algorithmic developments (Hillier et al. 2009(Hillier et al. , 2014Bao and Kan 2013). This is the way followed in the present paper. The zonal polynomials are a special form of homogeneous polynomials in eigenvalues of a matrix which generalize powers of scalars into symmetric matrices (e.g., James 1960James , 1964Muirhead 1982Muirhead , 2006Gross and Richards 1987;Mathai et al. 1995). The invariant polynomials are a generalization of the zonal polynomials into multiple matrix arguments (Davis 1979(Davis , 1980Chikuse 1980Chikuse , 2003Chikuse and Davis 1986b). A brief overview on these mathematical tools is provided in Appendix A.
A general result for the moments of a simple ratio of quadratic forms in normal variables is restated in the following proposition.
Proposition 1 (Smith 1989;Bao and Kan 2013) Let x ∼ N p μ, I p , A be a p × p symmetric matrix, B be a p × p nonnegative definite matrix, and m, n be positive real numbers. When the expectation of (x T Ax) m (x T Bx) n exists, it can be written as where α A and α B are any positive constants that satisfy 0 < α A < 2/λ max (A) and 0 < α B < 2/λ max (B), with λ max (·) denoting the largest eigenvalue of the argument matrix, (a) k = a(a + 1) . . . (a + k − 1), and C [i+ j+k] (·, ·, ·) are the (i, j, k)-th top-order invariant polynomials (whose explicit form is presented in Appendix A).
Remark Conditions for the existence of the moment are stated in Bao and Kan (2013, proposition 1 therein): when B is positive definite, the moment exists if and only if p 2 + m > n; and when B is positive semidefinite, slightly different conditions apply, depending on the rank of B and structures of A and B. When m is an integer, the expressions can be simplified so that the summation for i disappears. Also, when μ = 0 p , they substantially simplify as all terms with k > 0 are zero. If A or B is asymmetric, it can be symmetrized by using In practice, the above series can be approximated by its partial sum, with recur- (Chikuse 1987;Hillier et al. 2009Hillier et al. , 2014Bao and Kan 2013). General covariance structures for x can be accommodated under certain conditions by transforming the variables and quadratic forms, as described in Appendix C. Appendix C also provides a similar result for multiple ratios of the form

Average measures for uniformly distributed selection
With the above theories, average measures can be readily derived as expectations with respect to random β under the assumption of normality. Previous treatments of evolvability measures (Hansen and Houle 2008;Kirkpatrick 2009) and random skewers analysis (Revell 2007) typically assumed that u is uniformly distributed on the unit hypersphere in the p-dimensional space. This condition is entailed in spherical multivariate normal distributions of β: β ∼ N p 0 p , σ 2 I p for arbitrary positive σ 2 . This section provides expressions of average measures under this condition. (Note that the normality of β is not necessary for u to be uniformly distributed; i.e., all results in this section hold as long as the distribution of β is spherically symmetric.) Expressions for a general normal case β ∼ N p (η, ) are given in Appendix C. Most of the results below can be derived either by applying Proposition 1 or Proposition 4 in Appendix B, or directly as done in Appendix A.
The average evolvabilityē is straightforward to obtain: as derived by Hansen and Houle (2008). This is because E u uu T = I p / p under this condition. Conditional evolvability c(β) and autonomy a(β) can be nonzero only when β ∈ R (G) (see above). When G is singular, this happens with probability 0 when β is continuously distributed across the entire space. Hence, the average conditional evolvabilityc and the average autonomyā are 0 when G is singular. Although the following expressions can operationally be applied to singular G by using G − in place of G −1 , such a result is invalid because the ratio expressions do not hold when β / ∈ R (G). When G is nonsingular, the average conditional evolvabilityc is: where α is any positive constant that satisfies 0 < α < 2/λ max G −1 (see Proposition 1), C [k] (·) are the kth top-order zonal polynomials, and 2 F 1 (a, b; c; ·) is an alternative expression using the hypergeometric function of matrix argument with the three parameters a, b, and c (see Appendix A). When p = 2, this expression simplifies to the geometric mean of the two eigenvalues of G as mentioned by Hansen and Houle (2008) (Appendix D). The average autonomyā is, when G is nonsingular, where α 1 and α 2 are to satisfy 0 < α 1 < 2/λ max (G) and 0 < α 2 < 2/λ max G −1 . The average integrationī is simply 1 −ā (and equals 1 when G is singular).
The average respondabilityr is where α is to satisfy 0 (2009) discussed on an equivalent quantity, the average (relative) selection response (R there), but did not provide a closed-form expression for arbitrary G. It is possible to show his expression for the special case with complete integration is entailed in the present result (Appendix D).
The average flexibilityf is where α is to satisfy 0 < α < 2/λ max G 2 . In general,f is well defined even if G is singular, unless β ∈ N (G) with nonzero probability (which of course does not happen here). The average response differenced has a form essentially identical tor except for the argument matrix where α is to satisfy 0 The average response correlationρ is where α 1 and α 2 are to satisfy 0 < α 1 < 2/λ max G 2 1 and 0 < α 2 < 2/λ max G 2 2 .

Truncation error
It is seen that the successive terms in the above series decrease in magnitude, thus a partial sum up to certain higher-order terms can in principle be used as an approximation of the exact value of the infinite series. Although each term can be easily evaluated with a recursive algorithm (Bao and Kan 2013;Hillier et al. 2014), accurate numerical evaluation involving higher-order terms is practically a computer-intensive problem. The speed of numerical convergence and computational time will be examined in the next section. The choice of α is arbitrary within the constraint 0 < α < 2/λ max with respect to the relevant matrix (see above), but influences the signs of the terms as well as the speed of convergence. When 0 < α ≤ 1/λ max , all the zonal and invariant polynomials in the above expressions are positive because the argument matrices have only nonnegative eigenvalues. Therefore, all terms in the summations inc (13),ā (14),f (16), and ρ (18) are positive, so truncation results in (slight) underestimation. On the other hand, all terms inr (15) andd (17), except those for k = 0, are negative in the same condition, so truncation results in overestimation. If 1/λ max < α < 2/λ max , the signs of the polynomials possibly, though not always, fluctuate, rendering the behavior of the series less predictable.
It is possible to derive bounds for the truncation errors inc,r ,f , andd by applying the method of Hillier et al. (2009, theorem 6) with slight modifications, if G is nonsingular and the constants α are taken within 0 < α ≤ 1/λ max . Letc M ,r M ,f M , and d M be the relevant partial sums up to k = M. The truncation error bounds are: where the constants α are as in the corresponding definitions (but to satisfy 0 < α ≤ 1/λ max ). Unfortunately, the same method are not applicable toā orρ. Also, if G (or G 1 − G 2 in case ofd) is singular, these error bounds do not hold. Empirically, a larger value of α often improves the speed of convergence, as more eigenvalues of the argument matrix approach 0, but this should be used with caution since the above error bounds are not strictly applicable if α > 1/λ max . To be precise, the error bounds should hold even under this condition provided that all the zonal/invariant polynomials above k = M are nonnegative, but it is not obvious in which case that condition can be shown to be true.

Software implementation
There exist two Matlab programs distributed by Raymond M. Kan (https://www-2.rotman.utoronto.ca/~kan/) for evaluating the moments of simple ratios of quadratic forms in normal variables (Hillier et al. 2009(Hillier et al. , 2014Bao and Kan 2013), which can be used to evaluatec,r , andd if a suitable environment is available. Alternatively, these average measures could be evaluated as hypergeometric functions of matrix argument, for which an efficient, general algorithm has been developed by Koev and Edelman (2006) and implemented in the R package HypergeoMat (Laurent 2022). However, that seems relatively inefficient in the present applications where the terms corresponding to all non-top-order partitions can be omitted. None of these can be used to evaluate moments of multiple ratios likeā,f , andρ.
In order to make all above expressions available in the popular statistical software environment R, the present author has developed an independent implementation of the algorithms of Hillier et al. (2014) and Bao and Kan (2013) and published it as the package qfratio on the CRAN repository (Watanabe 2023). This package can be used to evaluate general moments of ratios of quadratic forms in normal variables with arbitrary mean and covariance (under certain constraints for singular cases as discussed in Appendix C.1). It uses RcppEigen (Bates and Eddelbuettel 2013) to effectively execute the computationally intensive recursive algorithms.

Numerical experiment: methods
Using the new R package, numerical experiments were conducted in a small set of artificial covariance matrices to evaluate behaviors and efficiency of the present series expressions. For each of p = 5, 20, 50, and 200, three different eigenvalue conformations were used; two were set to have single large eigenvalues with different magnitudes of integration, V rel = 0.1, 0.5-corresponding to relatively weak and rather strong integration, respectively-and one was set to have a quadratically decreasing series of eigenvalues (for the algorithms see Watanabe (2022) and the R package eigvaldisp (https://github.com/watanabe-j/eigvaldisp)). The matrices with these eigenvalue conformations are referred to as G 0.1 , G 0.5 , and G Q . For each of these, two eigenvector conformations were used so that the resultant covariance matrices were either diagonal matrices of the eigenvalues or correlation matrices with the same eigenvalues constructed with Givens rotations (Davies and Higham 2000). For the one-matrix measures (c,r ,ā, andf ), the choice of eigenvectors is inconsequential. For the twomatrix measures (d andρ), comparisons were made between pairs of matrices with identical and different eigenvectors. The results were also compared to those from the traditional Monte Carlo evaluation using the qfratio package and the delta method approximation of Hansen andHoule (2008, 2009) using new codes.
When possible, an average computational time from 10 runs is recorded for the present series evaluation and Monte Carlo evaluation with 10,000 iterations in each condition. This is except forρ in certain conditions with p ≥ 50 where only a single run was timed for the series evaluation as it did not reach numerical convergence (below). Where a truncation error bound is available, an order of series evaluation M was chosen so that the error is below 1.0 × 10 −8 . Where an error bound is unavailable, it was aimed to evaluate the series until the result rounded to the digit of 10 −9 appeared stable. (These values were arbitrarily chosen for benchmarking purposes, and not to be used as a guide for applications.) No formal timing was done for the delta method approximation as it is not computer-intensive. All computational times reported are in elapsed time rather than CPU time. The calculations were executed on a regular desktop PC with Intel ® Core i7-8700 CPU and 16 GB RAM, running R version 4.2.3 (R Core Team 2023) with its built-in BLAS. For those problems that required larger computational memory for convergence (ρ with G 0.5 and p ≥ 20; see below), another machine with 256 GB RAM was used to calculate accurate values. The codes used in the numerical experiments are provided as Online Resource 1, as well as maintained on a GitHub repository (https://github.com/watanabe-j/avrevol).

Numerical experiment: results
The present series evaluations as implemented in the R package qfratio reached numerical convergence within reasonable computational times in all cases except ρ with large ( p = 200) or highly integrated (G 0.5 ) matrices (detailed below). The order of evaluation M required to accomplish a given level of accuracy varied across evolvability measures and eigenvalue conformations, but in most cases increased with p (Figs. 2, 3, 4, 5, 6, 7; Tables 1, 2, 3, 4, 5, 6). The rate of scaling with respect to p tended to be more rapid in the series evaluation than in Monte Carlo evaluation, when the required accuracy for the former and the number of iteration for the latter are pre-determined as described above (Fig. 8).
Forc, the computational time required for the error bound to numerically converge below 1.0 × 10 −8 was at most in the order of ∼0.1 s and compared favorably with the Monte Carlo evaluation with 10,000 iterations across the entire range of p examined ( Fig. 8; Table 1). Forr andf , the computational time varied from ∼1.5 ms in p = 5 to several seconds in p = 200, and in some eigenvalue conformations the series evaluation was outcompeted by the Monte Carlo evaluation with a fixed number of iterations in terms of plain computational time ( Fig. 8; Tables 2, 3). However, it is to be remembered that results from Monte Carlo evaluations always involve stochastic error, whose standard error (SE) scales only with the inverse square root of the number of iteration (i.e., 100 times as many calculations are required to reduce the SE by the factor of 1/10). It is also notable that the partial sums themselves typically appeared to reach asymptotes much earlier than the error bounds did in these measures (Figs. 2,3,4). It took substantially longer time to accurately evaluateā than the other one-matrix measures, since it involves a double series so that the computational burden scales roughly with M 2 . Consequently, the computational time required forā to numerically converge at the order of 10 −9 varied from ∼7 ms to ∼170 s ( Fig. 8; Table 4). Technically, this large computational time was partly because of the necessity to scale individual terms in the evaluation ofā to avoid numerical overflow and underflow.
For two-matrix comparisons,d behaved similarly tor with which it shares the same functional form ( Fig. 6; Table 5). In some comparisons between matrices with the same eigenvalues and different eigenvectors, the error bound ofd could not be calculated because the argument matrix ((G 1 − G 2 ) 2 ) was singular due to the artificial conformations of eigenvalues in G 0.1 and G 0.5 where the trailing eigenvalues are identical in magnitude. Series evaluation ofρ took substantially more computational time and memory than the other measures. For p ≥ 20, the series could not be evaluated until numerical convergence in any comparisons that involve G 0.5 due to excessively large memory requirement for the 16 GB RAM machine used here for main calculations, at least when the accuracy in the order of 10 −9 is aimed at ( Fig. 7; Table 6 involves accurate values from a larger machine). This is apparently because G 2 0.5 has rather small eigenvalues, which translate into extremely large magnitudes of higher-order terms, d i, j,1 in (18). For p = 200, accurate series evaluation ofρ seemed infeasible in most combinations for too much computational memory required. The only exception in the present test cases is the comparison between two G Q 's with different eigenvectors where the series converged fairly rapidly (Table 6).

Fig. 2
Results of numerical experiments forc. Partial sums from series expressions are shown in blue solid lines, and associated truncation error bounds as deviations from the partial sum are in red broken lines, across varying orders of evaluation M. Mean and its 95% confidence interval from a Monte Carlo run with 10,000 iterations are shown in brown circles and vertical bars. Delta method approximations by Hansen andHoule (2008, 2009) are shown in green squares. Rows correspond to eigenvalue conformations (see text) and columns to number of variables p. Each panel represents ±10% region of the terminal value of series evaluation     As expected, the Monte Carlo evaluation always yielded an unbiased estimate with the confidence intervals having the intended nominal coverage of the converged series where available. As implemented in the qfratio package, iterations in the order of 10 4 can be executed within a second, so might be favored over the new series expression when the computational burden is a constraint and stochastic error is tolerated. Interestingly, relative accuracies of the series and Monte Carlo evaluations showed a qualitatively similar pattern of variation across eigenvalue conformations for a given average measure and p; the Monte Carlo evaluation tended to yield a large SE when In other words, eigenvalue conformations seem to largely determine the accuracy at which average measures can be empirically evaluated. The delta method approximations by Hansen andHoule (2008, 2009) can be evaluated almost instantaneously (from ∼0.1 to ∼7 ms in p = 5 and 200), as they are straightforward arithmetic operations once eigenvalues of the argument matrix are obtained. Forc in large p, they showed notable empirical accuracy ( Fig. 2; Table 1) (see also Hansen and Houle 2008). In many other cases, however, they yielded inaccurate values, often deviating from the converged series by >5%, and it is even difficult to discern a consistent trend in the directions of errors (Figs. 3,5,6;Tables 2,4,5). Except in the former cases, it is rather questionable when those approximations can be reliably used.

Discussion
The present paper derived new expressions for average evolvability measures using results on the moments of ratios of quadratic forms in normal variables. These series expressions are in theory exact, although for practical evaluation summation must be truncated, yielding truncation error. A great advantage in the present approach is that a hard upper bound for the truncation error is known for some of the measures: namely, average conditional evolvabilityc, average respondabilityr , average flexibilityf , and average response differenced (above). This is unlike the confidence intervals from Monte Carlo evaluations, which always involve some uncertainty. In addition, empirically speaking, evaluation of most of the average measures, excepting average autonomyā and average response correlationρ, can be faster than Monte Carlo evaluation for modest-sized problems (e.g., p ≤ 50), depending on the accuracy aimed  Parentheses aroundρ M denote values that did not reach numerical convergence with specified M; for these conditions, more accurate values with larger M were calculated on a separate machine and are shown for reference (ρ M )-this calculation was not timed. For p = 200, it was infeasible to apply the series evaluation in most combinations for excessive computational memory required. See Table 5 for further explanations Asterisks after t S denote times from single runs rather than 10 runs at. The accuracy and speed of the series evaluation will facilitate practical studies that involve quantification and/or comparison of evolvability or integration using average measures, for which the Monte Carlo evaluation or delta method approximation has traditionally been used. As a practical guide for calculating average measures, the series evaluation is recommended whenever numerical convergence can be reached within reasonable computational time and memory. Its feasibility largely depends on the eigenvalues of G, but it is always easy to check whether convergence has been reached by inspecting a profile of the partial sum and by using error bounds when available. When the computational time and/or memory is a constraint (forā andρ in large p with many small eigenvalues), then an alternative will be Monte Carlo evaluation, which is adequate because the evolvability measures considered herein have finite second moments (Appendix B). The delta method approximations as proposed by Hansen andHoule (2008, 2009) can yield rather inaccurate values with hardly predictable errors (above), thus will not remain a viable option in estimating average measures. This is perhaps except when even the (typically sub-second) computational burden of the Monte Carlo evaluation is a bottleneck, e.g., when one has large Bayesian samples of G. However, a primary problem in the delta method remains that, although the method empirically works well in certain situations (e.g.,c in large p), there is no theoretical guarantee for it to work well in general situations; the accuracy always need to be assessed by another method of evaluation.
It should be remembered that, in empirical analyses, G is almost always estimated with uncertainty, so that estimates of (average) evolvability measures involve error and potentially bias (Houle and Meyer 2015;Grabowski and Porto 2017). Although uncertainty may partially be incorporated in a Bayesian sampling of G (Aguirre et al. 2014) or a parametric-bootstrap-like sampling with multivariate normal approximation (Houle and Meyer 2015), these methods will not by themselves deal with potential estimation bias. The present series expressions are not free from this problem, which need to be addressed in future investigations. It might be possible to derive sampling moments of the (average) measures under simple sampling conditions (e.g., Wishartness), as was recently done for eigenvalue dispersion indices of covariance and correlation matrices (Watanabe 2022). A potentially promising fact is that the expectations of zonal and invariant polynomials of Wishart matrices are known (Constantine 1963;Davis 1980). It remains to be done to derive equivalent results to polynomials in more complicated functions of random matrices like the ones appearing in the present expressions. Apart from that, simulation-based approaches would also be useful in obtaining rough estimates of sampling error and bias (Haber 2011;Grabowski and Porto 2017). In any case, the present expressions will greatly facilitate future investigations into sampling properties of average measures as they provide quasiexact values given (estimates of) G, unlike the approximate methods used in previous studies.
Although the present paper dealt with six evolvability measures, this is not to endorse all of them. Some of these measures may be disfavored from a biological or other theoretical ground. For example, Hansen and Houle (2008) criticized the use of (average) response correlationρ in the random skewers analysis for its insensitivity to potentially different magnitudes of response vectors and recommended (average) response differenced as an alternative. (To be fair, Cheverud (1996) argued for the use ofρ by claiming that there tends to be a large sampling bias in the magnitude of response vectors from empirical covariance matrices, but that remains to be justified.) Rohlf (2017) also pointed out difficulties in interpretingρ without knowledge on the eigenvalues and eigenvectors of the matrices compared, and recommended simply using those quantities for comparing matrices. The present author refrains from going into details on biological validity or utility of individual evolvability measures, because they will ultimately depend on the scope and context of individual studies as well as the nature of the data analyzed.
It seems worth repeating one of Rohlf's (2017) insightful caveats here. Rohlf (2017) considered the angle between response vectors (arc cosine of response correlation ρ) from two G matrices in bivariate traits and empirically showed that the angle can have a bimodal distribution when β is distributed uniformly on the unit circle. The interpretation of the mean of such a multimodal distribution will not be straightforward, although, at least as empirically observed, the multimodality may not be a universal phenomenon (see Machado et al. 2018). At present, the possibility remains that other evolvability measures can have multimodal distributions as well. Generally speaking, it is known that the distribution of the ratio of quadratic forms x T Ax/x T Bx, where B is positive definite, has different functional forms across intervals bordered by eigenvalues of B −1 A (Hillier 2001;Forchini 2002Forchini , 2005, around which distinct density peaks can potentially be observed. Formal evaluation of the conditions for multimodality seems rather tedious (if tractable at all) and is not pursued herein. It should at least be borne in mind that the average measures are insensitive to the potential multimodality and that, generally speaking, a scalar summary index like them can mask those nuanced aspects of the underlying distribution and the multivariate covariance structure.
The present paper suggested slight modifications for some evolvability measures to accommodate potentially singular G matrices. As originally defined by Hansen and Houle (2008), conditional evolvability c and autonomy a (and integration i) could not be evaluated for singular G as they required matrix inversion. This restriction can be released by using the generalized inverse as done above. Conditional evolvability c and autonomy a are zero unless β ∈ R (G). The corresponding average measures (c andā) are also zero unless the same condition is satisfied with nonzero probability (i.e., when β is continuously distributed, its distribution is to be restricted to R (G)), as partially surmised by Hansen and Houle (2008). The new expressions enable to calculate c (4), a (6), i and their averages (C30), (C31) even when G is singular, as long as β ∈ R (G). Biologically speaking, the singularity of G represents the presence of absolute genetic constraint, where no genetic variance is available in certain directions. Although detection of absolute constraint in empirical systems requires different frameworks than evolvability measures (Mezey and Houle 2005;Hine and Blows 2006;Meyer and Kirkpatrick 2008;Pavlicev et al. 2009), the present development will facilitate investigations into systems with absolute constraints. These will also involve, e.g., shape variables that lack variation in certain directions in the full (nominal) trait space (see below). However, it is necessary to distinguish the singularity in a true G matrix and that in its empirical estimates (Ĝ, say) due to small sample size. It should be viewed with much caution whether evolvability measures can be meaningfully applied to the latter, because R Ĝ as a space fluctuates due to random sampling when the sample size is not large enough to span the entire R (G).
Previous treatments of evolvability measures (Hansen and Houle 2008;Kirkpatrick 2009;Marroig et al. 2009;Bolstad et al. 2014) and random skewers (Revell 2007) almost exclusively considered the simple condition where selection gradients are spherically distributed, β ∼ N p (0 p , σ 2 I p ), or uniformly distributed on a unit hypersphere. As detailed in Appendix C, the present results can be extended to a more general condition where the selection gradient has an arbitrary normal distribution, β ∼ N p (η, ). These extended results can potentially be useful when interest is in characterizing and comparing evolvability of populations under a certain directional and/or correlated selection regime. Of course, the original expressions of evolvability measures for a fixed β can be used when the selection is considered deterministic, so the utility of the new extended expressions will be in when the selection is considered random but potentially directional and/or correlated. Chevin (2013) theoretically investigated the rate of adaptation (change in log average fitness across generations) in the same condition where β has a general normal distribution. He notably showed that, when stabilizing selection is assumed to be weak, the rate of adaptation is approximately equal to β T Gβ. He called this quantity "evolvability", ascribing it to Hansen and Houle (2008), and discussed at length on its interpretation. However, that quantity should be distinguished from the evolvability e as defined by Hansen et al. (2003b) and Hansen and Houle (2008), which is standardized by the norm of the selection gradient β. 4 This standardization can also be seen as projection of the selection gradients onto a unit hypersphere (Mardia and Jupp 1999); directional and correlational selections can be expressed as concentration of density on the hypersphere. Accordingly, Chevin's quantity and the present expressions for evolvability measures under general normal selection regimes have different interpretations and utility. The former would be more appropriate as a measure of absolute rate of adaptation, whereas the latter seems to be more appropriate for characterizing G matrices independently of the magnitude of selection.
The present expressions for a general normal case would be particularly useful when the selection gradients are assumed to be restricted to a certain subspace rather than distributed across the entire trait space, i.e., when is singular. Such restriction can potentially arise from biological reasons, but probably are more often encountered from structural constraints in certain types of traits, e.g., shape variables. When the support of the (nominal) traits is restricted to a certain subspace, it would be sensible to assume that selection is also restricted to the same subspace (e.g., when geometric shapes are concerned, it is senseless to consider the components of selection corresponding to geometric rotation or translocation). Along with the accommodation of potentially singular G matrices, this extension allows for application of average measures to various types of traits encountered in the current evolutionary biology. Overall, the present development will facilitate theoretical and empirical investiga-tions into the evolution of multivariate characters, by providing accurate means to quantify and compare various aspects of evolvability, integration, and/or constraint.

Appendix A Zonal and invariant polynomials
This paper evaluates the expectations of ratios of quadratic forms using the zonal and invariant polynomials, mainly following Smith (1989) and Hillier et al. (2009Hillier et al. ( , 2014. These polynomials are widely used in the literature of multivariate distribution theory, primarily to integrate out components affected by orthogonal rotations from functions of random matrices. To be precise, they are not strictly required to derive results relevant to the present applications (see Bao and Kan 2013), but allow for a conceptually elegant derivation and provide alternative interpretations of some of the results as hypergeometric functions of matrix argument. A brief introduction to these mathematical toolkits is provided in this section, as they appear to have attained little use in the biological literature. For more details, readers are directed to, e.g., James (1964), Muirhead (1982Muirhead ( , 2006, Takemura (1984), Gross and Richards (1987), Mathai et al. (1995), and Chikuse (2003, appendix A).

A.1 Notations
In this section, Y denotes a p × p symmetric matrix with eigenvalues y 1 , y 2 , . . . , y p . H denotes a p × p orthogonal matrix, and the space of p × p orthogonal matrices is denoted by O( p).
The Pochhammer's symbol is where (·) is the gamma function, with the understanding (a) 0 = 1. A multivariate extension (a) κ (indexed by a partition) is defined as

A.2 Definitions of zonal polynomials
The zonal polynomials are a certain class of polynomials in matrix entries which has several useful properties. The primary definition of the zonal polynomials comes from the group representation theory (James 1960(James , 1961(James , 1964, which tends to be too abstract to comprehend for anyone new to the concept. There are alternative, more operational definitions of the zonal polynomials (Muirhead 1982;Takemura 1984), which would be more approachable to most biologists. However, those alternative definitions do not generalize into the invariant polynomials of multiple matrix arguments, which are also relevant to the present application. For this reason, the representationtheoretic definition is briefly outlined herein, omitting technical details. See Gross and Richards (1987) for a readable and sufficiently comprehensive introduction to the topic. Consider the vector space V k of homogeneous polynomials ϕ(Y) of degree k in the elements of the symmetric matrix Y. The transformation with a p × p invertible matrix L, (Technically, T (L) here is a representation, which abstracts the transformation of the right-hand side by a linear transformation.) It is known that the vector space V k decomposes into a direct sum of irreducible invariant subspaces V κ as where the direct summation runs over all partitions κ of k into not more than p parts. By V κ being invariant, it is meant that T (L)V κ ⊂ V κ for any invertible L, and by them being irreducible invariant, it is meant that they do not contain any proper invariant subspace by themselves. It is further known that each V κ contains a unique one-dimensional subspace that is invariant under Y → HYH T (restricting the above transformation to L ∈ O( p)). Then, [tr (Y)] k ∈ V k has a unique decomposition into some polynomials C κ (Y) ∈ V κ which satisfy C κ (Y) = C κ HYH T . These polynomials C κ (Y) are called the zonal polynomials corresponding to the partitions κ. In short, the zonal polynomials of degree k constitute a basis of the subspace of V k that is invariant under the transformation Y → HYH T , each corresponding to the irreducible subspace represented by a partition κ of k. In terms of (A3), they can be regarded as a generalization of powers of scalars into matrices. These polynomials can be scaled by arbitrary constants, and there exist several different normalizations in the literature. The normalization used in (A3), with all coefficients for C κ (Y) being unity, is primarily for convenience of notation.

A.3 Basic properties of zonal polynomials
A consequence of the above definition with (A3) is that C κ (Y) are polynomials in the eigenvalues y 1 , . . . , y p of Y (note that tr (Y) = tr HYH T = i y i ). It also entails that they are symmetric against permutation of the eigenvalues. Alternatively, or equivalently, they can be expressed as polynomials in the traces of matrix powers tr Y j (= i y j i ). Unfortunately, no closed-form expressions are known for the zonal polynomials, except for a few special cases, so the coefficients in these polynomials in general need to be determined recursively (see Muirhead 1982Muirhead , 2006. The zonal polynomials are originally defined for symmetric matrices, but the definition can be extended. If X is positive definite and Y is symmetric, the eigenvalues of XY and X 1/2 YX 1/2 are the same. Therefore, a zonal polynomial of XY is defined as C κ (XY) = C κ X 1/2 YX 1/2 .
Properties of the zonal polynomials have been extensively investigated (Constantine 1963;James 1964;Muirhead 1982). Elementary properties involve the following: • C κ (aY) = a k C κ (Y) holds for any constant a.
• If the number of parts in κ exceeds the rank of Y, C κ (Y) = 0 (Muirhead 1982, corollary 7.2.4(i)). • If Y is positive definite, C κ (Y) > 0 (Muirhead 1982, corollary 7.2.4(ii)). (Y, 0)), where the right-hand side is with respect to a block diagonal matrix with a square matrix of 0's of arbitrary dimension.
One of the most important properties of the zonal polynomials is the following integral identity.

A.4 Top-order zonal polynomials
The zonal polynomials corresponding to the top-order partition, [k] = (k), are called the top-order zonal polynomials and appear frequently in the multivariate distribution theory. An explicit expression of the top-order zonal polynomials is (James 1964, (123)): where s j = p i=1 y j i = tr Y j and the summation is over all such combinations of the nonnegative integers i j that satisfy k j=0 i j j = i 1 + 2i 2 + 3i 3 + · · · = k. An alternative expression is given in Gross and Richards (1987, (6.8.1)).
For the identity matrix I p , the expression simplifies as:

A.5 Hypergeometric functions of matrix argument
With the zonal polynomials as a generalization of powers into matrices, the hypergeometric functions of matrix argument are defined as where the summation κ is across all ordered partitions κ of k, and (x) κ is defined as in (A2). Conditions for convergence are as follows: (i) when m ≤ n, the series converges for all Y; (ii) when m = n + 1, the series converges for all Y < 1, where Y is the maximum of the absolute values of the eigenvalues; (iii) when m > n + 1, the series diverges for all Y = 0, unless the series terminates (when any a i is a negative integer).
The following paragraphs list a few results relevant to the present applications. More extensive treatments on this topic can be found in, e.g., Muirhead (1982), Gross and Richards (1987), and Chikuse (2003). If any of a i is 1/2, the series can be expressed as a weighted sum of top-order zonal polynomials, as (1/2) κ = 0 unless κ = [k] (see (A2)): m+1 F n a 1 , . . . , a m , Analogous to the scalar equivalent, 0 F 0 is an exponential series but about the trace: Provided that all eigenvalues of Y are less than 1 in absolute values, 1 F 0 is a generalization of the binomial series (Muirhead 1982, corollary 7.3.5):

A.6 Invariant polynomials of multiple matrix arguments
The invariant polynomials of multiple matrix arguments provide some extension of the zonal polynomials into multiple matrices (Davis 1979(Davis , 1980Chikuse 1980;Chikuse and Davis 1986a). Accessible introductions to the topic are found in, e.g., Chikuse and Davis (1986b) and Mathai et al. (1995, appendix). Let V k 1 ,...,k r = V k 1 ⊗ · · · ⊗ V k r be the vector space of polynomials of degree k 1 , . . . , k r in the elements of p × p symmetric matrices Y 1 , . . . , Y r , respectively. Consider the following simultaneous transformation with a p × p invertible matrix L: First noting the subspaces in V k 1 ,...,k r that are invariant against this transformation and then by decomposing them into irreducible ones, one has the following decomposition: Here, V κ i are analogous to V κ discussed above but for Y i , and V κ 1 ,...,κ r are irreducible invariant subspaces indexed by and κ 1 , . . . , κ r . are certain ordered partitions of 2 f , with f = k 1 + · · · + k r , into not more than p parts, whose range is determined by κ 1 , . . . , κ r . κ i run across partitions of k i , i = 1, . . . , r , into not more than p parts. It is known that only those V κ 1 ,...,κ r with partitions taking the form = 2φ, where φ is a partition of f , contain a subspace invariant under the simultaneous transformation Y 1 → HY 1 H T , . . . , Y r → HY r H T , which is one-dimensional. The corresponding polynomials are called the invariant polynomials, C κ 1 ,...,κ r φ (Y 1 , . . . , Y r ), indexed by κ 1 , . . . , κ r and φ ∈ κ 1 · · · κ r . (There is a potential issue of non-uniqueness, but this is not concerned in most applications).
Explicit forms of the invariant polynomials are even less obvious than the zonal polynomials, but they are polynomials in matrix traces of the form tr Y a 1 1 Y a 2 2 . . . Y a r r , so that the total degrees in elements of Y 1 , . . . , Y r are k 1 , . . . , k r , respectively.
An important generalization of Proposition 2 enabled by the invariant polynomials is the following (see also Mathai et al. 1995, theorem A.3).
One notable corollary from this result is (Davis 1980;Chikuse 1980) The top-order invariant polynomials, in which φ = [ f ], the top-order partition of f , are of particular importance here. This partition occurs only when κ i = [k i ] for all i. An explicit form of the top-order invariant polynomials is (Chikuse 1987;Hillier et al. 2009): Here, d k 1 ,...,k r is defined as: where i j run from 0 to k j (but at least one of i j is nonzero), and ν i 1 ,...,i r are nonnegative integers; these collectively satisfy the r linear constraints k 1 ν 1 =0 · · · k r ν r =0 i l ν i 1 ,...,i r = k l for l = 1, . . . , r . 5 And p i 1 ,...,i r are the coefficients for r j=1 t i j j in the expansion of the following: Note that (A13) simplifies into (A5) when r = 1. In addition, it holds that (Chikuse 1987) regardless of individual values of k i (see also (A6)).

A.7 Example application to evolvability measures
As a demonstration for how above mathematical toolkits act in the present problem of evaluating moments of (multiple) ratios of quadratic forms, an expression of the average autonomyā is derived here, under the simplest case that β ∼ N p (0 p , σ 2 I p ), where σ 2 is an arbitrary positive constant, and G is nonsingular. The derivation here is a simplified version of that in Smith (1989). When G is singular, the approach of Bao and Kan (2013) can be used instead.
As discussed in the text, u is uniformly distributed on the unit hypersphere S p−1 under this assumption. Thus, the average autonomyā, from the definition in (5), is to be evaluated as the following integral: where (du) denotes the normalized uniform measure on S p−1 (see, e.g. Muirhead 1982). To evaluate this, consider the following transformation: where α 1 is a positive constant that satisfy 0 < α 1 < 2/λ max (G) (so that |u T I p − α 1 G u| < 1), the second equation is from the fact (1 − x) −1 = ∞ k=0 x k when |x| < 1, and the last equation is from (A3) and the fact u T I p − α 1 G u = tr I p − α 1 G uu T . Note that (A18) can be written as 1 F 0 1; I p − α 1 G uu T from (A10) and is uniformly convergent under the assumptions. (This series does not converge when G is singular.) By similar transformations, Then, the above integral becomes: Here, term-by-term integration is permissible because the series is uniformly convergent (see also Bao and Kan 2013). Note that integration of u over S p−1 is equivalent to that of H over O( p) (e.g., Mardia and Jupp 1999), whence the change of variables u = He is possible, where e = (1, 0, . . . 0) T (or e could be any unit vector). By denoting ee T = E, the integral is now by applying Proposition 3. Furthermore, using (A12), [k+l] I p − α 1 G, Inserting (A6) yields (14) in the text. The expressions for all average measures presented in the main text under the same assumption can be derived in a similar manner.

A.8 Generating functions for top-order zonal and invariant polynomials
For practical evaluation of top-order zonal and invariant polynomials, it is more efficient to handle d k 1 ,...,k r in (A13) and (A14) than the polynomials themselves. Chikuse (1987) showed that the same d k 1 ,...,k r (A 1 , . . . , A r ) appear as coefficients in the following, which is the joint moment generating function of x T A 1 x/2, . . . , x T A r x/2 for x ∼ N p (0 p , I p ): Chikuse (1987) and Hillier et al. (2009Hillier et al. ( , 2014) presented a few recursive algorithms to evaluate d k 1 ,...,k r . Bao and Kan (2013) and Hillier et al. (2014) presented further improvements for evaluating moments of ratios of quadratic forms in potentially noncentral normal variables, x ∼ N p (μ, I p ). Following those papers, the coefficients h k 1 ,k 2 ,h k 1 ;k 2 ,h k 1 ;k 2 ,k 3 that appear in the following expansions are used in the present paper: (A23) and (A24) are from Bao and Kan (2013), and (A25) is a slight extension from (A24) used in appendices B and C. All these simplify to (A22) when μ = 0 p . Note that the first arguments inh k 1 ;k 2 andh k 1 ;k 2 ,k 3 are not interchangeable with the other arguments, unlike those in d k 1 ,k 2 or h k 1 ,k 2 .
of the left-hand side exists if and only if that of the right-hand side does, and the necessary and sufficient condition for the latter is given in the proposition 1 of Bao and Kan (2013), which encompasses the positive definite case above. Assuming F = ∅, it is possible to find a positive semi-definite matrix F that always sat- by choosing arbitrary small positive numbers and a basis of F as its nonzero eigenvalues and eigenvectors, respectively. The proposition 1 of Bao and Kan (2013) applied to the right-hand side defines a sufficient condition for the existence of the moment. This is admittedly a restrictive condition, and the existence condition in the case F = ∅ is not always obvious.
In the present applications, the moment existence conditions can be easily confirmed forē,c,r , andd by directly applying the proposition 1 of Bao and Kan (2013).ā and f always fall within the case (i) above, and the moments exist as long as they are defined (in case off , β should not be restricted onto N (G)). On the other hand,ρ may fall within either (i) or (ii) depending on the structures of the two G's. Even in the latter case and if F = ∅, which is a pathologic condition in this application, this specific moment exists as long as ρ is defined with probability 1, since −1 ≤ ρ ≤ 1 whenever defined (above). In addition, the same criteria can be used to confirm that these evolvability measures have finite second moments, which formally validate the use of Monte Carlo evaluations.

C.1 Conditions considered
This section considers a general p-variate normality condition for the selection gradient, β ∼ N p (η, ). Regarding ratios of quadratic forms, however, tractable results are available only for normal variables with a spherical covariance structure, i.e., N q μ, I q for some q and arbitrary μ. Let A be an arbitrary p × p symmetric matrix and K be a p × q matrix that satisfies KK T = , where q (≤ p) is the rank of . Writing β = η + Kβ 0 with β 0 ∼ N q (0 q , I q ), the quadratic form in β with respect to A can be written as β T Aβ = (η + Kβ 0 ) T A(η + Kβ 0 ) (see also Mathai and Provost 1992, chapter 3). Certain assumptions are required to express this quadratic form as one in normal variables with a spherical covariance structure.
(1) When is nonsingular In this case, p = q and K is invertible. It suffices to consider the transformation β * = K −1 β ∼ N p μ, I p , where μ = K −1 η. The quadratic form can be rewritten as β T Aβ = β T * K T AKβ * , a new quadratic form in β * with respect to K T AK, to which results below apply.
(2) When is singular In this case, K is not invertible and at least one of the following additional conditions need to be satisfied for the results below to be applicable. (i) η ∈ R ( ) (including η = 0 p ): Under this condition, it holds that η = KK − η (e.g., Schott 2016, theorem 5.25) since R ( ) = R (K). It is then possible to con-sider β T Aβ = β T * K T AKβ * with β * = K − β ∼ N p μ, I p , where μ = K − η, as a generalization of the nonsingular case. (ii) R (A) ⊆ R ( ): From the symmetry of A and the fact that R (K) = R K − T , it holds that A = K − T K T AKK − under this condition (Schott 2016, theorem 5.25). Then the same transformation as for (i) applies. (Utility of this condition in the present applications is relatively limited, since all evolvability measures except ρ involve at least one I p in place of A.) (iii) Aη = 0 p : Under this condition, the above quadratic form simplifies into β T 0 K T AKβ 0 , to which results below apply with μ = 0 q .
In practice, the conditions (1) or (2)(i) above seem to cover most cases of biological interest. That is, if the variation of selection gradient β is restricted to a certain subspace (condition (2)), then it seems plausible that the mean selection gradient η is also in the same subspace (condition (2)(i)). Otherwise, β ought to contain a nonzero deterministic component (η) that is strictly unaffected by (linearly independent of) its potential variability (represented by ).

C.2 Average evolvability measures
Expressions for average evolvability measures for β ∼ N p (η, ) or equivalently β * ∼ N q μ, I q can be derived from Propositions 1 and 4.
The average evolvabilityē is (1) j q 2 j+1h 1; j K T GK; I q − αK T K , where α is a positive constant that satisfies 0 < α < 2/λ max K T K . As discussed in the text (2.4), the average conditional evolvabilityc and average autonomyā can be nonzero only if the distribution of β is strictly within R (G). This happens (i) when G is nonsingular; or (ii) when G is singular, η ∈ R (G) and R ( ) ⊆ R (G).
Under these conditions, the following expression can be obtained for the average conditional evolvabilityc: (1) j q 2 j+1h where α is to satisfy 0 < α < 2/λ max K T G − K . Under the same conditions, the average autonomyā is where α 1 and α 2 are to satisfy 0 < α 1 < 2/λ max K T GK and 0 < α 2 < 2/λ max K T G − K . As before, the average integrationī is 1 −ā.

C.3 Practical evaluation and truncation error
The above series expressions for average measures in general cases can be evaluated by one of the recursive algorithms described by Hillier et al. (2009Hillier et al. ( , 2014 and Bao and Kan (2013). When the mean μ is nonzero, the series can be most efficiently evaluated by recursions for h i, j andh i, j described in Hillier et al. (2014, section 5.4) and Bao and Kan (2013, section 5). When possible, it is recommended to inspect a profile of the partial sum across varying orders as the signs of the terms can in general fluctuate in those series. At present, truncation error bounds for general cases are available only forē and c. From the theorem 7 of Hillier et al. (2014), a truncation error bound for these average measures evaluated up to k = M is obtained from the following, by inserting (A, B) = (K T GK, K T K) and (K T K, K T G − K) forē andc, respectively: Here, n = 1, t = 2, and S M = M j=0ĥ 1; j A; I q − αB , withĥ 1; j (A 1 ; A 2 ) being the coefficient of t 1 t j 2 in the expansion which can be evaluated by a recursive algorithm similar to the one presented in Hillier et al. (2014, theorem 6). 6 This expression bounds the truncation error in absolute values unlike those in (19)-(22) which are one-sided. This is becauseh i, j can take both positive and negative values when μ is nonzero, so that the partial sums are not always increasing. Under the restriction K T K = I q , a similar error bound can be derived for f , by letting A = K T GK, B = K T G 2 K, n = 1/2, t = 3, and S M = M k=0 k l=0ĥ 1;l,k−l A; I q − αB, 0 q×q in (C36). Here,ĥ 1; j,k (A 1 ; A 2 , A 3 ) is the coefficient of t 1 t j 2 t k 3 in the expansion of which can be evaluated by the same recursive algorithm forĥ i; j with obvious modifications.