Discrete-time multi-state model 2026-10-06
A discrete-time model describes individual transitions between states at successive steps. State occupancy counts, first-entry counts and transition counts are distinct quantities, especially when a state has a self-loop. With independent individuals and fixed transition probabilities, destination counts conditional on the source count have a multinomial distribution.
Gamma-integrated baseline Poisson likelihood 2026-10-07
For independent Poisson distributions with means and a shape–rate Gamma distribution prior on , integrating adds to the total-count exponent and to the sum of relative rates. This distinguishes gamma mixing from conditioning on the total count, which gives a multinomial distribution.
Multinomial deviance 2026-10-07
For counts with a multinomial distribution, this is twice the log likelihood ratio of the saturated cell-probability estimate to fixed probabilities . Zero-count terms have limiting value zero. Simulation under the specified probabilities gives a direct reference distribution when asymptotic approximations are unsuitable.
Past exam of the mathematics course of the University of Cambridge 2004 ib Paper 2 10H Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2005 ib Paper 1 7D Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2005 ib Paper 4 9D Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2006 ib Paper 3 8C a Solution Created 2026-09-24 Updated 2026-09-24
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 2 h Solution Created 2026-10-03 Updated 2026-10-07
Assuming independent digits under Benford law, put and . The count vector has a multinomial distribution, with expected counts . Suitable predictive discrepancy statistics include the Pearson chi-squared statistic and multinomial deviance:The zero-count terms of have limiting value zero. A Monte Carlo method gives a direct null comparison even when expected counts are small.
For example, an original R implementation is:Each column returned by
benford_check <- function(y, B = 9999L) {
p <- log10(1 + 1/(1:9))
n <- sum(y)
expected <- n*p
observed <- sum((y - expected)^2/expected)
replicas <- rmultinom(B, size = n, prob = p)
simulated <- colSums((replicas - expected)^2/expected)
(1 + sum(simulated >= observed))/(B + 1)
}rmultinom is a replicated count vector. R recycles the nine expected counts down each column. The add-one ratio is a Monte Carlo test estimate. In WinBUGS, alternatively generate a replicated dmulti vector using fixed , compute its discrepancy and monitor exceedance of the observed value. The null does not estimate unknown digit probabilities. Dependence or selection in the accounts would require an appropriate simulation model. Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 3 a Solution Created 2026-10-03 Updated 2026-10-07
The multinomial distribution has probability mass functionIt is zero outside this count simplex. The multinomial coefficient counts the individual category sequences giving the same aggregate counts; the probability vector satisfies .
Past exam of the mathematics course of the University of Cambridge 2013 iii Paper 34 3 d Solution Created 2026-10-03 Updated 2026-10-07
The Poisson trick introduces . With an exactly flat log-rate prior, the baseline prior measure is . For ,Thus flat log-rate marginalization gives the multinomial likelihood:Alternatively, independent Poisson counts conditional on their total are exactly multinomial distributions with probabilities . Locally uniform coefficient priors make the coefficient posterior proportional to this likelihood within their flat region.
The printed BUGS prior is a proper normal distribution on , with variance , since BUGS uses precision as its second argument. It is broad but not exactly flat. Substitution shows that, apart from a coefficient-independent constant, the integrated likelihood is the multinomial kernel times the Gaussian log-rate correction to the Poisson trickIt depends on the coefficients through . Dominated convergence gives as , so the finite-variance code yields an approximation to the multinomial posterior, not exact equality. Large log rates can make prior sensitivity relevant.
The cell-wise factors form a standard Poisson regression, convenient for BUGS. They avoid an explicitly constrained count vector and permit scalar log-concave updates for intercepts and coefficients; an exactly flat-log-rate implementation also gives gamma conditional baseline rates. This can be computationally efficient, although the actual log-normal baseline prior is not gamma-conjugate and introduces nuisance intercepts. Efficiency depends on the update scheme.
Past exam of the mathematics course of the University of Cambridge 2016 ia Paper 2 10F a Solution Created 2026-09-24 Updated 2026-10-06
For any fixed bin, each ball supplies an independent Bernoulli distribution indicator with success probability . Summing the indicator variables givesThe full occupancy vector has a multinomial distribution, the basic uniform balls-in-bins allocation. Distinct bin counts are not independent when and . To see this, write . For the same ball, if , while indicators from distinct balls are independent. Their covariance is thereforeWith no balls the counts are deterministic; with one bin there are no distinct bin pairs. These degenerate cases do not contradict the conclusion.
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 1 7H b Solution Created 2026-09-24 Updated 2026-10-05
Since , the indicator is an unbiased estimator of . The joint probability mass function isThe Fisher-Neyman factorization theorem therefore makes a sufficient statistic. More explicitly, conditioning on gives a multinomial distribution with trials and cell probabilities , so has the binomial distribution . Consequently conditioning by the Rao-Blackwell theorem givesFor , interpret the value at as and at as ; thus the same expression uses in this probability convention. For all observations and are zero almost surely. For and , the reduction in variance is strict: given , the event still has a nondegenerate conditional probability. Directly, using the probability generating function of , the new variance is .
Past exam of the mathematics course of the University of Cambridge 2017 ib Paper 4 9H Solution Created 2026-09-24 Updated 2026-10-05
Let and let each increment of the simple symmetric random walk be uniformly chosen from . A return requires an even number of steps. In steps returning to zero, let be the respective numbers of positive steps in the three directions; there must also be negative steps, so . Counting step sequences givesThe terms form a multinomial distribution, so . The permitted combinatorial inequalities give and for . The second bound also follows by noting that the largest multinomial coefficient occurs when differ by at most one and then applying Stirling formula. ThusTo prove the origin is a transient state, let be the probability of at least one return after time zero. The Strong Markov property at successive returns gives for the number of later returns. Therefore would be infinite if . The bound forces , proving that the origin is a transient state. Translation invariance gives the same conclusion at every lattice point. The coordinate walks need not be treated as independent; the counting via multinomial coefficients already incorporates their dependence.
Past exam of the mathematics course of the University of Cambridge 2017 ii Paper 4 5J a Solution Created 2026-09-24 Updated 2026-10-05
This is the appropriate command for the full contingency table. It fits a log-linear model to the nine cell counts, with logarithmic link function and no interaction:With baseline constraints on , there are five parameters. The factorized means express independence of treatment group and damage category. The maximum-likelihood estimates areAlthough the experiment fixes each row total at 30, conditioning these independent Poisson random variables on those totals produces the appropriate row-wise multinomial distribution. The Poisson trick therefore gives the correct likelihood inference for this independence log-linear model for a two-way contingency table; the margins are nuisance parameters. It tests whether treatment changes the distribution of damage, rather than modelling a binary outcome.