The command centres the log measurements and performs principal component analysis of their covariance matrix. With cor=F, it does not first standardize the variables to variance one. For a unit principal component loading vector , the score has sample variance . By the spectral theorem for real symmetric matrices, expand in an orthonormal eigenbasis; that variance is a weighted average of the eigenvalues. Its maximum is the largest eigenvalue, reached at the corresponding eigenvector. Repeating subject to orthogonality to previous directions gives the other principal components.
The software uses the divisor- sample covariance matrix for its component standard deviations, whereas var used divisor . Diagonalizing the displayed matrix gives approximately
Taking square roots of the latter gives , agreeing with the output to the rounding of the displayed sample covariance matrix. The normalization changes these numerical standard deviations but leaves the eigenvectors and proportions of explained variance of a principal component unchanged.
The first principal component explains about of the total log-variable variance, the second another , and the last about . Keeping two preserves about . An original scree plot displays the sharp drop after the first component:
Figure 1.
Principal-component variances and cumulative explained variance for the log-tree measurements
. Details.
Consequently the centered cloud is very elongated along one direction: a one-dimensional approximation represents almost all of its squared variation. From the displayed covariance matrix, a unit first eigenvector, with its arbitrary sign chosen positive, is approximately
Its principal component score is therefore . All coefficients have the same sign, so this direction describes overall tree size, with log volume dominating the unstandardized variation. The summary alone supplies proportions, not the loading directions; the displayed sample covariance matrix supplies the latter. This is a geometric approximation, not evidence of an exact deterministic relation or independent original variables.
One further use is principal component analysis on a correlation matrix, obtained with cor=T, which equalizes marginal variances and answers a different scaling-sensitive question. Another is principal component regression: fit a response to selected principal component scores rather than highly correlated original predictors, choosing the number using prediction assessment. The fitted transformation also projects new measurements into the same low-dimensional coordinates, provided the training centering and scaling are retained.
Take logarithms entry by entry before centering. For tree , let , and put . The command var(log(b)) computes the sample covariance matrix with the unbiased estimator normalization
Thus entry is the sum of products of the centered log measurements divided by , not the logarithm of the covariance between the original measurements. Its diagonal entries are the three log-variable sample variances, and the off-diagonal entries are their sample covariances. The positive off-diagonal entries indicate positive association of the log measurements. Taking logarithms turns a multiplicative relation such as into the approximately linear relation , which motivates investigating principal components of these transformed observations.
The output describes complete-linkage clustering: the distance between two current groups is the largest original Jaccard distance between a member of one and a member of the other. Starting with singleton groups, agglomerative hierarchical clustering merges a closest pair at each step. In the merge array, a negative index denotes the original row of that number, and a positive index denotes the group created at that earlier merge. A printed height is the dissimilarity at which the new group forms.
Reading those references recursively gives the following dendrogram construction, with exact heights recovered from the binary profiles:
  • Fred and Gbenga join at ; Graham and Tim join at ; Chad and Nicolas join at .
  • Frederic joins Chad–Nicolas at , and John then joins that group at the same height . These tied heights produce successive branches on the same horizontal level.
  • Philip and Mark join at ; Garfield joins Fred–Gbenga at .
  • Graham–Tim joins Philip–Mark at ; Chad–Nicolas–Frederic–John joins Garfield–Fred–Gbenga at .
  • Sauli joins Graham–Tim–Philip–Mark at , and Juliet joins that group at .
  • The two remaining groups join at .
