Limiting Behaviour of Fr\'echet Means in the Space of Phylogenetic Trees

As demonstrated in our previous work on ${\boldsymbol T}_{4}$, the space of phylogenetic trees with four leaves, the global, as well as the local, topological structure of the space plays an important role in the non-classical limiting behaviour of the sample Fr\'echet means of a probability distribution on ${\boldsymbol T}_{4}$. Nevertheless, the techniques used in that paper were specific to ${\boldsymbol T}_{4}$ and cannot be adapted to analyse Fr\'echet means in the space ${\boldsymbol T}_{m}$ of phylogenetic trees with $m(\geqslant5)$ leaves. To investigate the latter, this paper first studies the log map of ${\boldsymbol T}_{m}$, a generalisation of the inverse of the exponential map on a Riemannian manifold. Then, in terms of a modified version of the log map, we characterise Fr\'echet means in ${\boldsymbol T}_{m}$ that lie in top-dimensional or co-dimension one strata. We derive the limiting distributions for the corresponding sample Fr\'echet means, generalising our previous results. In particular, the results show that, although they are related to the Gaussian distribution, the forms taken by the limiting distributions depend on the co-dimensions of the strata in which the Fr\'echet means lie.


Introduction
The concept of Fréchet means of random variables on a metric space is a generalisation of the least mean-square characterisation of Euclidean means: a point is a Fréchet mean of a probability measure μ on a metric space (M, d) if it minimises the Fréchet function for μ defined by provided the integral on the right side is finite for at least one point x. Note that the factor 1/2 will simplify some later computations. The concept of Fréchet means has recently been used in the statistical analysis of data of a non-Euclidean nature. We refer readers to Bhattacharya and Patrangenaru (2005), Bhattacharya and Patrangenaru (2014), Dryden et al. (2014), Dryden and Mardia (1998) and Kendall and Le (2011), as well as the references therein, for the relevance of, and recent developments in, the study of various aspects of Fréchet means in Riemannian manifolds. The Fréchet mean has also been studied in the space of phylogenetic trees, as motivated by Billera et al. (2001) and Holmes (2003). It was first introduced to this space independently by Bacak (2014) and Miller et al. (2015), which both gave methods for computing it. Limiting distributions of sample Fréchet means in the space of phylogenetic trees with four leaves were studied in Barden et al. (2013), and it was used to analyse tree-shaped medical imaging data in Feragen et al. (2013), while principal geodesic analysis on the space of phylogenetic trees, a related statistical issue, was studied in Nye (2011), Nye (2014), and Feragen et al. (2013). A phylogenetic tree represents the evolutionary history of a set of organisms and is an important concept in evolutionary biology. Such a tree is a contractible graph, that is, a connected graph with no circuits, where one of its vertices of degree 1 is distinguished as the root of the tree and the other such vertices are (labelled) leaves. The space T m of phylogenetic trees with m leaves was first introduced in Billera et al. (2001). The important feature of the space is that each point represents a tree with a particular structure and specified lengths of its edges in such a way that both the structure and the edge lengths vary continuously in a natural way throughout the space. The space is constructed by identifying faces of a disjoint union of Euclidean orthants, each corresponding to a different tree structure. In particular, it is a topologically stratified space and also a C AT (0), i.e. globally non-positively curved, space (cf. Bridson and Haefliger 1999). A detailed account of the underlying geometry of tree spaces can be found in Billera et al. (2001) and a brief summary can be found in the Appendix to Barden et al. (2013).
As demonstrated in Basrak (2010) and Hotz et al. (2013) for T 3 and in Barden et al. (2013) for T 4 , the global, as well as the local, topological structure of the space of phylogenetic trees plays an important role in the limiting behaviour of sample Fréchet means. These results imply that the known results (cf. Kendall and Le 2011) on the limiting behaviour of sample Fréchet means in Riemannian manifolds cannot be applied directly. Moreover, due to the increasing complexity of the structure of T m as m increases, the techniques used in Barden et al. (2013) for T 4 could not be adapted to derive the limiting behaviour of sample Fréchet means in T m for general m. For example, although the natural isometric embedding of T 4 is in 10-dimensional Euclidean space R 10 , it is intrinsically 2-dimensional, being constructed from 15 quadrants identified three at a time along their common axes. This made it possible in Barden et al. (2013), following Billera et al. (2001), to represent T 4 as a union of certain quadrants embedded in R 3 in such a way that it was possible to visualise the geodesics explicitly. That is, naturally, not possible for m > 4. The need to describe geodesics explicitly arises as follows. In a complete manifold of non-positive curvature, the global minimum of a Fréchet function would be characterised by the vanishing of its derivative. In tree space, as in general stratified spaces, such derivatives do not exist at non-manifold points. However, directional derivatives for a Fréchet function, which serve our purpose, do exist at all points and for all tangential directions. They are defined via the log map, which is a generalisation of the inverse of the exponential map of Riemannian manifolds, and is expressed in terms of the lengths and initial tangent vectors of unit speed geodesics.
In this paper, we derive the expression for the log map using the geometric structure of geodesics in T m obtained in Owen (2011) and Owen and Provan (2011). As a result, we are able to establish a central limit theorem for iid random variables having probability measure μ that has its Fréchet mean lying in a top-dimensional stratum. In this case, our central limit theorem shows that sample means behave in a predictable way, similar to the case for arbitrary Euclidean data although with a more complex covariance structure. In particular, our result says that, as the size of a sample increases, the mean of that sample approaches the true mean of the underlying distribution in a quantifiable way. This means that we can use the mean of sample data as an approximation of the true mean as we would do with Euclidean data. This opens the door for work on confidence intervals, such as Willis (2016). Moreover, we take advantage of the special structure of tree space in the neighbourhood of a stratum of co-dimension one to obtain the corresponding results when the Fréchet mean of μ lies in such a stratum. In particular, we show that, in this case, the limiting distribution can take one of the three possible forms, distinguished by the nature of its support. Unlike the Euclidean case, the limiting distributions in both cases here are expressed in terms of the log map at the Fréchet mean of μ. This is similar to the central limit theorem for sample Fréchet means on Riemannian manifolds (cf. Kendall and Le 2011). Although it may appear non-intuitive, it allows us to use the standard results on Euclidean space. For example, in the top-dimensional case, the limiting distribution is a Gaussian distribution and so some classical hypothesis tests can be carried out in a similar fashion to hypothesis tests for data lying in a Riemannian manifold as demonstrated in Dryden and Mardia (1998) for the statistical analysis of shape. However, in the case of codimension one, the limiting distribution is non-standard and so the classical hypothesis tests cannot easily be modified to apply. Further investigation is required and we aim to pursue this, as well as the applications of the results to phylogenetic trees, in future papers.
The remainder of the paper is organised as follows. To obtain the directional derivatives of a Fréchet function, we need an explicit expression for the log map that is amenable to calculation. This in turn requires a detailed analysis of the geodesics which we carry out in the next section using results from Owen (2011) and Owen and Provan (2011). The resulting expression (6) for the log map in Theorem 1 and its modification (9) are then used in the following two sections which study the limiting distributions for sample Fréchet means in T m ; Sect. 3 concentrates on the case when the Fréchet means lie in the top-dimensional strata, while Sect. 4 deals with the case when they lie in the strata of co-dimension one. In the final section, we discuss some of the problems involved in generalising our results to the case that the Fréchet means lie in strata of arbitrary co-dimension.

