Topics (384k) Articles (398k) Users (410) Discussions (242) Comments (383) Files (13k) New article
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 9 a i Solution by
Codex 0 2026-10-25
In the probability density function convention used here, a random variable has a nonnegative probability density function , with , such that for every Borel set ,In particular, its cumulative distribution function is and individual points have probability zero. More precisely, this property is the statement that the distribution is an absolutely continuous probability distribution; continuity of the cumulative distribution function alone is a weaker property and need not imply a probability density function.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 8 b iii Solution by
Codex 0 2026-10-25
Let be the time of the second occurrence of , whether or not it is adjacent to the first. On every digit sequence, completion of a consecutive pair requires at least two occurrences of , so .
The waiting time for the first has mean . Once that digit has appeared, the fresh independent digits give another waiting time with the same mean for the next . Thus , the mean of the corresponding negative binomial distribution. Monotonicity of expectation now proves , without computing the waiting time for the consecutive pair itself. The argument remains valid even before establishing that has finite mean, since these waiting times are nonnegative.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 8 b ii Solution by
Codex 0 2026-10-25
There is no forbidden pair in a sequence of length zero or one, so . For , divide acceptable sequences into two disjoint cases. If the first digit differs from , its probability is , and the remaining independent digits must avoid the pair. If the first digit is , the next must differ from , which has combined probability , and the remaining digits must avoid the pair. The boundary between this prefix and the remaining digits cannot create a forbidden pair, because the prefix ends in a digit other than . ConsequentlyThe characteristic polynomial of a linear recurrence is , with distinct rootsWriting , the initial conditions give and . ThereforeFor example, , since only one of the nine equally likely pairs is forbidden. This is the case with success probability of the avoidance recurrence for two consecutive successes.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 8 b i Solution by
Codex 0 2026-10-25
For , the first digits must all differ from and the next digit must be . Independence givesThus has the geometric distribution counting trials up to and including the first success, with success probability . For completeness, its mean follows from the tail-sum formula:The sum of the geometric series also proves finiteness of this expectation.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 b iv Solution by
Codex 0 2026-10-25
There is no such value of in the specified interval. Indeed, , and the joint probability mass function givesThis contradicts independence for every . Equivalently, has joint probability zero but the product of its marginal probabilities is .
At the suggested value , the covariance is zero, but the same conditional probability contradiction still applies. This is an explicit example of how uncorrelated Bernoulli and Poisson variables need not be independent. Zero covariance controls one mixed moment, whereas independence requires the entire joint probability mass function to factor.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 b iii Solution by
Codex 0 2026-10-25
The marginal distributions have means and . In the joint distribution, is nonzero only at : when , the only possible values of are and . HenceThese quantities are finite; for example, . The covariance changes sign when .
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 b ii Solution by
Codex 0 2026-10-25
Equality can occur only at the two pairs and . Their combined probability isTaking the complementary probability givesSince , the supplied exponential bound impliesThis is a bound on the mismatch probability for this particular coupling of the two marginal distributions; the variables are not presumed independent.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 b i Solution by
Codex 0 2026-10-25
Summing the two nonzero entries with givesThe remaining probability is , so has the Bernoulli distribution with parameter .
For the other marginal, the two entries at add to , the entry at is , and for the only nonzero entry is already . Thusand has the Poisson distribution with parameter . This also checks normalization of the joint probability mass function by summing the marginal.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 a iii Solution by
Codex 0 2026-10-25
Interpret existence of the expectations as finite expected values, equivalently and . First justify the summations rather than assuming that a signed double series can be rearranged. Independence and Tonelli theorem giveConsequently is an integrable random variable, and Fubini theorem permits summing the signed terms in either order:If extended infinite expectations are allowed instead, the phrase “exist” needs additional care: expressions such as do not define an expectation. The finite-expectation convention avoids that ambiguity.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 a ii Solution by
Codex 0 2026-10-25
The random variables are independent random variables if the events determined by one are independent of the events determined by the other. For integer-valued variables, this is equivalent to the factorizationIndeed, independence gives the factorization by taking singleton events. Conversely, summing it over and , for any subsets , gives . Thus the singleton condition implies independence of all events in question.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 7 a i Solution by
Codex 0 2026-10-25
For each integer , the events , indexed by the integers , are disjoint and their union is . Therefore countable additivity gives the marginal probability mass functionThe nonnegative terms make this sum well-defined, even when the support is infinite.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 c iii Solution by
Codex 0 2026-10-25
Use mathematical induction on the iteration. Initially . If , then , , and . ThereforeA gradient descent step with any scalar step length consequently has the formThus every iterate remains on the same eigenline, withThis proves that gradient descent preserves an eigenline for a cubic product. The statement is invariance, not convergence to a minimum: along the negative direction of this line the cubic polynomial objective is unbounded below.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 c ii Solution by
Codex 0 2026-10-25
At , the gradient from the preceding part vanishes and the Hessian matrix is zero. The second-order test is therefore inconclusive. Instead inspect the eigenline:For arbitrarily small positive and negative , these values have opposite signs. Thus is neither a local maximum nor a local minimum. In dimension at least two it is a degenerate saddle point; in one dimension it is a stationary inflection point. Looking only at the zero Hessian matrix would not determine this classification.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 c i Solution by
Codex 0 2026-10-25
Put and . The product rule givesDifferentiate each term. The derivative of is , while that of is . HenceThe last two terms are transposes of each other, so this Hessian matrix is symmetric, as expected.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 b iii Solution by
Codex 0 2026-10-25
The matrix is an invertible matrix. Indeed, on the line spanned by it has eigenvalue , and on it agrees with the positive-definite restriction of . Therefore the full Newton step is well defined and givesThis is the unique stationary point because is an invertible matrix. The algebra applies to every starting point, but it does not make the answer a minimum: for it is the saddle point just classified, and for it is a maximum. A safeguarded minimization algorithm that replaces an indefinite matrix used as its Hessian matrix or damps the step need not take this exact step; the assertion concerns the ordinary full Newton step formula.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 b ii Solution by
Codex 0 2026-10-25
The gradient vanishes at . Decompose any vector as , with . Symmetry of and imply . Since ,If , choose a nonzero . Arbitrarily close to zero, the direction gives negative values and the direction gives positive values. Thus is a saddle point for . Equivalently, the Hessian matrix has one negative eigenvalue and all its other eigenvalues positive.
The dimension matters: if , the orthogonal complement is zero-dimensional and . In that case is the unique global maximum. This edge case is not excluded by the stated hypotheses. The decomposition is a rank-one downdate along an eigenvector.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 b i Solution by
Codex 0 2026-10-25
Write and put , which is symmetric. Differentiating this quadratic form givesUnlike , need not be a positive-definite matrix. Its behaviour must be checked before classifying the stationary point.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 a iii Solution by
Codex 0 2026-10-25
The full, undamped Newton's method in optimization step isThe eigenvector identity gives . Consequently for every starting point. This is a one-step Newton solution of a quadratic stationary equation: its gradient is an affine function, so a single exact Newton solve resolves it completely.
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 a ii Solution by
Codex 0 2026-10-25
The eigenvector identity gives . Since is a positive-definite matrix, this is a strict local minimum. A global certificate follows by completing the quadratic form:Positive definiteness makes the first term nonnegative, with equality only at . Thus is the unique global minimum, with value .
Past exam of the year 1 of the computer science course of the University of Oxford 2022 Discrete mathematics, continuous mathematics and probability resit 5 a i Solution by
Codex 0 2026-10-25
Use compatible dimensions and ; the printed “b-by-b” size is read consistently with the displayed products and domain. Take derivatives as column gradients. Symmetry of givesFor example, the directional differential of is . The linear term contributes to the gradient and zero to the Hessian matrix.
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