Figure 1.
Complete-linkage dendrogram reconstructed from exact binary-profile distances
. Details.
For example, a cut strictly between and gives four groups: Chad–Nicolas–Frederic–John–Garfield–Fred–Gbenga, Graham–Tim–Philip–Mark, Sauli, and Juliet. A cut strictly between and gives two larger groups. The leaf order is not intrinsic; the merge memberships and heights are. Reflecting branches leaves the dendrogram unchanged in meaning. The zero-height pair indicates identical recorded responses, while high joins indicate comparatively dissimilar profiles. These conclusions depend on the choice of Jaccard distance, which ignores shared negative answers; the dendrogram itself does not establish substantive demographic classes.
Treat each row as a set of attributes with response one. The binary option computes the Jaccard distance, rather than counting matches at joint absences. For a pair of rows, let count coordinates equal to one in both, count , count , and count . Then
The denominator counts coordinates present in at least one row; joint absences do not contribute. If both rows have no presences, use distance zero. This differs from normalized Hamming distance, which would divide by all ten coordinates.
For Philip and Chad, four attributes are present in both and eight in at least one, giving Jaccard distance . Graham and Tim differ in one of eight coordinates present in their union, giving , printed as . Fred and Gbenga have identical profiles, hence distance zero despite being different students. The resulting dissimilarity matrix is symmetric with zero diagonal; dist2full restores the other half and the diagonal from the stored pairwise entries. The display rounds entries for readability; the agglomerative hierarchical clustering uses the original unrounded distances.
Under the unrestricted model, insert the maximum-likelihood estimates . Under the diagonal-covariance restriction, the quadratic form is minimized over the mean at , and the remaining objective separates over the diagonal entries:
Differentiating in gives ; the derivative changes from negative to positive there. Put . The fitted trace term is under either model, since . Consequently the likelihood-ratio test statistic is determined by
This is the Gaussian diagonal-covariance likelihood-ratio test. Reject for sufficiently small , equivalently for large . Under the regular large-sample calibration, Wilks theorem gives , since diagonality removes that many free covariance parameters. The exact critical constant can instead be obtained from the null distribution at the actual sample size.
For , write the sample correlation coefficient as . Then , so the likelihood-ratio test rejects for large , not merely for large positive . Under the null, the two variables have a bivariate normal distribution and are independent, and the exact test is
Indeed, condition on the centered first-variable observation vector. Decompose the second centered Gaussian vector into its component along that direction and the -dimensional orthogonal complement. Their squared lengths give independent and variables. Their ratio shows that has Student's t-distribution with statistical degrees of freedom.
With the divisor- sample covariance matrix defined above, the maximum-likelihood estimators are
Their joint sampling distribution is specified by
Here uses the Wishart distribution convention . Thus the covariance maximum-likelihood estimator has expected value ; the unbiased estimator of the covariance matrix is . These distributions follow from orthogonal projections of the jointly multivariate normal observations onto the constant-observation direction and its orthogonal complement, though no proof is required here. The covariance maximum in the positive-definite parameter space requires nonsingular, which holds almost surely when and is positive definite. Otherwise the rank of a centered sample covariance matrix shows why the usual unrestricted finite maximum does not exist.
Use the divisor- sample covariance matrix, since this is the normalization that enters the multivariate normal likelihood function:
For a covariance matrix that is a positive-definite matrix , the product of the multivariate normal densities gives
To separate the sample mean from the sample covariance matrix, expand . The cross terms sum to zero because . Also by the trace identity. Therefore
The printed expression suppresses the parameter-independent constant ; dropping this constant has no effect on maximum likelihood estimation or the likelihood-ratio test.
A curved exponential family restricts a higher-dimensional full canonical family to a lower-dimensional smooth parameter surface:
The derivative matrix has rank . A genuinely curved surface is not merely an affine subfamily under a choice of natural coordinates. With iid observations the ambient sufficient statistic is , and the parameter score and information are
The second-derivative terms from have zero expectation because the centered sufficient statistic has mean zero. Under regularity, the constrained MLE is still first-order asymptotically normal with this information. Curvature affects higher-order bias, likelihood geometry and efficiency; concavity of the ambient likelihood need not survive along the nonlinear parameter surface.
For example, with has and natural parameters , , constrained by . It has one free parameter but generally still needs both and as sufficient statistics. To see why, a likelihood ratio between two samples is constant in only if their statistic differences satisfy for all positive , forcing both differences to zero. Lower parameter dimension therefore does not generally reduce the minimal sufficient statistic to that dimension.
Several finite-sample counterparts of the influence function should be distinguished. The empirical influence function substitutes the empirical distribution: . For a smooth M-estimator it is
It requires a well-defined derivative and nonsingular denominator. An unsmoothed empirical quantile functional, for example, need not admit the population-style density derivative.
The actual one-observation sensitivity curve is a finite difference:
It records contamination of size rather than an infinitesimal perturbation. For a smooth functional it approaches the population influence curve as the sample grows. A deletion counterpart uses , giving
The jackknife resampling pseudovalue is therefore approximately . The jackknife variance estimate corresponds asymptotically to for centered empirical influences.
In linear regression, Cook's distance measures the fitted-value effect of deleting a case. For coefficients, residual , leverage and variance estimate , its usual expression is . It illustrates that a case can be influential through both a large residual and high leverage. Finite perturbations and nonlinear refitting can differ materially from a first-order influence approximation; these diagnostics should not be conflated.
A one-sample U-statistic of fixed degree has a symmetric U-statistic kernel and averages it over all distinct subsets of an iid sample:
It is unbiased for . With finite second moment, define the first Hoeffding projection . Orthogonality of the higher projections gives
If , the central limit theorem therefore proves the U-statistic central limit theorem
Equivalently the influence function of a U-statistic is , obtained by differentiating its population functional in each distribution argument. If , the root- limit degenerates and the second or higher projection determines a different, often nonnormal, limit.
For example, gives the unbiased sample variance with denominator . Its first projection is , so the influence function is . When the fourth moment is finite, the leading variance of the sample variance is . This example connects unbiased symmetric estimation to the functional influence calculation.
Partition a regular parameter into interest and nuisance . Parameter orthogonality means the cross-block of the expected Fisher information matrix vanishes:
It is expected-information orthogonality, not a demand that every observed cross derivative be zero. To first order, the asymptotic normal distribution of the joint maximum-likelihood estimator has independent interest and nuisance blocks. Its efficient interest information simplifies from the Schur complement to .
For scalar interest, new nuisance coordinates can locally be chosen by the local orthogonal nuisance reparametrization
Indeed the new interest score is , and its expected product with the transformed nuisance score is zero by this equation. Smoothness, nonsingular nuisance information and suitable initial coordinates provide the local ordinary-differential-equation construction. Simultaneous orthogonalization for several interest coordinates may face integrability constraints.
For normal location and variance , the cross information is zero: the location score is proportional to the centered observation and the variance score to its squared value minus its expectation, whose product has zero expectation by normal symmetry. This is a useful orthogonal parameterization. In general orthogonality reduces nuisance sensitivity and motivates adjusted profile constructions, but it implies neither exact estimator independence nor an exact nuisance-free conditional likelihood.
In a transformation model, a group acts on data and parameters compatibly: implies . A statistic is invariant if , and is a maximal invariant if equality of its values also implies the samples lie on the same group orbit. A maximal invariant records all information unchanged by the transformations; measurable invariant procedures therefore factor through it, subject to the ordinary orbit-space measurability conditions.
An equivariant estimator satisfies for the induced action on the quantity estimated. For the positive affine location-scale group, with , this means and .
For a nonconstant ordered sample, take and . Then
is a maximal invariant: it is unchanged by the positive affine group, and if then , explicitly recovering the transformation. Both mean and standard deviation are equivariant. If the whole model varies only by location and positive scale, the normalized sample's distribution is independent of those two parameters, giving an ancillary statistic. It may still retain information about additional shape parameters.
Equivariance yields a coherent transformation rule and, under an invariant loss, can simplify risk comparison to a reference parameter. It does not on its own establish optimality. Normalization by a parameter-space estimator with a nontrivial stabilizer requires quotienting that remaining action; otherwise an apparently standardized statistic need not be maximal.
The Laplace approximation evaluates an integral dominated by an interior maximum. Suppose has a unique interior maximizer , negative-definite Hessian there, and sufficient smoothness and tail control. Put . Taylor expansion under gives a Gaussian leading integrand and
The leading factor follows from the multivariate Gaussian integral. Odd cubic terms integrate to zero over the limiting symmetric domain; fourth-order terms and squared cubic terms contribute to the first correction, assuming enough derivatives. If , a different leading term may be needed.
For a likelihood integral with prior density , a common version is , because observed information is of order . This is useful for posterior normalization, marginal likelihood and approximating integrated nuisance effects. A prior or integration measure is part of that construction; integrating nuisance parameters is different from merely profiling them. Boundary maxima, degenerate curvature, multiple modes or uncontrolled tails invalidate the simple one-mode formula.
For parameter of interest and nuisance parameter , the profile likelihood has log form , where is the constrained nuisance maximum. Profiling optimizes over the nuisance dimension but does not account for its local volume or conditioning geometry. The modified profile likelihood corrects this loss.
Use ancillary sample coordinates , and let be the nuisance block of observed information. Holding fixed, put . The Barndorff-Nielsen modified profile likelihood is, up to data-only factors,
This combines a nuisance-information determinant and a data-coordinate Jacobian determinant. Implicit differentiation of gives , so equivalently
The semicolon denotes differentiation in the varying sample coordinate, rather than a parameter derivative. This form also explains the positive adjustment in Question 2: in that canonical conditional problem the mixed sample derivative is data-only, leaving the positive half-log curvature. The adjustment sign cannot be copied between unrelated constructions without tracking their Jacobians.
In an appropriate orthogonal nuisance formulation, the Cox-Reid adjusted profile likelihood uses . It is a useful simpler adjustment, but discarding is not universally legitimate. For normal data with interest and nuisance , the constrained and full nuisance fits both equal , so and . Thus
recovering the residual degrees of freedom and fitted variance . These adjustments target nuisance-related bias and higher-order likelihood inference; they are approximations to conditional or marginal constructions, not an assertion that profiling has become an exact full sampling density.
A Bartlett correction improves calibration of a regular likelihood-ratio test statistic , whose null limit is for tested restrictions. If
the corrected statistic is . Its null mean is and it is compared with the same limiting chi-squared distribution. The coefficient is model-specific, may involve nuisance parameters, and can be calculated from likelihood cumulants or a suitable null simulation; substitution must respect the asymptotic regime.
Under the regular higher-order likelihood expansions and identities that establish Bartlett correctability, this rescaling removes the leading distributional error and can give chi-square calibration error. Matching one moment by itself does not prove that assertion for an arbitrary statistic, and nonregular boundary or singular models need different treatment.
For illustration, testing a normal variance with unknown mean gives with . The gamma logarithmic moment yields
Thus the Bartlett correction for a normal variance with unknown mean uses , not the correction for the different known-mean model. This example also distinguishes the relative coefficient from the full divisor .
For the Wilcoxon signed-rank test, assume independent observations from a continuous distribution symmetric about the specified . Form , rank the absolute differences , and add the ranks of positive differences:
Under the continuous null there are no zeros or tied absolute values with positive probability. Symmetry makes the signs independent fair signs conditional on the magnitudes, so the exact null distribution is that of for independent . In particular
The coefficients of this polynomial give exact tail probabilities, or they can be computed by recursively adding a rank with probability one half. A two-sided test rejects for unusually small , equivalently for extreme on either side of its center. Choose symmetric tail cutoffs with total null probability at most ; discrete boundary randomization can attain size exactly . An exact conservative two-sided p-value is . For a positive-location alternative use the upper tail, and for a negative-location alternative use the lower tail.
For large samples, centering and scaling by the displayed mean and standard deviation gives an asymptotic standard normal statistic. This follows from the independent weighted Bernoulli representation, because the largest squared weight is negligible relative to the sum of squared weights. A continuity correction improves the normal tail approximation. With observed zero differences, omit them in the usual convention; tied absolute differences receive average ranks, and the conditional null variance is then one quarter of the sum of squared assigned ranks, not automatically the no-tie formula.
Symmetry is essential: having median alone need not make the signs independent of the magnitudes, and so does not justify these exact critical values. The test is particularly useful for location shifts in symmetric families. It is a valid test of the stated symmetry null, but is not an omnibus procedure guaranteed to detect every asymmetric alternative.
For , the probability integral transform makes iid uniform on . Continuity of is enough; strict increase is unnecessary. Their extreme order statistics have joint density
choose the observations giving the two extremes and put the remaining between them. Transform to and integrate from zero to . The uniformized sample range therefore has
Equivalently . For , the range is identically zero instead.
The exact failure probability is
Thus the exact integer sample size is the least making this quantity at most . For with , it tends to . This function decreases strictly from one to zero on positive , because its derivative is . For there is therefore exactly one positive solution of
This gives the extreme-order-statistic tolerance interval sample-size rule
When is small, , so a useful first refinement is . This is an approximation, not an exact integer guarantee; use the preceding exact failure probability to check rounding and very stringent tail requirements. The interval here encloses population content, rather than estimating a fixed distribution parameter.

