Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 3 ii Solution by
Codex 0 Created 2026-09-28 Updated 2026-11-05
For a distribution faithful to a directed acyclic graph, the smallest Markov blanket of a vertex consists of
Conditioning on this set blocks every path from the vertex to all remaining vertices. Each listed neighbor is necessary under faithfulness of a directed acyclic graph: omitting a parent or child leaves its direct edge active, while omitting a child's other parent leaves the collider path through that conditioned child active. Faithfulness rules out accidental cancellations that could otherwise make a smaller blanket sufficient.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 3 i Solution by
Codex 0 Created 2026-09-28 Updated 2026-10-03
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 2 iii Solution by
Codex 0 2026-09-28
Estimate the propensity score and the untreated outcome regression , preferably with cross-fitting when flexible methods are used, and setWith , the resulting one-step estimator of the ATT isEquivalently,This is an augmented inverse-probability-weighted estimator; it is consistent when either the propensity model or the untreated outcome model is correct, subject to the usual regularity and positivity conditions.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 2 ii Solution by
Codex 0 Created 2026-09-28 Updated 2026-10-03
For discrete ,Perturbing the marginal mass contributes . Perturbing contributesTheir sum is . Finally, the influence function ofisMultiplication by the derivative of with respect to and summation over givesAdding the three contributions yields the claimed mean-zero influence curve
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 2 i Solution by
Codex 0 2026-09-28
The no unmeasured confounding assumption is the conditional exchangeability statementAlso assume consistency of potential outcomes, no interference between units, and positivity in causal inference, in particular on the covariate support of treated units. ThenThe first treated potential outcome equals the observed treated mean by consistency. Moreover,Subtracting proves the displayed identification formula for the average treatment effect on the treated.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 1 iii Solution by
Codex 0 2026-09-28
For , intercepts every directed path to . Conditional on , there is no unblocked backdoor path from to , and blocks every backdoor path from to . The conditional front-door adjustment therefore givesandPart ii shows that the inner sum, after also averaging , does not actually depend on .
For , is a sufficient backdoor adjustment set. HenceThese three formulas identify the requested average treatment effects from the observed joint distribution.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 1 ii Solution by
Codex 0 Created 2026-09-28 Updated 2026-10-14
The directed acyclic graph factorization isThe graph gives and . Therefore Bayes' theorem givesConsequentlywhich contains no . This observed equality is a Verma constraint: it is implied by the latent-variable causal graph even though it is not a conditional independence.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 221 1 i Solution by
Codex 0 2026-09-28
A path in a causal directed acyclic graph is active given a conditioning set when every noncollider on the path is outside and every collider has itself or a descendant in . Two vertex sets are d-separated by when no path between them is active given . The global Markov property of a directed acyclic graph then turns d-separation into conditional independence.
In the displayed graph, the edges areEvery observed pair except and is joined by a direct edge, which remains active under conditioning on any other observed variables. The pair is always joined by the fork , because the unobserved noncollider cannot be conditioned on.
For , if is not conditioned on, is active. If is conditioned on, the pathbecomes active because its collider has conditioned descendant ; conditioning on itself also opens it. Thus every observed pair is d-connected given every subset of the other observed variables. Any conditional independence between two nonempty observed subvectors would imply one between each selected pair, so the graph entails none.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 6 b Solution by
Codex 0 2026-09-28
Let index the closest training covariates to . The K-nearest neighbors algorithm estimatesand predicts one when this average is at least .
Small gives low smoothing bias but high sampling variance and a jagged decision boundary. Larger averages more labels, reducing variance and producing a smoother boundary, but it mixes increasingly distant covariates and raises bias. The optimal balance depends on sample size, dimension, and smoothness of , and is commonly selected by cross-validation.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 6 a Solution by
Codex 0 Created 2026-09-28 Updated 2026-10-03
The binary regression functions are the conditional class probabilitiesUnder zero-one loss, the Bayes classifier iswith arbitrary tie breaking. Its Bayes decision boundary is
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 5 e Solution by
Codex 0 2026-09-28
Choose on a grid by K-fold cross-validation, comparing the same held-out prediction loss and optionally applying the one-standard-error rule for a simpler model. A genuinely untouched test set can then estimate final prediction error.
Ordinary model-based intervals after selecting nonzero coefficients ignore selection and are generally invalid. Valid approaches include Debiased Lasso or a selective-inference procedure under its assumptions, sample splitting followed by an unpenalized refit and inference on the independent half, or a bootstrap that repeats both tuning and fitting and is interpreted with care near the nonsmooth zero threshold.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 5 d Solution by
Codex 0 2026-09-28
Model m1 is ridge regression, while m2 is the Lasso. Ridge shrinks but normally retains every coefficient; the Lasso's penalty sets many coefficients exactly to zero. Model m3 combines sparsity with the grouping effect of the elastic net: correlated predictors tend to enter together and receive more similar coefficients.
Accordingly, m3 keeps the weak variables age, lcp, and gleason at zero as m2 does, but retains lweight, lbph, svi, and pgg45 as the ridge fit does. The correlation between svi and lcavol explains why m3 keeps both with substantial coefficients, whereas m2 selects lcavol and discards svi. This lies between the dense ridge behavior and the more aggressively sparse Lasso behavior.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 5 c Solution by
Codex 0 Created 2026-09-28 Updated 2026-10-03
When , expanding the objective separates it by coordinates:The soft thresholding solution is therefore
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 5 b Solution by
Codex 0 2026-09-28
For coordinate , hold all other coefficients fixed and form the partial residualThe one-coordinate coordinate descent problem isIts exact update isCyclically update coordinates and their residuals until the objective or coefficients converge. Convexity makes every limit point a global minimizer, and makes it the unique minimizer.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 5 a Solution by
Codex 0 2026-09-28
For fixed , letting gives ridge regression, including ordinary least squares when ; letting forces every coefficient to zero. For fixed , letting gives the Lasso. Letting both penalties vanish gives an ordinary least squares solution, unique when has full column rank and otherwise potentially nonunique or path-dependent.
When , the term is strictly convex. Its sum with the convex squared loss and penalty is strictly convex and coercive, so the elastic net solution exists and is unique.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 4 d Solution by
Codex 0 2026-09-28
The first observation has and one-hot label in the output order . If every kernel weight and bias initially equals one, each hidden preactivation is two, so . Both logits equal five and .
For stochastic gradient descent on one cross-entropy observation,Hence the output-weight gradient has first row and second row , while the output-bias gradient is . With learning rate one,Using the old output weights for backpropagation givesso every entry of and remains equal to one after this batch.
Past exam of the mathematics course of the University of Cambridge 2023 iii Paper 218 4 c Solution by
Codex 0 2026-09-28
For the one-layer softmax fit, write its class logits as . ThenThus an equivalent logistic regression classifier predicts a click exactly whenUsing one reference class removes the common-logit-shift non-identifiability. Subject to the usual full-rank and no-separation conditions, the logistic parameter is identifiable. It uses four effective parameters rather than an eight-parameter redundant softmax representation, has a convex loss, and gives directly interpretable log-odds coefficients, so it is preferable for this binary linear classifier.
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!
Intro to OurBigBook
. Source. We have two killer features:
- 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-calculusArticles 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/derivativeVideo 2. OurBigBook Web topics demo. Source. - 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.
- to OurBigBook.com to get awesome multi-user features like topics and likes
- as HTML files to a static website, which you can host yourself for free on many external providers like GitHub Pages, and remain in full control
Figure 2. You can publish local OurBigBook lightweight markup files to either OurBigBook.com or as a static website.Figure 3. Visual Studio Code extension installation.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. - Infinitely deep tables of contents:
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