The log map on a top-dimensional stratum
The log map is the generalisation of exp −1 , the inverse of the exponential map on a Riemannian manifold. For a tree T * in T m the log map, log T * , at T * takes the form as T varies, where v(T ) is a unit vector at T * along the geodesic from T * to T and d(T * , T ) is the distance between T * and T along that geodesic. This is well defined since T m is a globally non-positively curved space, or C AT (0)-space (cf. Bridson and Haefliger 1999), and so this geodesic is unique. Note that for data in Euclidean space, since tangent vectors at different points may be identified by parallel translation. log T * (T ) would be represented by the difference T − T * of the two position vectors. Then, log T (T * ) would be its negative T * − T . However, although for convenience we shall embed T m in a Euclidean space, that embedding is not unique and there is no canonical relation between log T * (T ), which is a vector tangent to T m at T * , and log T (T * ) which is tangent at T . The log map can be thought of as a projection from the more complicated tree space onto a simpler Euclidean space, or more generally onto a Euclidean cone, that has minimal distortion around T * , with the amount of possible distortion increasing as trees get further from T * . Specifically, the log map is a bijection for trees in the orthant of T * . For trees outside of this orthant, multiple trees can be mapped to the same Euclidean point, including two trees with no edges in common. Thus, we generally cannot use information about the position of a point on the tangent space to say something about the inverse tree, and thus the log map is primarily a mathematical tool rather than something that has biological meaning.
To analyse this log map further, we first recall some relevant aspects of the structure of trees and tree spaces. Apart from the roots and leaves of a tree, which are the vertices of degree 1 mentioned above, there are no vertices of degree two and the remaining vertices, of degree at least 3, are called internal. An edge is called internal if both its vertices are. A tree with m labelled leaves and unspecified internal edge lengths determines a combinatorial type. Then, T m is a stratified space with a stratum for each such type: a given type with k ( m − 2) internal edges determines a stratum with k positive parameters ranging over the points of an open k-dimensional Euclidean orthant, each point representing the tree with those specific parameters as the lengths of its internal edges. Note that, for this paper, we shall only consider the internal edges The edge between vertices v 1 and v 2 shrinks to 0 to form a vertex of degree p + q + 2 of a tree. So by 'edge' we always mean 'internal edge' and, to simplify the notation, we consider T m+2 , rather than T m .
The metric on T m+2 is induced by regarding the identification of a stratum τ with a Euclidean orthant O as an isometry. Then each face, or boundary orthant of codimension one, of O is identified with a boundary stratum σ of τ . A tree of type σ is obtained from a tree of type τ by coalescing the vertices v 1 and v 2 of degree p and q of the edge whose parameter has become zero, to form a new vertex v of degree p + q − 2. See Fig. 1.
We are particularly interested in the top-dimensional strata. These are formed by binary trees, in which all internal vertices have degree 3. A binary tree with m + 2 leaves has m + 1 internal vertices and m internal edges so that the corresponding stratum has dimension m. There are (2m + 1)!! such strata in T m+2 (cf. Schroder 1870). For these strata, the boundary relation results in two adjacent vertices of degree 3 coalescing to form a vertex of degree 4. Since each vertex of degree 4 can be formed 3 different ways, each stratum of co-dimension one is a component of the boundary of three different top-dimensional strata. Figure 2 shows an example of these strata in T 4 .
If a tree T * lies in a top-dimensional stratum of T m+2 , since such a stratum can be identified with an orthant O in R m , we may identify the tangent space to T m+2 at T * with R m . Then, for each point T ∈ T m+2 , the geodesic from T * to T in T m+2 will start with a linear segment in O, which determines an initial unit tangent vector v(T ) ∈ R m at T * . Thus, we may identify the image of the log map defined in (1) as the vector d( For example, the space T 3 of trees with three leaves is the 'spider': three half Euclidean lines joined at their origins. Denoting the length of the edge e of T by |e| T , then d(T * , T ) = ||e| T * − |e| T |, if T * and T lie in the same orthant of T 3 , and d(T * , T ) = |e| T * + |e| T , otherwise. Thus, the log map for T 3 can be expressed explicitly as: if T and T * are in the same orthant; −(|e| T + |e| T * )e otherwise, where e is the canonical unit vector determining the orthant in which T * lies. Note that we abuse notation by calling the (single) internal edge e in all 3 trees, despite these edges dividing the leaves in different ways. The explicit expression for the log map for the space T 4 of trees with four leaves is already much more complicated than this and was derived in Barden et al. (2013).
To obtain the expression for the log map at T * for the space T m+2 of trees with m + 2 (m > 2) leaves, we first summarise without proofs the description, given in Billera et al. (2001), Owen (2011), Owen andProvan (2011) andVogtmann (2007), of the geodesic between two given trees in T m+2 .
When an (internal) edge is removed from a tree, it splits the set of the leaves plus the root into two disjoint subsets, each having at least two members, and we identify the edges from different trees that induce the same split. Each edge has a 'type' that is specified by the subset of the corresponding split that does not contain the root. For example, in the tree in Fig. 3a, the edge labelled x 3 has the edge-type {a, b}, while the edge labelled x 1 has the edge-type {a, b, c, d}. There are possible edge-types. Two edge-types are called compatible if they can occur in the same tree, and T m+2 may be identified with a certain subset of R M , each possible edge-type being identified with a positive semi-axis in R M . To make this identification explicit, we choose a canonical order of the edges by first ordering the leaves and then taking the induced lexicographic ordering of the sets of (ordered) leaves that determine the edges. Then, if is a set of mutually compatible edge-types and O( ) is the orthant spanned by the corresponding semi-axes in R M , each point of O( ) represents a tree with the combinatorial type determined by and T m+2 is the union of all such orthants. c The geodesic between the trees corresponding to u * and u is marked with the dashed line.
The −x 1 ,−x 2 ,x 3 octant does not exist in tree space, but the −x 2 , x 3 quadrant does, so the geodesic is restricted to lying in the grey area. It bends at the points p and q. d The isometric embedding of the grey area in c into V 2 . Intuitively, this corresponds to "unfolding" the bends. u * and u are mapped to v * and v. The Euclidean geodesic between v * and v in V 2 is contained in the grey area, and thus can be mapped back onto the geodesic in tree space For a set of edges A in a tree T , define A T = e∈A |e| 2 T and write |A| for the number of edges in A. For two given trees T * and T , let E * and E be their respective edge sets, or sets of non-trivial splits. Assume first that T * and T have no common edge, i.e. E * ∩ E = ∅. Then, the geodesic from T * to T can be determined as follows.
Lemma 1 Let T * and T be two trees with no common edges, lying in top-dimensional strata of T m+2 . Then, there is an integer k, 1 k m, and a pair (A, B) of partitions A = (A 1 , . . . , A k ) of E * and B = (B 1 , . . . , B k ) of E, all subsets A i and B j being non-empty, such that (P1) for each i > j, the union A i ∪ B j is a set of mutually compatible edges; there are no non-trivial partitions C 1 ∪ C 2 of A i and D 1 ∪ D 2 of B i such that C 2 ∪ D 1 is a set of mutually compatible edges and C 1 T * D 1 T < C 2 T * D 2 T . 106 D. Barden et al. The geodesic is the shortest path through the sequence of orthants and has length ( is the orthant in which T * lies and that T is in O k . These results, developed from Vogtmann (2007), are given in this form, though not in a single lemma, in Owen and Provan (2011, section 2.3), where the properties (P1), (P2) and (P3) are stated in identical terms. The edge set for O i is denoted by E i in the statement of Theorem 2.4 there and the formula for the length of the geodesic is equation (1) in that statement.
Following Vogtmann (2007) and Owen and Provan (2011), respectively, we call the orthant sequence C the carrier of the geodesic, and the pair of partitions (A, B) the support of the geodesic. In general, the integer k and the support (A, B) need not be unique. However, they are unique if all the inequalities in (P2) are strict (Owen and Provan 2011, Remark, p.7) and, in this case, we shall refer to the carrier and support as the minimal ones.
Under the above assumption, the integer k appearing in Lemma 1 is the number of times that the geodesic includes a segment in the interior of one orthant followed by a segment in the interior of a neighbouring orthant. Hence, the constraints 1 k m: k = 1 implies that the geodesic goes through the cone point and k = m that it passes through a sequence of top-dimensional orthants.
We can now give an isometric embeddingC in R m of C ⊆ R M with T * mapped to u * = (u * 1 , . . . , u * m ) in the positive orthant, where the u * i > 0 represent the lengths of the edges of T * , and with T mapped to u = −(u 1 , . . . , u m ) in the negative orthant, where the u i > 0 are the lengths of the edges of T . Let (t * 1 , . . . , t * m ) be the coordinates of T * ordered by the canonical ordering given just before Lemma 1 that embeds T m+2 in R M . Then, we can reorder the coordinates u * i such that the edges in A 1 correspond to the first |A 1 | positive semi-axes in R m , the edges in A 2 correspond to the next |A 2 | positive semi-axes in R m , etc., while the edges in B 1 correspond to the first |B 1 | negative semi-axes in R m , the edges in B 2 correspond to the next |B 2 | negative semi-axes in R m , etc. By (P1), the edge sets B 1 , . . . , B i , A i+1 , . . . , A k are mutually compatible for all 0 i k, implying that the images of these edges in R m are mutually orthogonal, and so they determine an isometric embedding of O i , defined by (3), and hence the required isometric embeddingC of C. Let π be the inverse of the permutation of the coordinates described above, so that Example 1 Figure 3c shows the embedded geodesic and minimal carrier between the trees T * and T (see Fig. 3a, b), which correspond to the points u * and u, respectively. The minimal support consists of For convenience, π is the identity permutation in this case. The minimal carrier consists of the all positive octant determined by x 1 > 0, x 2 > 0 and x 3 > 0; the 2-dimensional quadrant formed by the positive x 3 and negative x 2 axes; and the all negative octant.
For any 1 l m, let V l be the subspace of R l that is the union of the (closed) orthants P i , i = 0, . . . , l, where For the given T * , T , and corresponding k from Lemma 1, there are k + 1 orthants in the carrier of the geodesic between T * and T . If k = m (the intrinsic dimension of T m+2 ), then the carrier C is isometric toC = V m , with O i coinciding with P i and with the geodesic from u * to u being a straight line contained inC. Otherwise if k < m, the spaceC is strictly contained in V m , and some of the top-dimensional orthants of V m may not correspond to orthants in tree space. Additionally, the geodesic between u * and u inC will bend at certain orthant boundaries within the ambient space V m . We now give an isometric embedding onto V k of a subspace ofC containing the geodesic in V m such that the image geodesic is a straight line.
The geodesic between u * and u passes through k orthant boundaries. At the ith orthant boundary, the edges in A i , which have been shrinking in length since the geodesic started at u * , simultaneously reach length 0, and the edges in B i simultaneously appear in the tree with length 0 and start to grow in length. The length of each edge in A i changes linearly as we move along the geodesic, and thus since these lengths all reach 0 at the same point, the ratios of these lengths to each other remain the same along the geodesic. An analogous statement can be made for the lengths of the edges in B i (cf. Owen 2011, Corollary 4.3). The basic idea behind the embedding into V k is that because the lengths of the edges in A i , for any i, are all linearly dependent on each other, we can represent those edges in V k using only one dimension, and analogously for the edges in B i . More specifically, for 1 i k, let be the projection of u * on the orthant O(A i ). That is, the coordinates of v * i are the lengths of the edges in A i , ordered as chosen above. Similarly, let so that the coordinates of v i are the lengths of the edges in B i , in that order. Then, the geodesic between T * and T in C is piece-wise linearly isometric with the Euclidean geodesic between the vectors and in V k and, hence, in R k . In particular, the Euclidean distance between these two Euclidean points is the same as the distance between T * and T in C. Thus, we have the following result, the essence of which appears in Owen (2011, Theorem 4.10), to which we refer readers for more detailed proof.
Lemma 2 For any given T * and T in T m+2 with no common edge and with T * lying in a top-dimensional stratum, there is an integer k, 1 k m, for which there are two vectors v * , v ∈ R k , depending on both T * and T , such that the geodesic between T * and T is homeomorphic and piece-wise linearly isometric, with the (straight) Euclidean geodesic between v * and v, where v * lies in the positive orthant of R k and v in the closure of the negative orthant.
For Example 1, k = 2, and thus the grey area shown in Fig. 3c is isometrically mapped to V 2 , as shown in Fig. 3d.
In the general case where T * and T have a common edge, say e, this common edge determines, for each of the two trees, two quotient trees T * i and T i , i = 1, 2, described as follows (cf. Owen 2011;Vogtmann 2007). The trees T * 1 and T 1 are obtained by replacing the subtree 'below' e with a single new leaf, so that e becomes an external edge. These two replaced subtrees form the trees T * 2 and T 2 , with the 'upper' vertex of the edge e becoming the new root. Then, the geodesic γ (t) between T * and T is isometric with (γ e (t), γ 1 (t), γ 2 (t)), where γ e is the linear path from |e| T * to |e| T and γ i is the geodesic from T * i to T i in the corresponding tree space. For this, we treat T 1 and T 2 , the spaces of trees with no internal edges, as single points, so that any geodesic in them is a constant path. Assuming that T * i and T i have no common edge for i = 1 or 2, we may obtain, as above, a straightened image of each geodesic γ i in V k i with T * i represented in the positive orthant and T i in the negative one. Combining these with the geodesic γ e , which is already a straight linear segment, we have an isometric representation of γ as a straight linear segment in R + × V k 1 × V k 2 . In this case, the sequence of strata containing the tree space geodesic between T * and T is contained in the product of the carriers for the relevant quotient trees, together with an additional factor for the common edge. For example, if 0 < t 1 < t 2 < t 3 < t 4 < 1 and the geodesic γ 1 spends [0, , 1] in orthant P 3 , then the carrier for the product geodesic would be the sub-sequence of the full lexicographically ordered sequence of nine products.
If T * and T have more than one common edge, then either T * 1 and T 1 , or T * 2 and T 2 , will have a common edge and we may repeat the process. Having done so as often as necessary, we arrive at a sequence of orthants determined by the non-common edges of T * and T . These we relabel O 0 to O k as in Lemma 1. If O −1 is the orthant determined by the axes corresponding to the common edges of T * and T , then the sequence is the carrier of the geodesic from T * to T . Similarly, the support for the tree space geodesic between T * and T is found by interleaving the partitions in the supports of the relevant quotient trees, so that property (P2) is satisfied in the combined support. The resulting partitions A and B are then preceded by the set A 0 = B 0 of axes corresponding to the common edges so that In this generalised context, the value k = 0 is now possible, implying that all edges are common to T * and T . In other words, they lie in the same orthant. Note that this presentation differs slightly from that in Section 1.2 of Miller et al. (2015) in that, by collecting all the common edges in a single member A 0 = B 0 of the support, we are implicitly suppressing the axiom (P3) for that set. Note that the maximum value of the number k, which is determined by the non-common edges of T * and T , is m − |A 0 | in the general case.

Definition 1
We call k, the number of changes of orthant in the unique minimal carrier of the geodesic from T * to T , the carrier number k(T * , T ) of T * and T .
The minimal carrier and support determine the corresponding u * , v * i , v * and v in a similar manner to the special case where there is no common edge between T * and T given in Lemma 2, modified to account for the common edges. For this, the first |A 0 | coordinates of u * will be the (A 0 ) T * and those of u will be +(B 0 ) T ; for k = k(T * , T ) and 1 i k, and v i is modified similarly; and v * and v have additional first coordinates v * 0 = (A 0 ) T * and v 0 = (B 0 ) T , respectively. Then, with this modification, the geodesic between T * and T is homeomorphic and piece-wise linearly isometric, with the (straight) Euclidean geodesic between v * and v, where v * lies in the positive orthant of R |A 0 | + × R k . This generalisation of Lemma 2 to the general case was obtained, with different notation, in Billera et al. (2001), Owen (2011) andVogtmann (2007). Then, the log map as defined by (1) can be expressed using these vectors as follows.
where the ordering of the coordinates is that induced by the canonical ordering for R M . For T ∈ T m+2 , there are vectors v * and v in R is the number of common edges of T * and T , k is the carrier number k(T * , T ) and v * lies in the positive orthant of the corresponding space, and a linear map ρ such that . . , k, with the additional initial coordinates v * 0 when T * and T have common edges, where v * i are as defined by (5), and v be determined similarly. The piece-wise linear isometry that straightens the geodesic from T * to T , given in Lemma 2 for the special case as well as the above for the general case, has an inverse on the positive orthant in R |A 0 | + × R k . This inverse is given by and the identity on the |A 0 | initial coordinates, where e i is the (|A 0 |+i)th standard basis vector in R Although it is not expressed precisely as it is here, the idea for a more detailed derivation of this in this case is captured in Theorem 4.4 in Owen (2011), where χ is denoted by g 0 .
Since (2), is also an isometry preserving the initial segments of the geodesics. It follows that Noting that the maps π and χ are linear and π •χ(v * ) = t * , the required result follows by taking ρ = π • χ . Figure 4 shows the log map for the tree T * for Example 1.
Although T m+2 is C AT (0), log T * is not a one-to-one map. In particular, if T 1 and T 2 are two different trees such that k(T * , T 1 ) = k(T * , T 2 ) is not maximal, then it is possible that log T * (T 1 ) = log T * (T 2 ), as observed in the case of T 4 in Barden et al. (2013). As another example, consider two trees T * , T ∈ T m+2 with no common edges such that the geodesic between them passes through the cone point with a given length l. Then for any other tree T with a geodesic to T * of length l, passing through the cone point, we also have that log T * (T ) = log T * (T ).

Fig. 4
The log map for tree T * in Example 1. The vector between u * and log T * (T ) is shown as a dashed line. It coincides with the geodesic between T * and T in the starting orthant, but then continues into the ambient space, while the geodesic must bend to remain in the tree space Recalling that each component of v * i and v i is, respectively, the length of an edge in A i and B i then, with some ambiguity in the ordering of the edges of T * , another equivalent way to express log T * is To derive the limiting distribution of sample Fréchet means, the ordering must be kept explicit and independent of T . Hence, we have to use the expression for the log map given by (8), even though it is not as transparent as this one.
Note also that, although the definitions for both π and χ implicitly depend on the ordering we chose for the coordinates of u * , the composition π • χ is independent of that choice, and so the log map is well defined, as long as we chose the same ordering for u * for both π and χ .
The minimal carrier that determines the maps π and χ as well as the vectors v * and v depends on both T * and T , although we have suppressed that dependence in the notation. However, there are only finitely many choices for the carrier number k(T * , T ) and the minimal support when T * is fixed and T varies within a given stratum of T m+2 . In particular, if k(T * , T ) remains constant in a neighbourhood of (T * , T ), then π and χ do not change for small enough changes in T * and T . It follows that there are only finitely many possibilities for the form (6) that π •χ takes when T varies in T m+2 . Here, by form, we mean the algebraic expression of log T * as a map. That is, by 'log T * (T 1 ) and log T * (T 2 ) taking the same form', we mean that they can be obtained using a single algebraic expression for log T * . Since the permutation π returns all the axes to their canonical order, this expression is determined by the partition A of the edges of T * , with the subsets of non-common edges possibly permuted. For example, in the case of T 4 , log T * only takes two possible forms, depending on whether the geodesic from T * to T passes through the cone point or not where the cone point, the origin in R M , represents the tree whose two edges have zero length. The two corresponding subsets of T 4 are, respectively, indicated by the unions of light and dark grey regions in Figure  3 of Barden et al. (2013) when T * is the tree corresponding to (x i , x j ). The different possibilities for the form (6) give rise to a polyhedral subdivision of tree space T m+2 , defined as follows.
Definition 2 For a fixed T * lying in a top-dimensional stratum of T m+2 , the polyhedral subdivision of tree space T m+2 , with respect to T * , is determined by the possible forms that log T * can take: each polyhedron of the subdivision is the closure of the set of trees T that have a particular form for log T * (T ). We shall call each such top-dimensional polyhedron a maximal cell of the polyhedral subdivision and let D T * be the subset of T m+2 consisting of all trees that lie on the boundaries of maximal cells determined by the polyhedral subdivision with respect to T * .
Note that, if the geodesics to T 1 and T 2 from T * pass through the same sequence of strata, then log T * (T 1 ) and log T * (T 2 ) take the same form. However, the converse is not always true. For example, it is possible that T 1 and T 2 lie in different strata, but in the same maximal cell. Hence, the definition of polyhedral subdivision of T m+2 defined here is similar to, but coarser than, the concept of 'vistal polyhedral subdivision' given in section 3 of Miller et al. (2015). This is due to the fact that, while A and B in the minimal support play a symmetric role for the geodesic between T * and T , their roles in the log map log T * are asymmetric. When T varies, as long as the corresponding partition A either is unchanged or, at most, its subsets corresponding to the non-common edges are permuted, the algebraic expression for log T * remains the same.
This polyhedral subdivision varies continuously with respect to T * . If T lies in the interior of a maximal cell of the subdivision and T * , itself in a top-dimensional (open) stratum, varies in a small enough neighbourhood, then the support for T * and T is unique. Then, the derivative of the log map will be well defined.
When T lies on the boundary of a maximal cell of the subdivision, but not on a stratum boundary, the possible supports for T * and T are those determined by the polyhedra to which that boundary belongs. However, all these supports give rise to the same geodesic between T * and T , as they must, since T m+2 is a C AT (0)-space, and among them will be the minimal support that we are assuming for our analysis. Moreover, in this case, there is at least one non-minimal support for T * and T with the property that, for the corresponding v * and v, v Recall that from Definition 1 that the carrier number counts the number of orthants that the geodesic from T * to T meets in a linear segment of positive length. It will become clear later that the set of trees T for which, for a given T * , the carrier number k(T * , T ) is less than its possible maximum m − |A 0 |, where |A 0 | is the number of common edges of T * and T , plays a role that distinguishes the limiting distributions of sample Fréchet means in the tree spaces from those in Euclidean space. Hence, we introduce the following definition.
Definition 3 A point T ∈ T m+2 is called singular, with respect to a tree T * lying in a top-dimensional stratum, if the carrier number k(T * , T ) of T * and T is less than m − |A 0 |. The set of such singular points will be denoted by S T * .
The following result describes the image, under log T * , in the tangent space at T * of the set S T * : although S T * may be rather complex, its image is relatively simple.
Corollary 1 If T * ∈ T m+2 lies in a top-dimensional stratum, then the image, under log T * , of the set S T * of the singular points with respect to T * is contained in the union of the hyperplanes Proof The number of orthants in the minimal carrier of the geodesic from T * to T is less than m − |A 0 | if and only if the dimension j i of some vector v * i is greater than one for i 1. Then, χ maps the line determined by e i in R |A 0 | + × R k into the subspace of R m that is the intersection of the co-dimension one hyperplanes x i u * j = x j u * i in R m , where j 1 + · · · + j i−1 < i = j j 1 + · · · + j i and where the ordering of the coordinates u * i , and hence of the x i , is as in the minimal carrier. Then, applying the permutation π and using the same notation for the permuted x-coordinates, the result follows.
logT*(T) u * = (u1 * , u2 * , u3 * ) x1 x3 x2 Fig. 5 The grey area is part of the hyperplane x 1 · u * 2 = x 2 · u * 1 , which contains some of the singular points for the log map log T * for Example 1 For example, see Fig. 5 for an illustration of one of the hyperplanes for Example 1. To describe the limiting behaviour of sample Fréchet means, it will be more convenient to have a modified version of the log map, T * , at T * defined by In the present context, where T * lies in a top-dimensional stratum, T * (T ) = π •χ(v). Note that, when T * lies in a top-dimensional stratum, the map corresponding to T * here obtained in Barden et al. (2013) in the case of T 4 was expressed as the composition of a similarly defined map on Q 5 , a simpler auxiliary stratified space, with a map from Q 5 to T 4 . Instead of the log map, that map on Q 5 was expressed in terms of the gradient of the squared distance function. The relationship between the latter and the log map shows that the resulting expression in Barden et al. (2013) is equivalent to the one defined here. The derivation of T * from log T * implicitly requires that the tangent space to T m+2 at T * , in which the image of log T * lies, be translated to the parallel copy R m at the origin, in which it makes sense to add the coordinate vector t * . As a result, for all T * in the same stratum as T * , the image of T * will lie in this same subspace R m .

Fréchet means on a top-dimensional stratum
Let μ be a probability measure on T m+2 and assume that the Fréchet function for μ is finite. The space T m+2 being C AT (0) implies that the Fréchet function for μ is strictly convex so that, in particular, the Fréchet mean of μ is unique when it exists. In this section, we consider the case when this mean, denoted by T * , lies in a top-dimensional stratum. For this, as in the previous section, we identify any tree T * in the stratum of T m+2 in which T * lies with the point in the positive orthant of R m having the lengths of the internal edges of T * as coordinates in the canonical order. In particular, T * = (t * 1 , . . . , t * m ). First, we use the log map to give a necessary and sufficient condition for T * to be the Fréchet mean of μ as follows, generalising the characterisation of Fréchet means on complete and connected Riemannian manifolds of non-negative curvature. In particular, it shows that, when T is a random variable on T m+2 with distribution μ and T * is in a top-dimensional stratum, then T * is the Fréchet mean of μ if and only if T * is the Euclidean mean of the Euclidean random variable T * (T ).

Lemma 3 Assume that the Fréchet mean T * of μ lies in a top-dimensional stratum.
Then, T * is characterised by the following condition: Proof It can be checked that, since T * lies in a top-dimensional stratum, the squared distance d(T * , T ) 2 is differentiable at T * and its gradient at T * is −2 log T * (T ). Thus, as discussed in Barden et al. (2013) T * , lying in a top-dimensional stratum, is the Fréchet mean of a given probability measure μ on T m+2 if and only if Then, the required result follows by re-expressing the above condition for T * to be the Fréchet mean of μ in terms of T * given by (9).
The derivation of the central limit theorem for Fréchet means in T m+2 requires the study of the change of T * as T * changes with T remaining fixed. For this we recall that, for a fixed T , the minimal support for the geodesic between T * and T determines a particular maximal cell, in which T lies, of the polyhedral subdivision with respect to T * . When the minimal support for the geodesic between T * and T is the same as that for T * and T , we shall say that the two resulting maximal cells correspond to each other. We have the following result on the derivative of T * with respect to T * , noting that the derivative of the map where, in particular, when l = 1, M † x 1 = 0. (5) prior to Theorem 1 and v i defined analogously for i = 1, . . . , k, where k = k(T * , T ), then the derivative of T * (T ) at T * , with respect to T * , is given by

Lemma 4 Assume that T * ∈ T m+2 lies in a top-dimensional stratum. Then, for any fixed T ∈ T m+2 lying in the interior of a maximal cell of the polyhedral subdivision with respect to T * , T * (T ) is differentiable with respect to T * . Moreover, for such T , if v * i is as defined in
where v i = v i and P T * , T denotes the matrix representing the permutation π defined by (4).
Note that, for the sub-matrix v i M † v * i to be non-zero, v * i must be at least 2-dimensional and, by definition, v i is non-positive so that T must lie in S T * . In particular, if k(T * , T ) = m − |A 0 |, in other words, if the geodesic between T * and T is 'straight', then the derivative of T * (T ) at T * is zero. This could be seen directly: since, in that case, the tree space geodesic between T * and T would be a Euclidean geodesic between them. Then, log T * (T ) = t − t * so that T * (T ) = t independent of t * .
Proof By the discussion preceding the lemma, the edges common to T * and T will make no contribution to the derivative. Since the polyhedral subdivision is continuous with respect to T * , it is sufficient to show that, whenT * is sufficiently close to T * , so that in particular T * andT * lie in the same top stratum and T lies in the interior of the corresponding maximal cells of the polyhedral subdivisions with respect to T * and T * , we have To show (12), it is sufficient to assume that T * and T have no common edge. Moreover, since π T * , T , and so P T * , T , is a linear map, its derivative is identical with itself. Hence, by applying the appropriate permutation to re-order theũ * and u corresponding to T * and T when necessary, it is sufficient to show that Since T lies in the interior of a maximal cell of the polyhedral subdivision of T m+2 with respect to T * , then v where all v i are negative. By continuity, all these strict inequalities hold when v * i is replaced byṽ * i if T * is sufficiently close to T * . Hence, T lies in the interior of a maximal cell of the polyhedral subdivision of T m+2 with respect to T * . Thus, the only difference between the expressions for T * (T ) and T * (T ) is that v * and v * i in the former are replaced byṽ * andṽ * i , respectively, in the latter. It follows that, in this case, the difference The required result follows by applying the first-order Taylor expansion to each subvector component and using the formula preceding the statement of the Lemma.
If T lies on the boundary of a maximal cell of the polyhedral subdivision of T m+2 with respect to T * , each choice of maximal cell of the polyhedral subdivision with respect to T * will determine a support for the geodesic from T * to T . If we restrict the neighbouring T * to move from T * in a direction such that T lies in the corresponding maximal cell of the polyhedral subdivision with respect to T * , then the argument in the proof for Lemma 4 still holds. Thus, T * (T ) will have all directional derivatives, at T * , with respect to T * having similar forms to that given in Lemma 4. However, some different directions will require different choices of maximal cell of the polyhedral subdivision with respect to T * in which T lies. Thus, the directional derivative will have different forms and T * (T ) will not be differentiable.
Lemma 4 enables us to obtain the limiting distribution of the sample Fréchet means of a sequence of iid random variables on T m+2 when the Fréchet mean of the underlying probability measure lies in a top-dimensional stratum as follows, recalling that D T * , defined in Definition 2, is the subset of T m+2 consisting of all trees that lie on the boundaries of maximal cells determined by the polyhedral subdivision with respect to T * . On one hand, the result shows that, in this case, the limiting distribution, being a Gaussian distribution, bears a certain similarity to that of the sample means of Euclidean random variables. On the other hand, recalling that the derivative of T * (T ) at T * is zero if T / ∈ S T * , it also shows that the role played by S T * in the limiting behaviour of the sample Fréchet means is reflected in the covariance structure of the Gaussian distribution, departing from the limiting distribution of the sample means of Euclidean random variables.

Theorem 2 Let μ be a probability measure on T m+2 with finite Fréchet function and with Fréchet mean T * lying in a top-dimensional stratum. Assume that μ(D
1} is a sequence of iid random variables in T m+2 with probability measure μ and denote byT n the sample Fréchet mean of T 1 , . . . , T n . Then, where V is the covariance matrix of the random variable log T * (T 1 ), or equivalently that of T * (T 1 ), and

assuming that this inverse exists, and where M T * (T ) is the m × m matrix defined by (11).
Proof The main argument underlying the proof is similar to that of the proof in Barden et al. (2013) for T 4 , i.e. to express the difference between the Fréchet mean of the underlying probability measure and the sample Fréchet means in terms of the difference T * (T i ) − T * (T i ). However, the proof in Barden et al. (2013) relies on an explicit embedding that is only valid for T 4 . As a consequence of Lemma 4, we can now achieve this for any tree space.
SinceT n is the Fréchet sample mean of T 1 , . . . , T n , then for sufficiently large n,T n will be close to T * a.s. (cf. Ziezold 1977) and, in particular, lie in the same stratum as T * . Thus, the above results (10) and (12) give 1} is a sequence of iid random matrices, the following theorem follows from the standard Euclidean result as in Barden et al. (2013).
Recalling that M T * (T 1 ) = 0 for T 1 not lying in the singularity set of log T * , we see that the contribution to E[M T * (T 1 )] consists of all singular points of log T * . For m = 1, i.e. the case for T 3 , the only possible choice for k is k = 1 = m which implies that M T * (T ) ≡ 0, so that the above result for this special case is the same as that obtained in Hotz et al. (2013). For m = 2, i.e. the case for T 4 , the only possible case for T lying in the singularity set of log T * is when k = 1, which corresponds to the geodesic between T * and T passing through the origin and T * ( so that the above result for this case recovers that in Barden et al. (2013). Note that μ induces, by log T * , a probability distribution μ on the tangent space of T m+2 at T * . Then, the sample Fréchet means of μ are the standard Euclidean means so that the rescaled sample Fréchet means have the limiting distribution N (0, V ). However, the sample Fréchet means of μ are generally different from log T * (T n ), the log images of the sample Fréchet means of μ, and there is no closed expression for the relationship between the two. It is also interesting to compare the result of Theorem 2 with the limiting distributions for the sample Fréchet means on Riemannian manifolds obtained in Kendall and Le (2011). Both limiting distributions take a similar form, with the role played by curvature in the case of manifolds being replaced here by the global topological structure of the tree space.

Fréchet means on a stratum of co-dimension one
A stratum O( ) of co-dimension one corresponding to the set of mutually compatible edge-types arises as a boundary face of a top-dimensional stratum when one, and only one, internal edge of the latter is given length zero so that its two vertices are coalesced to form a new vertex of valency four. The four incident edges determine disjoint subsets A, B, C, X of leaves and root, where X contains the root. Then, an additional internal edge may be introduced to , namely α, β or γ that correspond, respectively, to the sets of leaves A ∪ B, A ∪ C or B ∪ C. This gives top-dimensional strata O( ∪ α), O( ∪ β) or O( ∪ γ ), all of whose boundaries contain the stratum O( ). Moreover, these are the only such top-dimensional strata. For example, in If A > B > C is the canonical order of the sets of leaves, then α < β < γ is the induced order of the edges and corresponding semi-axes and, if we write the coordinates of a tree T * in O( ) as (t * 2 , . . . , t * m ), we can write the coordinates of trees in the neighbouring orthants as (t * α , t * β , t * γ , t * 2 , . . . , t * m ) where precisely two of t * α , t * β and t * γ are zero, since the remaining m − 1 edge-types are common to all the trees involved in these three orthants and their common boundary component. Note however that, although the coordinates (t * α , t * β , t * γ ) and (t * 2 , . . . , t * m ) can be chosen in canonical order, the resulting sequence (t * α , t * β , t * γ , t * 2 , . . . , t * m ) will not in general be in canonical order.
It is clear now that the tree space T m+2 is not locally a manifold at any tree in the strata of co-dimension one. However, the stratification enables us to define, at a tree in a stratum of positive co-dimension, its tangent cone (cf. Bridson and Haefliger 1999) to consist of all initial tangent vectors of smooth curves starting from that tree. Then, the tangent cone to T m+2 at a tree in a stratum of co-dimension one is an open book (cf. Hotz et al. 2013) with three pages extending each of the three strata and with the stratum of co-dimension one in which the tree lies being extended to form its spine.
The definition of the log map (1) applies equally to a tree T * in a stratum σ of co-dimension one: if the geodesic from T * to T passes through one of the three strata whose boundary includes σ , the unit vector component of log T * (T ) is taken in the same direction in the page of the tangent book that corresponds to that stratum. The scalar component of the log map is still the distance between the trees. Similarly, the definition (9) for T * remains valid in this case.
From now on, we assume that T * lies in a stratum O( ) of co-dimension one. Although the squared distance d(T * , T ) 2 is no longer differentiable at T * , it has directional derivatives along all possible directions. Hence, the condition for T * to be the Fréchet mean of a probability measure μ on T m+2 , i.e. the condition for T * to satisfy becomes that the Fréchet function for μ has, at T * , non-negative directional derivatives along all possible directions. To investigate the latter condition, we label the three strata joined at the stratum O( ), of co-dimension one, in which T * lies as the α-, βand γstrata and denote by log α T * , log β T * and log γ T * , respectively, the modifications of the map log T * that agree with log T * on the domains for which the image lies in the pages of the tangent book tangent to the α-, βand γ -strata, respectively, and are zero elsewhere. That is, for example, if T is such that log T * (T ) lies in the page of the tangent book tangent to the α-orthant 0 otherwise.
Write e α , e β and e γ for the outward unit vectors in the tangent book at T * lying in the page tangent to the α-, βand γ -strata, respectively, and orthogonal to its spine, and define We also define log s T * to be the modification of log T * with respect to the spine of the tangent book, the tangent space to O( ), analogous to the above log i T * . Then, we have the following characterisation of T * in a stratum of co-dimension one to be the Fréchet mean of μ, in terms of the derivatives of the Fréchet function along the three directions orthogonal to the tangent space to O( ), as well as the Euclidean mean of log s T * (T ), where T is a random variable on T m+2 with distribution μ.

Lemma 5 With the notation and definition above, a given tree T * in a stratum O( ) of co-dimension one is the Fréchet mean of a given probability measure μ on T m+2 if and only if
and T m+2 Proof Recall that since T * ∈ O( ), the condition for T * to be the Fréchet mean of a probability measure μ on T m+2 is that the Fréchet function for μ has, at T * , non-negative directional derivatives along all possible directions. For any vector w at T * which is tangent to O( ), the non-negativity of the directional derivative along w can be expressed as T m+2 log s T * (T ), w dμ(T ) 0. Since −w also tangent to O( ) at T * , this inequality must be an equality for all such w, which gives (15). Hence, by linearity, the non-negativity of directional derivatives, of the Fréchet function for μ, at T * along all possible directions may be characterised by requiring the non-negativity of the directional derivatives along the e α , e β and e γ directions, together with (15). However, analogously to the deduction in Barden et al. (2013), it can be checked that the requirement for the directional derivative along each of the e α , e β and e γ directions to be non-negative is, respectively, equivalent to each of the inequalities (14).
To see the relation between the inequalities (14) and the asymptotic behaviour of sample Fréchet means, we will use a folding map F α (cf. Hotz et al. 2013) that operates on the tangent book at T * . The map F α folds the two pages that are tangent to the βand γ -strata onto each other, so that they form the complement in R m of the closure of the page tangent to the α-stratum. Define F β and F γ similarly. Then, F α • log T * maps T m+2 to R m and, in fact, is the limit of log T * when T * tends to T * from the α-stratum. In addition, we modify the definition (7) of χ T * , T (e i ) to be π −1 T * , T (e α ) when, and only when, the v * i in (7) contains t * α and is 1-dimensional. With this modification and by noting that the argument leading to Lemma 2, as well as its result, still hold when T * lies in a stratum of co-dimension one, the results of Theorem 1 and Lemma 4 can be extended to obtain the expression for F α • log T * and its derivative, and the analogues with β or γ replacing α, when the necessary care is taken of which stratum is to contain the initial geodesic. Moreover, These observations lead to the following lemma which extends the results obtained in Hotz et al. (2013) for open books and in Barden et al. (2013) for T 4 and relates the Fréchet means of large samples avoiding a stratum to the strict-positivity of the derivative of the Fréchet function along the corresponding orthogonal direction to the tangent space to O( ).
Lemma 6 Let T * be the Fréchet mean of a given probability measure μ on T m+2 , and lie in a stratum O( ) of co-dimension one. Assume that μ(D T * ) = 0, where D T * is defined in Definition 2, and that, at T * , I α < I β + I γ . If {T i : i 1} is a sequence of iid random variables in T m+2 with probability measure μ then, for all sufficiently random large n, the sample Fréchet meanT n of T 1 , . . . , T n cannot lie in the α-stratum.
Proof SinceT n converges to T * a.s. as n tends to infinity (cf. Ziezold 1977) we only need to show that, for all sufficiently large n,T n cannot lie in the neighbourhood of T * , restricted to the α-stratum.
Consider the probability measure μ α induced from μ by F α •log T * on the Euclidean space. Then, under the given conditions, it follows from (16) that the Euclidean mean of μ α lies on the open half of the Euclidean space complement to the page tangent to the α-stratum (cf. also Hotz et al. (2013)). Thus, for all sufficiently large n, the Euclidean mean of the induced random variables F α • log T * (T 1 ), . . . , F α • log T * (T n ), does not lie in the closed half of this Euclidean space where the page tangent to the α-stratum lies. This implies that, for all sufficiently large n, If it were possible that, for arbitrarily large n,T n lies in the α-stratum, we could obtain a contradiction. Firstly, noting the observations prior to the lemma and following the arguments of the proof for Lemma 4, for all sufficiently large n, we have where M T * (T ) is given by (11) and F α • T * = F α • log T * +T * . However, on the one hand, since 1 n n i=1 T n (T i ) =T n and sinceT n lies in the α-stratum, T n , e α > 0, so that While, on the other hand, it follows from T * , e α = 0 and from (17) that It can also be checked that where v α i = v i,s , if t α corresponds to a coordinate of v * i,s and if the dimension of v * i,s is greater than one, and v α i = 0 otherwise. Then, since v α i 0, for each i Equations (20) and (21) together imply that, for all sufficiently large n, the e α -component of the right hand side of (18) is negative, which contradicts (19).
With the result of Lemma 6, we now have the limiting distribution of the sample Fréchet means on T m+2 given by the next theorem, which is the generalisation of the result for T 4 given in Theorem 2 in Barden et al. (2013). In particular, it shows that the limiting distribution can take any of four possible forms, all related to a Gaussian distribution, depending on the number of the strictly positive derivatives of the Fréchet function along the three directions orthogonal to the tangent space to O( ). For clarity, we have assumed in the following that the coordinates (t i , t 2 , . . . , t m ), i = α, β, γ , discussed at the beginning of the section are all in the canonical order, so that they give the coordinates for trees in each of the three strata. Otherwise, a further permutation of the coordinates, which we have suppressed, will be necessary to bring them into canonical order and so to validate the result.
Theorem 3 Let T * in a stratum O( ) of co-dimension one be the Fréchet mean of a given probability measure μ on T m+2 . Assume that μ(D T * ) = 0, where D T * is defined in Definition 2. Let further {T i : i 1} be a sequence of iid random variables in T m+2 with probability measure μ and writeT n for the sample Fréchet mean of T 1 , . . . , T n .
(a) If all three inequalities in (14) are strict then, for all sufficiently large n,T n will lie in the stratum O( ) and the sequence √ n{(t n 2 , . . . ,t n m ) − (t * 2 , . . . , t * m )} of the coordinates of √ n{T n − T * } on the spine will converge in distribution to N (0, A s V s A s ) as n → ∞, where V s is the covariance matrix of the random variable log s T * (T 1 ), A s = P s AP s , P s is the projection matrix to the subspace of R m with the first coordinate removed and A is as given in (13). (14) is an equality and the other two are strict then, for all sufficiently large n,T n will lie in the α-stratum and

(b) If the first inequality in
and A is as in (13) with t * 1 = 0. (c) If the first two inequalities in (14) are equalities and the third is strict then, for all sufficiently large n,T n will lie either in the α-stratum or in the β-stratum and the limiting distribution of √ n{T n − T * }, as n → ∞, will take the same form as that of (η 1 , . . . , η m ) above, where the coordinates ofT n are taken as (t n α ,t n 2 , . . . ,t n m ), respectively (−t n β ,t n 2 , . . . ,t n m ), ifT n is in the α-stratum, respectively the β-stratum. (d) If all the equalities in (14) are actually equalities, then we have the same result as in (a).
Proof (a) By Lemma 6, when n is sufficiently large,T n must lie in the stratum O( ) of co-dimension one so that it has zero first coordinate, i.e.T n = (0,t n 2 , . . . ,t n m ). Noting that F α • log sT n = log sT n , the result (15) of Lemma 5 shows thatt n i , i = 2, . . . , m, are the respective coordinates of 1 n n i=1 F α • T n (T i ), the sample Euclidean mean of F α • T n (T 1 ), . . . , F α • T n (T n ). Then, a modification of the proof of Theorem 2 to restrict it to the relevant coordinates of {F α • T n (T i ) : i 1} gives the required We deduce from the assumed strict inequalities, from (15) and (16) and from Lemma 6 that T * is the Euclidean mean of F α • T * (T 1 ) and that, when n is sufficiently large,T n can only lie in the closure of the α-stratum, so that it has coordinatesT n = (t α n ,t n 2 , · · ·t n m ). WriteF Then,F α • T n (T ) lies in R m and, by (15),t n j , j = 2, . . . , m, are the respective coordinates of 1 n n i=1F α • T n (T i ). To see relationship between 1 n n i=1F α • T n (T i ) andt n α , we note that, ift n α > 0, where the first equality follows from the definition ofF α • T n (T ) and the second follows from Lemma 3 asT n lies in a top-dimensional stratum. Hence, On the other hand, ift α n = 0, thenT n lies in O( ) and Applying Lemma 5 and (16) to the empirical distribution centred on T 1 , . . . , T n with equal weights 1/n, we also have Thus,t n α = max 0, Now, similarly to the proofs of Theorem 2 and Lemma 6, the observations prior to Lemma 6 imply that where M T * (T ) is given by (11). Since the first coordinate of T * is zero, so too are the entries, except for the diagonal one, in the first row and column of M T * (T ) and so also are the corresponding entries in the matrix A. Moreover, noting the comments following Lemma 4 and the definition of M † prior to that lemma, we see that the first diagonal entry of M T * (T ) is always non-positive. Thus, the first diagonal entry of A must be positive, so that this is also the case for {I − 1 n n i=1 M T * (T i )} −1 , when n is sufficiently large.
Thus, whent n α > 0, it follows from (23) and (24) that In particular, for all sufficiently large n, the first coordinate of the random vector given by the first term on the right is positive. Whent n α = 0, the above approximation still holds except for the first coordinate. In that case, (T n − T * )M T * (T i ), e α = 0, following from the form of M T * (T ) noted above, and by (24), for sufficiently large n, up to higher order terms, which is equivalent to , e α 0 up to higher order terms. Hence, for sufficiently large n, we have so that the required result follows from a similar argument to that of the proof for Theorem 2.
(c) In this case, it follows from Lemma 5 that T * is the Euclidean mean both of F α • T * (T 1 ) and of F β • T * (T 1 ). Moreover, the integral I γ becomes zero and so, since the integrand is non-negative, the support of the measure on the tangent book at T * induced by μ is contained in the union of the leaves tangent to the αand β-strata together with the spine.
(d) Noting that all integrands in (14) are non-negative, the three equalities will together imply that log T * (T 1 ) = log s T * (T 1 ) a.s., so that for i = α, β, γ On the other hand, if it were possible that, for arbitrarily large n,T n lies in one of the α-βor γ -strata, say the α-stratum, then T n − T * , e α > 0. On the other hand, sinceT and since, as noted in ( This contradiction implies that, for all sufficiently large n,T n must lie in the stratum O( ) of co-dimension one. Thus, the argument for (a) implies that, when the inequalities in (14) are all equalities, the central limit theorem for the sample Fréchet means takes the same form as that when the three inequalities are all strict.
Similar to the note at the end of the previous section, one can also consider the distribution μ , induced by log T * from μ on the tangent book of T m+2 at T * . Then, one can apply the result of Hotz et al. (2013) to obtain the limiting distribution of the sample Fréchet means of μ . Again, although the limiting distribution obtained in this way retains the local topological feature of the space, the influence of the global topological structure is lost. More importantly, since there is no clear relationship between the sample Fréchet means of μ and μ , the limiting distribution for the former cannot be easily deduced from that for the latter.

Strata of higher co-dimension
The structure of tree space in the neighbourhood of a stratum of higher co-dimension is basically similar to, but in detail rather more complex than, that of a stratum of co-dimension one. For example, a stratum σ of co-dimension l, where 2 l m, corresponds to a set of m − l mutually compatible edge-types. It arises as a boundary (m − l)-dimensional face of a stratum τ of co-dimension l , where 0 l < l and when the internal edges of the trees in σ are a particular subset of m − l of the internal edges of the trees in τ . For this situation, we say that σ bounds τ and τ co-bounds σ .
Recall from the previous section that the tangent cone to T m+2 at a tree T in σ consists of all initial tangent vectors to smooth curves starting from T , the smoothness only being one-sided at T . For simplicity assume, without loss of generality, that under the isometric embedding of T m+2 in R M all trees in σ have zero for their first l coordinates. Then, the tangent cone at T has a stratification analogous to that of T m+2 itself in the neighbourhood of T : for each stratum τ of co-dimension l that co-bounds σ in T m+2 there is a stratum (R l−l τ ) + × R m−l in the tangent cone at T , which may be identified with a subset of the full tangent space of R M at T , where R m−l is the (full) tangent subspace to σ at T and (R l−l τ ) + is the orthant determined by the edge-types that have positive length in τ but zero length in σ . For example, the cone point in T 4 is a stratum of co-dimension two. Its tangent cone can be identified with T 4 itself. This rather involved structure of the tangent cone results in a much more complicated description of the log map and, consequently, of its behaviour. Nevertheless, with the above conventions, it is possible to generalise our expression for the log map to this wider context and hence to obtain analogues of Theorem 1 as well as Lemma 4. These results can then be used to describe, in a fashion similar to those of Lemmas 5 and 6, certain limiting behaviour of sample Fréchet means when their limit lies in a stratum of higher co-dimension. For example, the limiting behaviour of sample Fréchet means in T 4 when the true Fréchet mean lies at the cone point has been studied in Barden et al. (2013). The picture given there is incomplete and, although those results can be further refined and improved, it is clear that a complete description of the limiting behaviour of sample Fréchet means in the wider context is still a challenge and the global topological structure of the space will play a crucial role.