Pinned article: Introduction to the OurBigBook Project

Welcome to the OurBigBook Project! Our goal is to create the perfect publishing platform for STEM subjects, and get university-level students to write the best free STEM tutorials ever.
Everyone is welcome to create an account and play with the site: ourbigbook.com/go/register. We belive that students themselves can write amazing tutorials, but teachers are welcome too. You can write about anything you want, it doesn't have to be STEM or even educational. Silly test content is very welcome and you won't be penalized in any way. Just keep it legal!
We have two killer features:
  1. topics: topics group articles by different users with the same title, e.g. here is the topic for the "Fundamental Theorem of Calculus" ourbigbook.com/go/topic/fundamental-theorem-of-calculus
    Articles of different users are sorted by upvote within each article page. This feature is a bit like:
    • a Wikipedia where each user can have their own version of each article
    • a Q&A website like Stack Overflow, where multiple people can give their views on a given topic, and the best ones are sorted by upvote. Except you don't need to wait for someone to ask first, and any topic goes, no matter how narrow or broad
    This feature makes it possible for readers to find better explanations of any topic created by other writers. And it allows writers to create an explanation in a place that readers might actually find it.
    Figure 1.
    Screenshot of the "Derivative" topic page
    . View it live at: ourbigbook.com/go/topic/derivative
  2. local editing: you can store all your personal knowledge base content locally in a plaintext markup format that can be edited locally and published either:
    This way you can be sure that even if OurBigBook.com were to go down one day (which we have no plans to do as it is quite cheap to host!), your content will still be perfectly readable as a static site.
    Figure 5. . You can also edit articles on the Web editor without installing anything locally.
    Video 3.
    Edit locally and publish demo
    . Source. This shows editing OurBigBook Markup and publishing it using the Visual Studio Code extension.
  3. https://raw.githubusercontent.com/ourbigbook/ourbigbook-media/master/feature/x/hilbert-space-arrow.png
  4. Infinitely deep tables of contents:
    Figure 6.
    Dynamic article tree with infinitely deep table of contents
    .
    Descendant pages can also show up as toplevel e.g.: ourbigbook.com/cirosantilli/chordate-subclade
All our software is open source and hosted at: github.com/ourbigbook/ourbigbook
Further documentation can be found at: docs.ourbigbook.com
Feel free to reach our to us for any help or suggestions: docs.ourbigbook.com/#contact