Autonomic emotion classification 2026-10-24
Statistical classification of emotion categories using measurements of the autonomic nervous system. It requires an independently justified target label, appropriate cross-validation, and evaluation in the population and context where the classifier will be used. Predictive success does not imply that every instance of a category has one invariant physiological pattern.
Chemometrics 2026-11-05
Chemometrics applies statistics and mathematical modeling to chemical measurements and the design of chemical experiments. It connects recorded signals with chemical composition or other properties, while accounting for experimental variation. IUPAC's definition includes both analysis of chemical data and design of experiments and simulations.[ref]
Chemometrics in the IUPAC Gold Book. Entry CT06948, definition
An original two-component example illustrates multivariate calibration. At two chosen wavelengths, suppose absorbance follows a calibrated linear modelwith fixed optical path and concentration units chosen so the displayed coefficients apply. This is the additive-response model suggested by the Beer-Lambert law, with no interactions or other absorbers. Readings , giveNeither wavelength alone distinguishes both concentrations; their different response ratios make the pair informative.
If the second response row were instead twice the first, the matrix would be singular. More precise repeated readings would not restore the missing chemical selectivity. Nearly proportional response rows instead make the inverse sensitive to noise, connecting experimental wavelength selection with the condition number of the response matrix.
Principal component analysis can summarize patterns in many-channel measurements, while regression can predict an independently measured chemical quantity. These are different tasks: a direction of large signal variance need not identify a particular analyte. Cross-validation should keep correlated preparations or production batches together when the intended prediction is for new batches; splitting repeated readings of one preparation across training and validation can overstate performance.
A useful experiment measures known mixtures spanning the intended concentration range, reagent blanks and separately prepared validation samples. Inspecting calibration residuals tests departures from the model, while varying preparation conditions tests whether a fitted relation transfers. A mathematical fit gains chemical meaning from the materials, reference measurements and experimental design behind its data.
Classification tree 2026-10-14
A classification tree partitions predictor space recursively and attaches a class probability vector to each terminal region. For a categorical response, a fitted leaf commonly uses its observed class proportions and predicts their largest entry. Binary numerical splits compare one coordinate with a threshold. Growing a tree greedily by reducing classification-tree deviance gives an interpretable rule but does not globally optimize the tree. Cost-complexity tree pruning and cross-validation control complexity and assess prediction error.
Cost-complexity tree pruning 2026-10-14
Pruning balances a tree's empirical loss against the number of leaves. Increasing favors a nested sequence of smaller subtrees, obtained by removing splits with the smallest effective cost per removed leaf. Choose complexity using cross-validation or a validation set, and assess the selected tree on a separate test set. The loss can be deviance or misclassification loss; the chosen convention must be specified.
Cross-fitting Created 2026-09-24 Updated 2026-09-24
Cross-fitting trains nuisance estimators outside each observation's fold and evaluates the target score on the held-out fold.
Cross-validation Created 2026-09-24 Updated 2026-10-14
Cross-validation estimates predictive performance by repeatedly fitting on one part of the data and evaluating on held-out observations. In K-fold cross-validation, divide training data into disjoint folds ; identifies observation 's fold, and is fitted without fold . The displayed average scores each observation using a rule that did not train on it. Weight by observation count when fold sizes differ. Leave-one-out cross-validation uses one observation per fold. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, resampling methods
For the training error example, three folds contain indices with equal remainder modulo 3. Each fit uses eight observations. The squared-error loss averages for degrees 1, 2, and 7 are , , and respectively. Select degree 2 and refit on all twelve training data observations. The folds reuse scarce data while challenging each candidate to predict unseen responses; they do not touch the final test set.
Any learned preprocessing, including variable selection, must also be fitted within each training fold to avoid data leakage. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, the wrong and right way
Repeated tuning can itself overfit the cross-validation score; nested cross-validation uses inner folds for model selection and outer folds for assessment of that entire procedure. [ref]Folds use fewer training observations than the final refit, and their scores are dependent because training observations overlap. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch5_Resampling_Methods.pdf. ISLR chapter 5 slides, correlated fold estimates
Splitting must match deployment: for time series forecasting, rolling-origin cross-validation trains on the past and evaluates later observations, preventing future information from entering a forecast. Ordinary random folds need not answer that forecasting question. [ref] Kullback-Leibler divergence Created 2026-09-24 Updated 2026-10-14
The Kullback-Leibler divergence, also called relative entropy, compares two probability distributions in a specified order. In , observations follow and the comparison probability distribution is : the first argument supplies the averaging weights. For probability mass functions on a finite alphabet,Here is a random variable with probability distribution . For probability density functions relative to the same measure , replace the sum by . These formulas use natural logarithms unless stated otherwise. The expected value is under , even though appears in the denominator. [ref]
Take and on two outcomes. Direct calculation givesThe second outcome contributes negatively to the first sum: assigning it more probability than does makes its individual contribution negative. Nevertheless, relative entropy nonnegativity guarantees a nonnegative total. Reversing the arguments changes both the likelihood ratio and the averaging probabilities; taking an absolute value inside the logarithm would define a different quantity.
The units depend on the logarithm: natural logarithms give nats, whereas base-two logarithms give bits. Divide a value in nats by to obtain bits; the forward example is approximately bits. Changing the base rescales every Kullback-Leibler divergence by the same positive factor. Since the two calculated directions differ, Kullback-Leibler divergence is asymmetric and cannot be a metric. It also need not satisfy the triangle inequality. [ref]
https://web.stanford.edu/~kedart/ee376a_winter1617/Lecture_3.pdf. Tse, relative entropy, 2017, Section 3.3
The operational meaning is an expected penalty for using the wrong probability distribution. A prediction incurs log-loss when outcome occurs, the negative of the logarithmic scoring rule. Under , its expected value is the cross-entropy . Predicting with itself incurs information entropy , soThus Kullback-Leibler divergence is exactly excess expected log-loss, whenever these separate quantities are finite. [ref]
https://web.stanford.edu/class/ee276/files/previous_notes/lecture_2.pdf. Weissman, information measures, 2024, property 3
For lossless source coding, ideal codeword lengths similarly give excess expected length in bits per symbol. Actual prefix codes require integer codeword lengths; Shannon's source coding theorem explains how long blocks approach ideal per-symbol lengths. The interpretation concerns an average, not a fractional physical bit attached to every outcome. In our example, ideal coding with costs one bit per symbol, while bits; the difference is exactly the computed bits. [ref]
https://web.stanford.edu/~kedart/ee376a_winter1617/Lecture_3.pdf. Tse, information theory, 2017, Section 3.4
Zeros require explicit conventions. An outcome with contributes zero, including when ; the convention agrees with the relevant limit. If but , the Kullback-Leibler divergence is infinite: the predictor has declared impossible an outcome that can occur. On a finite alphabet, the probability support of must therefore be contained in the probability support of for a finite answer. For example, and give , but . For general probability measures, failure of absolute continuity of measures likewise gives infinity. Even does not guarantee a finite integral. [ref]
https://arxiv.org/pdf/1206.2459. van Erven and Harremoës, Rényi Divergence and Kullback-Leibler Divergence, 2014, Section II
To see how confidently wrong predictions are punished, hold the true Bernoulli distribution parameter at and vary the predicted parameter . Its binary relative entropy isIt vanishes at , equals approximately nats at , and equals nats at . Both endpoints give infinity because both outcomes remain possible under . Predicting almost no successes is especially costly because successes actually occur three quarters of the time. The reversed binary relative entropy stays finite at the endpoints: its averaging probability distribution concentrates on just one outcome, and assigns positive probability to both.
For model selection, minimizing expected log-loss ranks candidate statistical models by , since is common to them. The true probability distribution is usually unknown, so one estimates predictive performance using fresh observations or cross-validation. Fitting and assessing on the same data can reward overfitting; a small fitted Kullback-Leibler divergence alone does not establish useful prediction.
In variational inference, a tractable trial probability distribution commonly minimizes against a target posterior distribution . Maximizing the evidence lower bound accomplishes this without evaluating the target's normalization constant. The averaging now follows : placing trial probability where the posterior distribution assigns almost none is strongly penalized. The chosen direction and trial family therefore matter. [ref]
https://www.cs.columbia.edu/~blei/papers/BleiKucukelbirMcAuliffe2017.pdf. Blei, Kucukelbir and McAuliffe, Variational Inference: A Review for Statisticians, 2017, Section 2.2
These comparisons do not by themselves establish causal inference. Two statistical models can reproduce the same observed probability distribution while predicting different responses to an intervention. Choosing the smaller Kullback-Leibler divergence therefore needs additional assumptions or experimental evidence before supporting a causal claim. [ref]
https://ftp.cs.ucla.edu/pub/stat_ser/r350.pdf. Pearl, Causal inference in statistics: An overview, 2009, Section 2
The original reference is S. Kullback and R. A. Leibler's 1951 paper [ref]
https://doi.org/10.1214/aoms/1177729694. On Information and Sufficiency
, published in The Annals of Mathematical Statistics 22(1), pages 79–86. Its title connects this comparison with sufficient statistics: the historical setting was statistical information, before today's widespread applications in prediction and variational inference. Lasso regularization path 2026-10-06
The Lasso regularization path follows its coefficients as the penalty or constraint radius changes. Under the usual least-angle construction, the coefficient path is piecewise linear between knots, and variables can enter or leave the active set. Reading support at a selected cross-validation fraction requires checking which coefficients are actually zero at that fraction, rather than retaining only visibly large traces.
Mixture identifiability 2026-10-14
Simultaneously applying a permutation to the mixture weights and mixture components leaves unchanged. Thus identifiability of named components requires a convention, such as ordering distinct component means; label switching describes the associated inferential issue.[ref]
Even after choosing label names, identical mixture components reveal only their combined mixture weight, and an inactive mixture component has undetermined statistical parameters. Adding mixture components increases flexibility but can cause overfitting; judge predictions using cross-validation, rather than interpreting every fitted component as a discovered population.[ref]
Mixture Models. §21.1.6, printed pp. 445-446: probabilistic clustering and evaluation on future data
Nested cross-validation 2026-10-14
Nested cross-validation separates selection from assessment using two levels of held-out data. Within each outer training fold, inner cross-validation chooses a model or tuning parameters; the complete selected fitting procedure is then applied to that outer training fold and scored on its untouched outer evaluation fold. This estimates the performance of the model selection procedure, including its choices, rather than reusing its best inner score as an assessment. A final model can then be selected and fitted using all available training data. [ref]
https://jmlr.org/papers/v11/cawley10a.html. Cawley and Talbot, selection bias and performance evaluation
Nonregular mixture model selection 2026-10-06
Testing the number of components in a finite mixture model is nonregular: absent components have zero weights on the parameter boundary and their means or other parameters are unidentified. The usual chi-squared limit for a likelihood-ratio test therefore need not apply. Information criteria are useful working comparisons, while parametric bootstrap and predictive cross-validation can provide more appropriate evidence. Neither a mixture fit nor a selected component count proves genuine latent populations.
Overfitting Created 2026-09-24 Updated 2026-10-14
Overfitting occurs when further adaptation improves training error while degrading performance on new data, for example by fitting incidental disturbances instead of a stable regression function. A gap between training error and test error alone does not prove that a simpler rule would generalize better. Compare candidates using cross-validation or a validation set; reserve the test set for assessment. Regularization and early stopping can limit adaptation. [ref]
https://web.stanford.edu/~hastie/ISLR2/Slides/Ch2_Statistical_Learning.pdf. ISLR chapter 2 slides, assessing model accuracy
Evaluate the training error example at , , none coinciding with a training input. The mean squared discrepancy is , , and for degrees 1, 2, and 7. Thus degree 7 improves training error but worsens recovery of the target relative to degree 2. Degree 1 misses the target's curvature, illustrating underfitting.
These are errors against a known noiseless target, not test errors against fresh noisy responses. In a separate noiseless control, degrees 2 and 7 both recover this target exactly; their numerical held-out errors are approximately and . The fixed-disturbance simulation illustrates a mechanism, not a universal numerical benchmark or a claim that higher polynomial degree always harms generalization.
Noisy polynomial fitting, training-only degree selection, and separate noiseless-target evaluation
. Details. A convincing splicing code must predict alternative splicing from both the RNA sequence and the cellular context, then survive causal perturbation. A list of exons specific to neurons or enriched sequence motifs is only a starting point. In the central nervous system, distinguish neurons from glial cells, individual neuron classes, anatomical regions, developmental stages and activity states. Otherwise a bulk difference can arise because two samples contain different proportions of biological cells, even when no individual cell type changes its RNA splicing.
Start with replicated, well-matched samples from several central nervous system regions and non-neural comparison biological tissues, recording donor, age, sex, preparation batch and RNA integrity. Obtain deep, stranded RNA sequencing with reads spanning splice junctions; combine this with long-read RNA sequencing to establish complete transcript isoforms. Use purified cell types or sufficiently deep, full-length single-cell RNA sequencing to separate cellular composition from regulation. Routine assays that sequence only the end cannot measure most internal exons; single-nucleus RNA sequencing additionally enriches incompletely processed RNA, so retained introns require careful interpretation. A matched bulk or purified-cell dataset supplies coverage that sparse individual-cell observations lack.
Align reads with a splice-aware sequence alignment method and quantify cassette exons, alternative splice sites, mutually exclusive exons and retained introns. Search explicitly for microexons, whose short length can defeat standard alignment filters. For a cassette exon, summarize inclusion by percent spliced in, written as a fractionwhere and estimate abundances of included and skipped molecules after correcting the different informative read opportunities. Adding the two inclusion-junction counts and comparing their sum directly with a single skipping-junction count would bias this estimate. Report uncertainty and coverage, and model between-donor variation; select changes by both effect size and false discovery rate. Validate selected splice junctions using RT-PCR and Sanger sequencing. Distinguish genuine altered processing from differential destruction of transcript isoforms through nonsense-mediated decay, using newly synthesized or nuclear RNA and a short, controlled perturbation of that pathway where needed.
Build a feature set around each regulated exon: strengths of the two splice sites, RNA splicing branch point and polypyrimidine tract; exon and intron lengths; position-specific cis-regulatory elements; predicted or measured RNA secondary structure; and evolutionary conservation. Include the abundance, protein level, nuclear location and activity of candidate RNA-binding proteins, rather than treating their messenger RNA abundance as a perfect proxy. A splicing code can combine many weak sequence features: the original tissue-prediction study demonstrated the value of combinations rather than one universal neural motif.[ref]
Deciphering the splicing code by Yoseph Barash and others. Abstract and Results: combinations of RNA features predicting tissue-dependent exon inclusion
Fit an interpretable statistical model first, allowing interactions between motif position and RNA-binding protein abundance. Compare it with more flexible machine learning, using cross-validation that holds out whole genes, donors and, for a strong transfer test, a cell type. Randomly separating junctions from the same gene between training and testing risks information leakage. Compare against sequence-only, context-only and expression-matched baseline predictors. Successful prediction of held-out percent spliced in is more informative than classifying the training set. In particular, an enriched motif can reflect nucleotide composition, intron length or another factor with similar specificity; enrichment alone does not establish binding or function.
Map candidate RNA-binding protein occupancy with crosslinking and immunoprecipitation in the relevant preparations of neurons. Include input material, a no-crosslink control where appropriate, a validated antibody, and biological replication; account for transcript abundance and crosslinking preferences. Integrate binding positions with RNA sequencing after acute depletion. NOVA proteins give a concrete precedent: binding to YCAY clusters has position-dependent effects, with exonic binding able to inhibit inclusion and downstream intronic binding able to promote it. Here Y denotes a pyrimidine nucleobase. Thus the same motif can support opposite predictions at different positions.[ref]
An RNA map predicting Nova-dependent splicing regulation by Jernej Ule and others. Abstract; Figures 1–4 and 6: positional RNA map and effects on spliceosome assembly
Test other neural regulators, such as RBFOX proteins and PTBP proteins, as potentially overlapping or antagonistic inputs rather than assuming every neural exon follows the NOVA protein rule.Finally, make the predictions experimentally vulnerable. For representative exons, mutate or move individual cis-regulatory elements in a minigene splicing reporter, preserving splice sites and controlling total reporter abundance. Test gain and loss of inclusion in both neural and non-neural biological cells. Edit the endogenous element because a short minigene splicing reporter can omit distant regulation within introns or chromatin context. Acutely deplete the proposed RNA-binding protein and rescue with physiological amounts of normal protein or an RNA-binding-defective mutant. Combined depletion tests redundancy; motif mutation plus factor depletion tests whether both act through the same element. A particularly strong result is the predicted reversal after moving a binding site from a repressive to an activating position. Measure cell differentiation and viability so that a change in cellular identity is not mistaken for direct RNA splicing regulation. The resulting code is a tested, context-dependent set of regulatory rules, with an explicit domain of validity.
Autonomic recordings can support probabilistic discrimination of emotional states under specified conditions; they do not establish a person's experienced emotion with certainty. The distinction matters because a physiological response, an experimenter's induction label and a subjective feeling are different things. A useful psychophysiology study must justify how its labels relate to experience before assessing how well a bodily measure predicts them.
The autonomic nervous system regulates organs and glands through interacting pathways, including the sympathetic nervous system and parasympathetic nervous system. An electrocardiogram supplies cardiac timing and hence heart rate; heart rate variability describes variation in successive intervals. Electrodermal activity can be recorded with skin electrodes, while a temperature sensor supplies peripheral temperature. Breathing and blood-pressure measurements add other information. These measurements differ in what generates them and in their temporal response. In particular, sweat-related skin conductance provides information about sympathetic sudomotor activity, whereas a faster heart rate can reflect several autonomic influences and physical demands. Facial electromyography is useful complementary evidence, but records skeletal muscle activity through the somatic nervous system; it should not be counted as another autonomic channel.
Historically, the question was not simply whether the body changes during emotion, but whether bodily patterns distinguish categories. Paul Ekman and colleagues in 1983 used muscle-by-muscle facial instructions and reliving of past episodes. They reported autonomic differentiation among some negative states as well as between positive and negative states. This challenges the claim that autonomic activity is entirely undifferentiated. It does not show that the same pattern is a necessary and sufficient marker in every spontaneous episode: posing, recollection and the selection of categories constrain the result.[ref]
Autonomic nervous system activity distinguishes among emotions by Paul Ekman and others. 1983, pp. 1208–1210, induction procedures and autonomic differentiation
Joint patterns can carry information that a single measure misses. Philip A. Kragel and colleagues combined electrodermal, cardiac, respiratory and gastric measures during film- and music-induced states. Their 2013 study reported 58.0% autonomic classification accuracy across six induced categories and a neutral condition, with training and testing on separate participant subsets, above its chance benchmark. This supports multivariate information about the tested states. It does not establish invariant bodily essences: a classifier can exploit overlapping distributions whose average patterns differ.[ref]
Multivariate pattern classification reveals autonomic and experiential representations of discrete emotions by Philip A. Kragel and others. 2013, abstract and methods, classification of induced states
Conversely, Erika H. Siegel and colleagues' 2018 synthesis found substantial within-category variation, and mean autonomic patterns that did not clearly separate the categories. Its laboratory adult samples do not exhaust every possible real-world measurement. Nevertheless, a universal fingerprint claim should generalize across episodes, and the observed variation is a substantial problem for that strong claim. Failure to establish a fingerprint does not imply that physiology contains zero predictive information; distributions can overlap without being identical.[ref]
Emotion fingerprints or emotion populations by Erika H. Siegel and others. 2018, abstract and Discussion, autonomic variation within and between categories
Several alternative explanations must therefore be tested. A film may make participants breathe differently because of its pacing; imagined confrontation may prepare action; an emotional task may differ from a neutral task in movement or attention. Exercise, room temperature, medication and individual baselines can change the recorded variables without a change in discrete emotional category. A classifier that recognizes the stimulus or task is not necessarily recognizing the feeling. Splitting trials while retaining the same people and clips in training and test sets can also overstate generalization. Appropriate cross-validation should hold out the people or inductions required by the intended claim, with preprocessing and feature selection fitted only to training data. Mixed feelings and changing episodes should be allowed rather than forced into one mutually exclusive label.
Even genuine conditional discrimination does not determine the reliability of a particular classification. Let denote one independently defined target state and a positive classifier result. Partitioning the positive results into target and nontarget cases and applying Bayes' theorem givesFor an explicitly hypothetical classifier with true-positive probability and false-positive probability , a target base rate of produces . At a base rate of , the same conditional performance produces . The positive predictive value therefore depends on the setting as well as the instrument. This calculation illustrates a limit on inference; it is not an estimate from either study.
The strongest conclusion combines measures while respecting their different roles. Repeated self-report helps establish experienced feeling, independently coded behavior establishes action, and autonomic recording establishes bodily regulation. None is error-free, and agreement must be demonstrated. Psychophysiologists can estimate how much an autonomic pattern changes the probability of a reported or independently characterized state, with an explicit uncertainty and domain of validation. They can establish useful evidence about experienced emotion, but autonomic activity alone supplies a conditional inference rather than a uniquely identifying emotional signature.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 28 3 a Solution Created 2026-10-03 Updated 2026-10-14
The output must first identify the response scale and the formula. If the initial fit is ordinary least squares to the untransformed response with all fifteen predictors and an intercept, its normal linear model isFor full rank , the residual degrees of freedom are . The residual standard error is and estimated coefficient covariance is . A coefficient test divides the estimate by its standard error and compares with a reference distribution; the overall test of all fifteen slopes compareswith . The intercept-only residual sum is . Adjusted R-squared penalizes the loss of residual degrees of freedom, unlike ordinary .
Each regression coefficient measures a conditional association holding the other columns fixed. The southern-state indicator compares two state categories at equal values of all other predictors. Rescaling changes the units of a coefficient, so one cannot infer effects per original currency unit or per original percentage unit without the scaling information. If the actual formula uses , exponentiating a coefficient gives a multiplicative response change rather than an additive change; if both response and a predictor are logged, the slope is an elasticity. These interpretations cannot be interchanged.
The two police-expenditure variables are likely strongly associated and need a multicollinearity check: individual coefficients can be unstable even when their joint contribution predicts well. Their actual correlation should be calculated, not presumed numerically. Similar considerations apply to age-specific unemployment. With only 47 observations and up to 16 mean parameters, examine regression leverage, Cook's distance, residual distribution, variance versus fitted values, nonlinear effects and predictive cross-validation. State-level geographical dependence may also violate the independent-error model.
The observations are aggregate states. An association between a state covariate and crime rate is not an individual causal effect: ecological fallacy, confounding and reverse causation are relevant. For example, greater recorded crime can induce greater police expenditure. The absent coefficient table and model call prevent deciding which predictors were significant or even whether the fitted response was transformed. The preceding degrees of freedom and formula interpretations are conditional on the explicitly stated full linear-model specification.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 28 3 b Solution Created 2026-10-03 Updated 2026-10-14
For a normal linear model with fixed observations and mean coefficients, maximizing over the error variance gives . The maximized negative twice log-likelihood is plus a constant common to the candidate models. Counting the variance as another parameter adds the same penalty two to every model, so the stated criterion is equivalent for comparing them:The Akaike information criterion balances fit against parameter count; smaller values are preferred. It does not compare models using different response scales or different sets of observations without further adjustment.
Stepwise selection by the Akaike information criterion compares allowed one-term additions and deletions, takes a change lowering the criterion, and repeats until no allowed change improves it. The search direction, initial fit and lower/upper scopes matter. A displayed no-change row represents the current model. The term degrees of freedom show how many coefficients a change removes, the residual sum reflects its fit, and the AIC column determines the selected move. The search is greedy, not a guarantee of the best subset over the entire model space. The software's scope and direction conventions are documented in stat.ethz.ch/R-manual/R-devel/library/MASS/html/stepAIC.html .
Deleting coefficients changes the criterion byThus the AIC deletion threshold in a normal linear model isFor a single coefficient, its partial F-test statistic must be below for AIC to favor deletion. At the full 47-observation, 16-coefficient fit this is approximately , corresponding to . Therefore AIC selection is not equivalent to retaining only coefficients with a conventional five-percent p-value.
The final model should be described by its retained terms, signs, conditional effect sizes, uncertainty, residual diagnostics and prediction behavior. A coefficient that survives selection need not identify a causal mechanism, and its ordinary final-model p-value ignores the preceding search. Stability under bootstrap resampling and predictive cross-validation are useful. The absent search trace and final model prevent identifying the actual deletion sequence, final predictors, coefficients, RSS or AIC. The given starting name does not specify any of those facts.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 36 2 ii Solution Created 2026-10-03 Updated 2026-10-14
The family-history table contains men, of whom have the response present, giving an overall observed fraction . The unadjusted fractions are with a positive family history and without one. Their crude odds ratio is ; this is not the covariate-adjusted effect from the fitted logistic regression.
The full model has an intercept and nine slopes, hence residual degrees of freedom. The binomial distribution dispersion is fixed at one. Although the software labels coefficient-to-standard-error ratios as t values, here they are asymptotic normal Wald statistics, not statistics with an estimated Gaussian residual variance and an exact Student reference. The full conditional coefficients provide evidence for tobacco, cholesterol, family history, behaviour score and age: their absolute Wald ratios are approximately . The other four ratios are smaller in magnitude, especially alcohol at about . These are conditional associations; a weak adjusted coefficient does not by itself establish absence of an underlying association, and multicollinearity can affect the estimates.
The null deviance is on degrees of freedom and the full residual deviance is on . Their difference has a nominal nine-degree-of-freedom likelihood-ratio test reference for the nine slopes jointly. The absolute residual deviance should not automatically be compared with for the reasons in part (i).
The shown stepwise selection by the Akaike information criterion follows a backward path. For individual binary observations the saturated log-likelihood is zero, sowhere includes the intercept. Removing a one-parameter term improves AIC exactly when the increased deviance is less than two. The successive deletions are alcohol, adiposity, blood pressure and obesity. The corresponding values areAt the final step, every remaining single-term deletion increases AIC. This is a local stopping condition of the search, not a proof that it found the best subset among all possible models. Obesity is retained for several steps because its successive deletion costs differ after the other terms are removed; the procedure does not simply sort the initial Wald ratios.
For the selected fit, write for positive family history and otherwise. The fitted linear predictor isHolding the other predictors fixed, a unit increase multiplies the odds by . In the same variable order, the unit odds ratios areA ten-year age difference multiplies the fitted odds by , and ten behaviour-score points by . Family history has adjusted odds ratio about , with ordinary fitted-model confidence interval . The intercept is the log odds at zero numerical covariates and absent family history; that extrapolated baseline is not a typical man's risk. Odds ratios are not risk ratios.
The selected model's residual degrees of freedom are , consistent with its six coefficients. All five retained slopes have nominal normal-Wald values below in that model, but these tests and confidence intervals do not incorporate the prior model selection. Its improvement over the intercept-only fit is on five nominal degrees of freedom; it loses only deviance units relative to the nine-slope fit while using four fewer parameters. Selection optimism remains relevant to predictive performance. Check possible nonlinear continuous-predictor effects, influential observations and clinically motivated interactions; assess out-of-sample discrimination and agreement of predicted probabilities with observed frequencies by cross-validation or external data. The printed output alone does not supply those diagnostics, and the selected high-risk male population limits extrapolation to other populations. Nothing here establishes causal effects of these observational predictors.
Past exam of the mathematics course of the University of Cambridge 2002 iii Paper 39 3 Solution 2026-10-14
The response is the species categorical variable, while the four measurements are candidate predictors. The dot in the formula means all other columns of the data frame. The fitted object is a classification tree: it recursively partitions predictor space by binary threshold rules and assigns a species and class-probability vector to each terminal region. Sepal width was available but was not selected in the displayed tree.
At a node , let be the number of observations of class and . The multinomial likelihood is maximized by . The fitted class is one attaining the largest proportion, with a software convention resolving ties. The classification-tree deviance isA pure node has zero deviance. At each nonterminal node, consider candidate split points between distinct observed predictor values, and choose the split with the largest decrease . Repeating this local maximization constructs a binary decision tree; it does not solve a global optimization over all trees. Growth stops when nodes are pure or size/deviance controls prohibit further splitting. Mixed leaves with five or six observations can therefore remain. The node number has children and , and a terminal-node marker means that no further split was retained.
The probability triples are in class order , not . For example, the pure left leaf has probability vector and predicts , while the 54-observation node has counts and predicts . The root counts are , giving and a tied majority class. Its reported choice of does not indicate a more common class.
The complete derived decision rule is shown below. Each leaf includes its fitted class and the observed class counts, so both the branching logic and its remaining errors are visible. For the observed data, the printed strict inequalities leave no equality cases because the thresholds fall between measurement values. A consistent right-branch convention at equality extends the rule to new specimens.
Six-leaf iris classification tree with fitted classes and class counts at every terminal node
. Details. The six terminal nodes contain the class countsThus the training misclassification error isThe terminal classification-tree deviance is insteadThe displayed residual mean deviance divides this by , yielding approximately . This is the summary's reporting convention, not a normal-error residual mean square or an automatic chi-squared calibration with 144 statistical degrees of freedom. The two summary measures answer different questions: deviance depends on the fitted probability of each observed class, while misclassification counts only whether the majority-class prediction is correct. Both are training quantities. Cross-validation or independent test data, rather than the displayed training error, are needed to assess prediction on new specimens; cost-complexity tree pruning can select a less elaborate tree if predictive performance warrants it.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 43 4 Solution Created 2026-10-03 Updated 2026-10-14
princomp(): principal component analysis. Supply observations in rows and numeric variables in columns. After centering, let denote the resulting matrix and its sample covariance matrix, with an explicitly stated normalization. WriteThe first direction maximizes the Rayleigh quotient over unit vectors; successive directions maximize it subject to orthogonality to the earlier directions. The principal component scores are , with variances and zero pairwise sample covariance. Zero covariance alone does not imply independence. Each principal component loading describes a direction in variable space; its sign is arbitrary, and repeated eigenvalues leave the basis inside the corresponding eigenspace arbitrary.The function returns principal component loadings, component standard deviations
sdev and, when requested, principal component scores. By default it uses a covariance matrix; cor=T instead performs principal component analysis on a correlation matrix, standardizing nonconstant variables to variance one. This choice matters when variables have different measurement units. These interface details are documented in the S-Plus help for princomp.A scree plot shows the ordered eigenvalues; a plot of the first two principal component scores can reveal groups, unusual observations or a dominant gradient. The first components explain of the total variance. Reconstructing each centered observation by its orthogonal projection onto these directions minimizes average squared reconstruction error among -dimensional linear subspaces. Thus PCA gives an optimal linear compression for squared reconstruction error, with scaling and the retained dimension chosen explicitly. It is an unsupervised learning method, rather than a classification rule fitted to supplied labels.
tree(): classification trees and regression trees. A call such as tree(response ~ predictors, data=dat) fits a recursive partitioning model. At a current node, test numerical predictors against candidate thresholds, or divide the levels of a categorical predictor into two sets. Select a split that most improves the fitting criterion, then repeat within its children. Numerical splits give axis-aligned regions. A categorical response produces a classification tree; a numeric response produces a regression tree, as specified in the S-Plus tree documentation.For a regression tree, the constant prediction in a terminal region is its sample mean, minimizing the sum of squared residuals there. For a classification tree, estimate class probabilities by the observed proportions in a leaf and predict a most probable class under equal misclassification costs. The classification-tree deviance of a node iswith ; splitting maximizes the decrease from parent to children. This fitting criterion differs from the number of wrong classifications. The middle sketches show the same three-region partition as a binary tree: first split on variable one, then split the right-hand branch on variable two.
Growing to small leaves can overfit. Use cost-complexity tree pruning, balancing fitted loss against leaf count,and select complexity by cross-validation. Plotting the fitted tree and annotating nodes displays the rules; prediction routes each new observation through the fitted splits. A tree gives an interpretable, piecewise-constant prediction rule; training fit alone does not measure prediction accuracy.
The
rpart() alternative. This also fits classification and regression trees by recursive partitioning, with squared-error splitting for ordinary numeric responses and, by default for classification, Gini impurity . Classification settings can instead use information-based splitting and specify prior probabilities and a loss matrix. It supports surrogate splits to approximate a node's primary left/right assignment when the primary predictor is missing. Its complexity-parameter path and cross-validated errors support cost-complexity tree pruning; for example, select a complexity parameter and apply prune(fit, cp=...). The maintainer's rpart documentation describes the criteria and the distinction in handling surrogate predictors. The partition and tree sketches apply to either implementation; the fitted tree need not be the same because splitting criteria and controls can differ.cmdscale(): classical multidimensional scaling. Its input is a dissimilarity matrix or stored distance object. It outputs coordinates for the observations in a chosen dimension, usually two for visualization. Let contain the squared entries of , and putFor centered Euclidean coordinates , the distance identity gives : multiplying by removes the row and column norm terms. Diagonalize this Gram matrix and retain its largest positive eigenvalues. The coordinates areThus classical scaling exactly recovers Euclidean distances when all positive eigenvalues are retained. Reducing dimension approximates the centered Gram matrix; it does not in general minimize squared discrepancies in the original distances. Negative eigenvalues identify a failure of the Euclidean distance matrix criterion, so their size matters when interpreting a display. The historical S-Plus cmdscale help describes the dimension argument, eigenvalue output and optional additive adjustment to dissimilarities.Plot the two coordinate columns on equally scaled axes and label observations. Nearby plotted points suggest small dissimilarities only insofar as the dimension reduction fits the input well. The bottom sketches give an exact Euclidean example: a configuration and its independently recovered two-dimensional coordinates have identical pairwise distances, despite different coordinate axes. Classical scaling converts distances into geometry; translations, rotations and reflections do not change the represented distances. For Euclidean distances between observations, its coordinates agree with the corresponding principal component scores up to these harmless choices of axes.
Illustrative PCA directions and scree plot, equivalent recursive partition and tree, and exact classical-scaling recovery of Euclidean distances
. Details. Past exam of the mathematics course of the University of Cambridge 2005 iii Paper 46 3 Solution 2026-10-14
The formula makes species the categorical response and the dot denotes all four other columns as candidate predictors. The classification tree is grown by recursive binary partitioning, not by fitting a linear regression to numerical species codes. At a node , count observations of each class, , and set . These are the multinomial maximum-likelihood probabilities. The classification-tree deviance isFor each candidate predictor and threshold, calculate and choose the largest permitted decrease. Continue recursively until a node is pure or the stopping controls prevent another split, for example because it has too few observations or insufficient deviance to warrant further growth. Only petal length, petal width and sepal length appear in the selected splits; sepal width was available but did not win a split. This greedy construction need not find a globally optimal tree. The default deviance criterion and recursive partitioning are documented in the tree package manual.
Each node number encodes its position: node has left and right children and . The reported sample size is the number reaching the node; its deviance is calculated from that node's class counts. The fitted class is the class with largest fitted probability, with a convention resolving ties. The root's three counts are equal, so its displayed class is only a tie choice. An asterisk marks a terminal node, where prediction stops.
The resulting rule is displayed below. A left edge satisfies the stated strict inequality and a right edge its complement. None of the recorded training values lies exactly at these midpoint thresholds; the diagram adopts the right branch at equality for prediction.
Its six terminal regions have the following derived class counts, in the order setosa, versicolor, virginica:The root split identifies all 50 setosa observations. Among the remaining specimens, the petal-width split is the principal separation of versicolor from virginica; further petal-length and sepal-length splits refine it. The leaf errors add to . The leaf deviances add toDividing by the software's residual degrees-of-freedom convention gives , as reported. The root deviance is . The deviance is a likelihood measure, whereas the error rate counts wrong majority-class predictions; these are different fit summaries.
Both quantities are in-sample, so the low error does not establish prediction accuracy on new specimens. Cost-complexity tree pruning, with tree size chosen by cross-validation, can remove weak splits and reduce overfitting. An independent test set is needed for a final estimate of the selected tree's prediction error.






