André-Louis Cholesky developed his calculation in the setting of geodetic adjustment: measured angles and lengths must satisfy geometric relations, while corrections should be small. The manuscript reproduced in Claude Brezinski's study is titled Sur la résolution numérique des systèmes d’équations linéaires and ends with the date 2 December 1910 at Vincennes. The manuscript reports a 56-equation calculation adjusting altitudes in an Algerian triangulation network. Its date establishes when this written account existed, rather than an exact invention date.[ref]
A related algebraic reason for the method's usefulness is that normal equations involve a Gram matrix. If a real matrix has linearly independent columns, then
so is a positive-definite matrix. That gives the structure needed by a Cholesky decomposition. The historical adjustment problem instead produces from independent constraint rows; the same argument applies to its transpose. In numerical least squares, explicitly forming normal equations squares the condition number of a full-column-rank design matrix; a QR decomposition can therefore be preferable for accuracy. Indeed, the extreme singular values give . The factorization remains useful when a positive-definite matrix is already the natural input.
Minimizing gives the displayed equations by differentiation. Equivalently, the regression residual satisfies : it is orthogonal to every column of the design matrix. If has full column rank, the minimizer is unique and the fitted values are the orthogonal projection of onto its column space. A rank-deficient design matrix can give multiple coefficient vectors, while the projected fitted vector is still unique.
For an intercept and one predictor, put and . The equations give and , provided . In the five-point example in linear regression, , , and , giving and .
The normal equations describe the mathematical optimum, but explicitly forming and inverting can amplify numerical problems. A QR decomposition computes the same least-squares solution through orthogonal coordinates; a singular value decomposition also exposes nearly dependent columns. This connects statistical fitting to numerical linear algebra and the choice of a stable algorithm. [ref]
On a symmetric interval with an even positive weight, the best least-squares polynomial approximation to an odd function is odd, and the approximation to an even function is even. Indeed, the even and odd polynomial subspaces are orthogonal. For odd , write a candidate as . Then
Deleting a nonzero even component strictly reduces the error, so the minimizer has . The same argument exchanges the parities for even . This reduces the normal equations to the matching parity block and avoids computing coefficients known in advance to vanish.
Write . orthogonality of the residual to gives
The first integral follows from ; for the second use , giving . The coefficient matrix has determinant , so solving yields
Part (a) proves this is the unique best weighted approximation. The weight is essential; using ordinary unweighted normal equations would give different coefficients.
A credibility factor is the weight assigned to a particular risk's observed experience when blending it with a population or manual premium. In the Bühlmann model, the blend is the best affine mean-square predictor, rather than automatically the full posterior mean.
Let , the expected process variance, and assume the displayed second moments are finite. The law of total expectation gives . The law of total variance and law of total covariance give
For the second formula, the conditional covariance is zero by conditional independence, while the covariance of the conditional means is , the variance of hypothetical means. Likewise
because .
To derive the Bühlmann credibility premium, minimize . Differentiating in sets the predictor's mean to . The remaining normal equations are
For , subtracting any two rows forces all to be equal, then gives . Thus the premium and factor are
The same affine premium predicts : conditional independence makes , so minimizers agree. If , every year's amount equals almost surely, and gives the exact risk mean even though the coefficient vector need not be unique.
For fixed , . Thus more within-risk variation decreases credibility: individual experience becomes less informative, as , and the premium tends to . Increasing the number of observed years has the opposite effect.
For numerical estimation from a balanced panel, assume the risks are independent draws from the same risk population, with comparable exposures, and . Set
Conditionally, each within-risk sample variance has mean ; hence . The risk sample means have variance , so . Therefore is an unbiased method of moments estimate of . For a usable nonnegative variance estimate take , noting that this truncation sacrifices exact unbiasedness.
The balanced-panel method-of-moments credibility estimate for risk is consequently
If and , use zero credibility. If both estimates are zero, the within and between sums of squares are zero and all the observed amounts coincide; any blend gives that same premium. With only one year per risk or only one risk, these within/between estimators are unavailable, so external structural estimates or additional assumptions are necessary.
Use the standard -oriented partition normalization of B-splines, in contrast to the unit-integral normalization. Thus and on , with equality for a complete basis on its basic knot interval. This terminology does not mean that each basis function's maximum is exactly one; for example an order-three cardinal spline has maximum . Assume the basis has positive support on the integration interval and is continuous, as is needed for a projection taking values in .
Let
The ordinary Gram matrix is positive definite by linear independence. The appropriate row-normalized, or mixed-normalization spline Gram matrix, is
Here is a unit-integral nonnegative spline. Unlike , need not be symmetric. If the full support lies inside the interval, ; otherwise use the actual interval integral rather than that full-support formula.
The normal equations for the orthogonal projection say , with . Divide each row by to obtain
Nonnegativity and unit integral give . The subpartition of unity for B-splines then gives
Taking the supremum over and then over nonzero proves the uniform norm bound for B-spline orthogonal projection:
The row normalization is essential; replacing with the ordinary Gram matrix would not be the same asserted estimate. The operator is defined on and maps into its finite-dimensional spline subspace, onto , not onto all of as one phrase in the PDF says. Its range follows both from the formula and from reproducing every .
If “-normalized” were instead read literally as individually peak-one splines, their sum can exceed one. The basis-dependent factor must then be retained: . Equivalently the displayed bound without an outside factor uses . The standard partition-normalized convention has and yields the sharper bound proved above.
Take the inner product linear in its first argument; for a real space no conjugation convention is needed. Insert into the orthogonality condition against each basis vector . The normal equations are
Equivalently , where and . This orientation of the Gram matrix matches the stated inner-product convention. It is Hermitian and positive definite: for a nonzero coefficient vector ,
by linear independence of the basis. Hence is invertible and gives existence and uniqueness of . For an orthonormal basis this simplifies to ; for a general basis the Gram inverse correctly accounts for interactions between basis vectors.
Expanding the ordinary least squares objective gives
For a nonzero vector , , since the design matrix has matrix rank . The Hessian matrix is therefore positive-definite, and is strictly convex. Solving its normal equations gives the unique least-squares estimator:
Indeed, expansion about this stationary point and give , which also proves the global minimum directly.
Define the hat matrix . It is a symmetric matrix and an idempotent linear map, since and , and its image is the column space of . Thus is the orthogonal projection onto the fitted mean space. The fitted values are and the regression residual vector is . Because is also a symmetric matrix and an idempotent linear map,
These minimization and projection identities do not need errors with a normal distribution; the normal linear model becomes relevant to the distributional calculations.
The log-likelihood in the normal linear model, up to an additive constant, is
Full column rank makes positive-definite, so minimizing the residual sum of squares gives the normal equations . Maximizing over afterward gives the maximum-likelihood estimators
The residual sum of squares is positive almost surely because and , so this maximization has an interior variance solution almost surely. The first estimator is a linear Gaussian statistic with mean and covariance , giving
Let be the orthogonal projection onto the design column space, and let . This is a symmetric idempotent matrix of rank . Choose an orthonormal basis for its range and collect its columns in , so , and . Then
The definition of the chi-squared distribution therefore gives
The maximum-likelihood denominator is ; the unbiased residual-variance estimator uses .
Finally put . It has rank and , because . Part (a) implies that is independent of . Multiplication by a fixed constant preserves independence, so the normal linear model maximum-likelihood sampling distributions satisfy
Write for the observed response and for column of the working design matrix . The usual LARS convention gives every covariate unit Euclidean norm. If an unpenalized intercept is fitted separately, first centre and the nonconstant covariates, and restore the intercept afterward. For an intercept-free model no centring is required. The algebra below also applies to an unscaled full-rank design; only the literal equal-angle interpretation uses unit-length columns. The penalty is defined on the regression coefficients of whichever working design is used, since rescaling covariates changes the units of an L1 penalty.
Initialize , and residual . At iteration , let
These are residual inner products, often called residual correlations. If , all normal equations are satisfied and the path has reached ordinary least squares. Otherwise the active set consists of the selected columns tied at the maximal absolute correlation. Initially select the maximizing column, or all such columns in a tie. Ordinary least angle regression retains previously selected columns and adds each new one when it ties the active correlations. Put for active .
To define the direction, form the signed active design and its Gram matrix . Full column rank makes this matrix positive-definite. Let denote the vector of ones of length , and set
Then and . This is the equiangular direction in least angle regression. Define for every covariate, and define the regression coefficient direction by on , zero otherwise. It satisfies .
Along the line , residual correlations are . For an active index these equal , so all active absolute correlations decrease together until level zero at . An inactive covariate first joins when its correlation equals either sign of the common level. Solving these two equalities gives
Here means the smallest finite strictly positive candidate; zero denominators do not produce a future entry, and an empty candidate set has minimum . Candidates beyond the zero-correlation endpoint are capped by that endpoint. Take
At an entry add the newly tied covariate, or all simultaneous ties, and recompute the direction. Once all covariates are active there is no inactive candidate: the final move is to correlation level zero and the full least-squares fit. These definitions specify every term in the stated step formula and the entry knot in least angle regression.
For definiteness use the following penalty normalization for the Lasso estimator:
Full column rank makes the criterion strictly convex, so the minimizer is unique. With the alternative squared-error normalization , the penalty parameter is divided by . The Karush-Kuhn-Tucker conditions for the Lasso in the chosen normalization are
Hence the zero vector is the solution for every . Along a sign-compatible least-angle segment the corresponding penalty is . Active correlation equalities and inactive bounds satisfy the KKT conditions exactly while each nonzero regression coefficient retains the sign . Ordinary LARS can let a regression coefficient cross zero while its correlation sign stays unchanged; continuing past that crossing would violate the KKT conditions.
The required modification is therefore to monitor regression coefficient zero crossings. Along , define the Lasso dropout knot
with ignored and the empty minimum again . Stop at
If a nonzero active regression coefficient reaches zero before the next entry, remove it from the active direction and recompute; the fitted value is continuous at this event. If entry comes first, add that covariate as before. A removed covariate is allowed to re-enter later, so the active set need not increase monotonically. The interior of a segment represents all penalty values through , rather than just the estimates at its knots.
For complete treatment of simultaneous events, full column rank alone does not imply that entries and dropouts occur singly. At a knot with positive level , let , be those correlation signs, and . The KKT-consistent resolution of tied Lasso knots chooses the next tangent by
This strictly convex quadratic program has a unique minimizer. For nonzero or newly entering coordinates its stationarity gives ; for tied zero coordinates kept out, . Thus for a small decrease of the penalty, has the correct regression coefficient signs, active residual scores , and inactive scores within . Strictly inactive coordinates remain feasible by continuity. Choose the resulting support for the next segment and normalize ; this reduces to the preceding equiangular formulas. It handles ties, including a newly tied zero regression coefficient whose unconstrained direction would point against its correlation sign, without perturbing the data.
At each successive event update the support in this manner and continue down to . Between knots the regression coefficients are linear in and satisfy the sufficient KKT conditions. For a fixed support and sign vector , the equalities give ; all sign and inactive-score constraints are linear inequalities in . Each support/sign pattern therefore has an interval of validity, and there are only finitely many such patterns, so the complete path has finitely many linear segments. Together with the initial zero solution for , these interpolated segments give
The PDF gives an inverse-gamma distribution with shape and scale , and a gamma distribution prior with shape and rate . Write . The supplied conditional moments, together with and , give the three structural quantities of the Bühlmann model:
Here is the variance of hypothetical means and the expected process variance. The law of total covariance and conditional independence of different years imply
All these quantities are finite because .
For any coefficients , minimizing the mean squared error over the intercept first gives . Let and . Expanding the remaining mean squared error gives
Its normal equations are for every . Since , subtracting any two equations shows that all agree. The quadratic part is strictly positive for every nonzero coefficient change, so the solution is the unique global minimizer. Solving gives
A credibility estimate combines individual experience with the collective expected value, using an experience weight . In this equal-exposure setting, the Bühlmann credibility premium is
Thus the computed coefficients give exactly a credibility estimate, with a fixed credibility factor determined by known parameters and the number of observed years. This is Bühlmann credibility for inverse-gamma observations.
For the final Bayesian calculation, the likelihood function in is proportional to . Multiplication by the gamma distribution prior gives the Gamma prior for an inverse-gamma scale update
Under quadratic loss, the conditional risk of an estimate is . Its minimizer is therefore the posterior mean:
This is not a fixed-weight arithmetic-mean credibility estimate. For , the observations and have the same sample mean, but reciprocal sums and , hence different posterior means. For any , append the same positive observations to these two samples. For , the estimate is , with ; its second derivative is , so it is not affine either. Symmetry in the observations would force equal slopes in any affine representation, so these examples also exclude a general fixed-coefficient linear representation.
One can express the posterior mean as a broader data-dependent blend. With and harmonic mean , it is
This weights a harmonic-mean-based experience estimate, and the weight itself depends on the observations. It is not the credibility estimate based on and the fixed Bühlmann credibility factor derived above.
For fixed-design nonparametric regression, let and . The degree- local polynomial estimator takes the fitted intercept , where
Use a nonnegative regression kernel and an invertible local polynomial Gram matrix to obtain a unique fit. For , solving the single weighted least squares normal equation gives the local constant estimator:
At the interior point , use the standard unit-integral regression kernel convention . Otherwise the leading variance below is ; unlike a kernel density estimator, the local constant estimator itself is unchanged by rescaling .
The local constant estimator is a linear estimator in nonparametric regression with weights . The independent unit-variance errors imply
To control the bias of an estimator, differentiability at this one point is enough. Write
Symmetry makes , and the supplied moment approximation gives . Therefore the linear contribution to the bias of an estimator is . The remaining contribution has absolute value at most , because only receive positive weight. This is the interior first-order bias cancellation for local constant regression, and gives squared bias of an estimator . Combining with the variance proves
For fixed , take . It satisfies both asymptotic smoothing bandwidth conditions, and the displayed remainder, multiplied by , tends to zero for this fixed . Thus
Letting proves the optimized scaled pointwise error tends to zero. The order of these limits matters: no remainder uniform in has been assumed.
For the lower bound over the whole function class, the absence of a uniform bound on derivatives permits a particularly direct argument. It also avoids assuming a normal distribution for errors when the model only supplies their first two moments. Fix and . Choose a smooth bump function on the interval, with , whose support contains no design point except possibly . Such a bump exists because the design is finite; at an endpoint use the restriction of a smooth bump on the real line. Every , , belongs to the differentiability class.
If is not a design point, all observation means are zero for every . The Le Cam two-point lemma applied to has total variation distance zero and gives a lower bound tending to infinity with . In fact, the supremum of the mean squared error is infinite at every such .
If is a design point, only its response depends on . The resulting location family is the single observation ; all remaining observations are independent of and give no extra information. The single-observation location minimax bound is
Here is a proof covering discrete as well as continuous errors. Give the prior distribution , independently of the noise. Put and . Consider an easier experiment in which an oracle also reveals whether , and reveals itself on the complementary event. On the event and , every possible truncated noise value places within . The flat prior distribution then makes the Bayesian posterior noise law exactly its truncated original law. The smallest conditional squared-error loss is its conditional variance , attained by the posterior mean.
The probability of that event is at least for , by restricting further to . Thus every rule's supremum risk function is at least the original Bayes risk, which is at least the easier experiment's Bayes risk, and therefore at least . Let and then . Finite second moment and zero mean give . The rule has constant mean squared error one, proving the equality.
Consequently, at every , the unrestricted differentiability class satisfies the stronger conclusion
Thus works for every . There is no conflict with the preceding fixed-function limit: the worst functions, including arbitrarily narrow bumps, can vary with . This is the pointwise versus uniform risk distinction. A smoothness ball with a common derivative bound would pose a different minimax risk problem.
The ordinary least squares objective has gradient . The normal equation therefore gives
The Gram matrix is a positive-definite matrix because has full column rank. More explicitly, for any ,
since . This proves that the displayed solution is the unique global minimum.
The fitted values are , where the hat matrix is
The inverse of the symmetric matrix is symmetric, so . Multiplication gives . Thus is the orthogonal projection onto the column space of the design matrix.
The regression residual vector is with . Consequently , , and the residual sum of squares is
By fitted-residual orthogonality, . Using , the cross-covariance matrix is
Both vectors are jointly normal, so they are also independent by independence of uncorrelated jointly normal variables. The zero covariance calculation itself only needs the common error variance and lack of error correlations.
For the first wind fit, let be wind velocity and electrical output. The simple linear regression is , with independent . It has two fitted mean parameters and residual degrees of freedom. The missing analysis of variance entries are therefore velocity degrees of freedom , velocity mean square , and residual degrees of freedom . The residual mean square is , and , consistent with the printed value after rounding.
Because the model includes a regression intercept, the coefficient of determination is the explained sum of squares divided by the total centered sum of squares:
A large coefficient of determination does not rule out a wrong mean function. In the PDF's first residual-versus-fitted plot, residuals are negative at both ends and positive in the middle. This curved pattern agrees with the visibly flattening output-versus-velocity relationship and motivates a polynomial regression with a quadratic term.
The second wind model is , again with independent common-variance normal errors. Its fitted mean is . The line marked (A) is a two-sided Student t-test of against , conditional on retaining the intercept and linear term. Under the null hypothesis,
Its two-sided p-value is . This is far below , so reject a purely linear mean in favour of the quadratic fit. Equivalently, the extra-term nested-model F-test has and null law .
The third fit is a reciprocal-predictor regression, , with estimated mean . It has two mean parameters rather than the quadratic model's three. Its residual standard error is smaller, versus , and its coefficient of determination is larger, versus . The corresponding residual sums of squares are approximately and . The reciprocal fit is preferable on both these fit measures and parsimony. The two models are not nested, so an ordinary extra-term F-test between them is inappropriate. On the common normal-error likelihood, the difference also favours the third model.
Neither lower residual sum of squares nor a higher coefficient of determination establishes adequate assumptions. The quadratic residual-versus-fitted plot removes the original pronounced curvature; the reciprocal plot also has no comparably obvious mean trend. The low-output residuals appear somewhat more spread out, so check scale-location plots and residuals against velocity for heteroscedasticity. Q-Q plots assess normality; residuals against observation order assess serial dependence; regression leverage and Cook's distance identify influential observations. Further cross-validation, replicate observations at comparable velocities, and prediction errors would help choose between their extrapolation behaviours. Both fitted shapes should be judged principally over the observed positive-velocity range.
Use an unpenalized intercept in ridge regression. For centered predictor columns, the ridge regression optimization is
Differentiating with respect to gives . Put . Differentiation with respect to gives the ridge normal equation
Consequently the closed-form ridge regression estimator is
Because , the numerator may also be written . For the inverse exists even with multicollinearity or deficient column rank; at a unique ordinary least squares coefficient vector requires full rank. The quadratic penalty stabilizes nearly singular directions but generally does not set individual coefficients exactly to zero.
For uncentered original predictors, use , apply the displayed estimator to , and recover . Any internal scaling used by lm.ridge must be undone to report coefficients on the original predictor scale. Multiplying the objective by a constant changes the numerical penalty convention unless is rescaled as well.
The statistician first models the age- and gender-dependent mean by linear regression. Its fitted value is . At fixed gender, a year of age is associated with a decrease of BMI units; the group coded gender has a fitted mean units above the group coded at the same age. This question does not state which gender receives which code. The intercept refers to age zero in the reference group, outside a typical adult-patient range, so its substantive interpretation is limited. Both slope Student t-tests have small p-values, and the overall F-test supports an age/gender-dependent mean. The coefficient of determination is only , leaving considerable individual variation to investigate.
The residual diagnostics check whether mean adjustment is plausible and whether a single normal error law is adequate. The residual-versus-fitted plot has no strong curved mean trend, although its smooth curve is not perfectly flat. The scale-location plot suggests some decline in spread as fitted BMI increases, so common residual variance is a working approximation rather than an established fact. The normal Q-Q plot has systematic departures, notably shorter tails than the normal reference, suggesting the residual law is not exactly normal. The regression leverage plot does not display an obviously extreme leverage point, but the marked observations and Cook's distance should still be checked for influence. Independence between patients cannot be diagnosed from these four plots alone.
Next the statistician extracts the regression residuals and fits an intercept-only normal model as a baseline residual distribution. With an intercept in the original ordinary least squares model, the residuals sum to zero by the normal equation; the near-zero fitted residual mean and its are therefore automatic, not new evidence of good fit. The standard error in this refit uses degrees of freedom, whereas the original uses after estimating three regression coefficients. The reported log-likelihood for the single-normal residual model is .
The histogram suggests a shape worth exploring beyond one normal density, with broad shoulders and some asymmetry, without showing unambiguous separated clusters. The statistician fits two- and three-component finite Gaussian mixtures with a common variance by the expectation-maximization algorithm, starting from separated means and positive weights. Successive likelihoods increase and the displayed final iterations stabilize, as expected from EM likelihood monotonicity. This is evidence of numerical convergence from those starts, not proof of a global maximum.
The two-component fit assigns weights , residual means and common variance . The three-component fit assigns weights , residual means and common variance . The code correctly passes the square roots of those variances to dnorm and overlays the resulting weighted densities. Both curves broadly follow the histogram and are very similar. In particular, a two-component mixture need not have two distinct visible modes.
These fits explore residual mixture clustering: groups differ in BMI relative to the same age/gender-adjusted mean, rather than simply in raw BMI. Membership can be summarized by the fitted mixture responsibilities, retaining uncertainty instead of asserting a certain label for each patient. The common-variance assumption is economical, but should be checked; the common regression slope assumption and constancy of mixture proportions across age and gender are also substantive. A residual mixture alone does not establish genuine biological subpopulations; a flexible continuous distribution, missing predictors, nonlinear mean effects or heteroscedasticity could explain a similar marginal shape.
There is also a two-stage residual mixture fitting limitation. Fitted regression residuals are not exactly independent identically distributed observations: even under a normal regression, their covariance matrix is , and estimating the mean adjustment introduces uncertainty. With subjects and three initial regression coefficients, treating them as independent is a useful approximation for exploring shape, but ordinary mixture likelihoods omit the first-stage uncertainty. A joint mixture regression with shared slopes, or a suitable bootstrap of the whole analysis, would give a firmer basis for parameter uncertainty and cluster selection. Examine component membership versus age/gender and repeat the algorithm from multiple starts before making substantive clustering claims.
The Gaussian likelihood has log-likelihood, apart from no omitted parameter-dependent terms,
For fixed , maximizing it is ordinary least squares. Differentiating with respect to gives the normal equation . Full column rank makes the quadratic strictly convex, so
At this value, differentiating with respect to gives , so
For positive RSS this is the global likelihood maximum in . RSS is positive almost surely under the model since ; an exactly zero observed RSS instead gives a boundary supremum as .
As a linear image of a multivariate normal vector, the coefficient estimate satisfies
Indeed, , and direct matrix multiplication gives its covariance matrix.
At a target , approximate the unknown mean locally by and solve the local linear regression weighted least-squares problem
where is a nonnegative regression kernel and a smoothing bandwidth. A common factor in all weights makes no difference. Estimate by the fitted intercept , and optionally by . Repeat at each target rather than fitting a single global straight line.
For an explicit expression put and . The normal equations yield
The denominator is positive provided there are at least two distinct positively weighted predictor values. The weights sum to one and their first centered moment is zero, so local linear regression exactly reproduces affine functions and reduces boundary bias compared with a local constant fit. Smaller uses more local detail and increases variance; larger smooths more and can increase bias. Choose the bandwidth by cross-validation or another justified criterion. A nearest-neighbour span provides an adaptive bandwidth, as in the local fits used later.
The linear least-squares problem is to minimize over , allowing an overdetermined system to have a nonzero residual. For a full QR decomposition, is orthogonal and is with an upper-triangular top block. Orthogonal transformations preserve the Euclidean norm, so
If has full column rank, the top triangular block is nonsingular; setting its residual to zero gives the unique minimizer, while the remaining residual is independent of . Without full column rank, minimizers still exist but need not be unique.
For the specified matrix, one Householder reflection already produces an upper-triangular matrix. Take , the difference between the first column and , and set
The formula gives , . Direct multiplication yields the Householder QR decomposition
All subdiagonal entries in the remaining columns are already zero, so no further reflection is needed. For the supplied right-hand side, . Back substitution gives , , , hence
The residual is orthogonal to every column of , independently confirming the normal equations .
The Gauss-Markov theorem states that with full-column-rank design, mean-zero errors and covariance , the ordinary least squares estimator is the best linear unbiased estimator: its covariance is no larger than any other such estimator's in the Loewner order. Normality is unnecessary for that theorem.
In the given normal linear model, maximizing the likelihood function is equivalent to minimizing . The normal equations and full rank give
For a direct variance comparison, write . Unbiasedness for every requires . Set and , so . The cross covariance terms vanish because . Therefore
This proves the requested comparison for every contrast without relying only on the theorem's name.
Choose knots independently of the eventual validation responses, and let be a natural cubic spline basis as in part (a). A regression spline writes . Define the design matrix . Under the stated normal linear model, maximum likelihood estimation for is the same as ordinary least squares:
Differentiation gives the normal equations . If the design has full column rank,
If it does not, a Moore-Penrose inverse gives the fitted values, but not every coefficient or off-sample prediction is identifiable. Merely choosing distinct knots does not guarantee full rank for an arbitrary set of observed predictor values.
More knots allow greater curvature and reduce approximation bias at the cost of larger estimation variance. Too many or poorly located knots can cause unstable fits. Equally spaced knots are simple; empirical predictor quantiles put more flexibility where observations are dense; subject knowledge can concentrate knots near likely changes. Both the number and positions can be compared using cross-validation or an appropriate penalized model-selection criterion. Adaptive knot selection must be included within validation, since treating a data-selected basis as prespecified understates its flexibility. Boundary knots should cover the region where inference is intended, and natural linear tails do not by themselves justify far-out extrapolation.