Jensen gap 2026-10-14
The Jensen gap is the nonnegative difference in Jensen's inequality, under its integrability assumptions. It quantifies how much applying a convex function before averaging differs from applying it afterward. For it is the variance of ; for an affine function it is zero. For general convex functions, it depends on both the function and the distribution of , and is not determined by the variance alone.
Jensen's inequality 2026-10-14
Jensen's inequality says that applying a convex function to a weighted mean cannot exceed the same weighted mean of its outputs. For nonnegative weights with and inputs in a convex set,Nonnegative weights are essential: this is a convex combination, rather than an arbitrary affine combination. For two inputs it is precisely the defining inequality for a convex function; repeatedly grouping inputs gives the finite weighted version.
Take , weights and , and inputs and . Their weighted mean is , so the two sides areThe Jensen gap is . The inequality measures the effect of replacing distinct inputs by one representative input before applying a nonlinear function.
The probabilistic form uses an integrable random variable taking values in an interval where is a convex function. If is also an integrable random variable and belongs to that interval, thenThe direction reverses for a concave function. For a strictly convex function, equality in the finite weighted form requires all inputs having positive weight to be equal; in the probabilistic form it requires to be constant almost surely. An affine function gives equality for any admissible distribution. [ref]
https://stanford.edu/~boyd/cvxbook/bv_cvxslides.pdf. Boyd and Vandenberghe's slides, section 3.14, state the expectation form
.For the quadratic function and a random variable with a finite second moment, the difference between the two sides is exactly its variance:Consider two equally likely values and . Their expected value stays at as increases, but their variance is . Thus the expected value of the square grows from to . For the exponential function, the same two-point distribution gives , while . Both are examples of Jensen's inequality, but their Jensen gaps depend differently on the spread of the inputs.
Another useful choice is the concave function on positive inputs. Its version of Jensen's inequality gives . Applying the increasing exponential function shows that the weighted geometric mean cannot exceed the weighted arithmetic mean. For the equally weighted inputs and , these are and . This recovers the arithmetic-geometric mean inequality and illustrates how choosing one function can generate an entire family of bounds.
A short proof idea explains the probabilistic form. If has a subgradient at , the supporting affine function gives . Taking the expected value cancels the linear term because . This argument applies, for example, to finite convex functions on ; more general domains of a function need attention to endpoints and the existence of a subgradient.
Johan Jensen's 1906 paper “Sur les fonctions convexes et les inégalités entre les valeurs moyennes” is an early source for the connection between convex functions and inequalities for means. [ref]
https://zenodo.org/records/2371297. Jensen's original article and publication record, DOI 10.1007/BF02418571
. Lagrangian duality Created 2026-10-06 Updated 2026-10-18
A feasible point gives an upper bound on a minimization problem's best value; a suitable Lagrange multiplier gives a lower bound. Lagrangian duality searches for the strongest bound obtainable this way. Matching bounds certify a global minimum.
Let be a nonempty decision domain on which the objective function and the constraint functions are finite. Write the primal problem and its optimization Lagrangian asThe inequality Lagrange multipliers obey ; the equality Lagrange multipliers are unrestricted real numbers. Define the Lagrange dual function and dual optimal value byThe inner infimum keeps , but releases the displayed optimization constraints. It can be , giving an uninformative lower bound. A different domain changes the bound.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §§5.1.1–5.1.3, printed pp. 215–216: domain, Lagrangian, dual function and lower bounds
Here is the entire weak duality argument. For any feasible point and allowable Lagrange multipliers,The first inequality is the definition of an infimum; the second uses and . Taking the infimum over feasible , then the supremum over allowable Lagrange multipliers, gives . No convexity is used.
The Lagrange dual function is a concave function, since each fixed decision makes an affine function of the Lagrange multipliers.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §5.1.2, printed p. 216: pointwise infimum of affine functions
Explicitly, write and choose two points where is finite. For and every ,Taking the infimum over proves the defining concavity inequality. Thus even a difficult primal problem supplies a dual with useful geometry, although evaluating can itself be difficult.For finite optimal values, strong duality means , or zero duality gap. It need not imply dual attainment. For convex optimization, Slater's condition is a sufficient constraint qualification for both when is finite.[ref]
Convex Optimization by Stephen Boyd and Lieven Vandenberghe. §§5.2.2–5.2.3, printed pp. 225–227: gap, strong duality and Slater dual attainment
The Strong Lagrangian property requires an actual finite Lagrange multiplier achieving equality. Convex perturbation duality interprets such a bound as a supporting slope of the perturbed value function. Linear precision of a geometric basis 2026-10-14
A basis with the displayed identities reproduces affine functions from their values at the precision sites . For two such bases, the tensor-product precision sites are : summation independently recovers and . Affine images of this site grid therefore produce exact planar parameterizations, independent of the chosen control-grid representation.
Linear probability score Created 2026-10-07 Updated 2026-10-14
The linear probability score pays the reported probability of whichever binary outcome occurs. With report and observed , its reward isIt looks sensible: assign more probability to what happens and receive more reward. But the expected value under a Bernoulli distribution with true success probability isThis is an affine function of the report. When , the maximum over is at ; when , it is at . At , every report ties. Thus the linear probability score encourages reporting certainty about the more likely outcome and is not a proper scoring rule.
For the stipulated , the expected value of the reward is . Honest reporting earns in expectation, whereas earns . The forecaster improves expected reward by replacing a 70% forecast with a 100% forecast. The Brier score and logarithmic scoring rule avoid this incentive, as the expected-score diagram under proper scoring rule shows.
Linear resistive circuit 2026-10-14
A steady electrical circuit described by Ohm's law, Kirchhoff's current law, Kirchhoff's voltage law, and ideal independent electrical sources or linear dependent electrical sources. Fixed sources make the terminal response an affine function when the circuit equations admit a unique voltage for each prescribed terminal electric current.
Log-radius slope of the circle log-mean 2026-10-14
Fix a holomorphic function on a neighbourhood of a closed disk, with . On an interval of positive radii whose circles contain no zeros of a function, differentiating Jensen's formula with respect to givesEach interior zero of a function contributes slope one for each unit of its multiplicity of a zero. Between consecutive zero moduli, is an affine function; passing the modulus of a zero of multiplicity of a zero increases the adjacent slopes by . The finite sum defines a continuous convex function of whose values agree with the circle log-mean of a holomorphic function at every boundary-zero-free radius. This describes the adjacent line segments without asserting a boundary-singularity extension of the integral.
Midpoint quadrature rule Created 2026-10-03 Updated 2026-10-14
The midpoint quadrature rule replaces the integrand on , , by its value halfway across the interval:Geometrically, is the signed area of a rectangle with width and height . Its single quadrature node is and its quadrature weight is . Sampling in the interior is useful when endpoint evaluation is inconvenient, although an endpoint singularity can invalidate the quadrature error estimates below.
The midpoint quadrature rule is exact for every affine function : the average height over an interval equals its midpoint height. For example, on , gives and . Positive and negative area discrepancies cancel for a sloping straight line. For the polynomial on , however, and , giving approximation error . Thus its degree of precision of a quadrature rule is exactly one.[ref]
5.8 Numerical Integration. §5.8, printed p. 223: midpoint rectangles, linear exactness and signed quadratic errors
For the polynomial on , four panels give composite midpoint quadrature rule value and composite trapezoidal rule value , bracketing the exact integral . Individual midpoint rectangles can cross the curve; it is their total signed area that underestimates the integral.
For , meaning that its first two derivatives exist and are continuous functions on the closed interval, the signed approximation error has the formHence a convex function with is underestimated, and a concave function with is overestimated. A short justification uses the Taylor formula with integral remainder: writing , it gives , where for and for . This nonnegative Peano kernel has integral , so the weighted mean value theorem for integrals gives the stated sign and coefficient.
For and any taking the same values at at least two distinct knots, . To prove it, set , integrate by parts on each polynomial interval and use , , continuous and linear exterior pieces. Boundary terms cancel. Expanding the square proves the identity. Equality forces , so is an affine function and its two prescribed zeros make it identically zero.
Natural cubic spline interpolant 2026-10-05
For at least two distinct knots and values , the unique natural cubic spline matching those values and linear beyond . Its interpolation map is a linear map by uniqueness. Over a larger domain , the two exterior pieces remain linear. With only one knot, arbitrary slopes of affine functions make uniqueness false.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 23 1 b Solution Created 2026-10-03 Updated 2026-10-14
Risk neutrality means indifference between a random portfolio wealth and its certain expected value. For increasing twice differentiable expected utility preferences, this corresponds to an affine function with on the relevant wealth interval. Maximizing expected utility then amounts to maximizing expected return:The coefficient of is strictly negative. Consequently the unique optimum is : invest all initial wealth in equity. Risk neutrality here is a preference property, distinct from the pricing use of a risk-neutral measure.
Past exam of the mathematics course of the University of Cambridge 2001 iii Paper 6 2 Solution Created 2026-10-03 Updated 2026-10-14
Here is a finite real convex function on the whole real vector space; no topology or continuity is required. We prove the convex domination form of the Hahn-Banach theorem by extending across one vector. Suppose a linear functional is already dominated on a vector subspace and choose . For and positive , the proposed extension must satisfy the boundsTo prove compatibility, take and . The convex combination of and with weights and lies in . Domination there and convexity giveRearranging proves every lower candidate is at most every upper candidate. Also the candidates showThus both endpoints are finite, and some exists. For the upper bound gives domination of ; for the lower bound gives it; and for domination was assumed. This defines a dominated linear functional on extending .
Order all dominated extensions by inclusion of their domains and agreement of values. A chain has the union extension, still linear and dominated. By Zorn's lemma there is a maximal extension. The one-vector construction would enlarge any proper domain, so its domain is . Hence there is a full linear extension with . A convex function here need not be positively homogeneous; this is why the bounds included all positive .
Now fix . The translated convex function vanishes at zero. Apply the just-proved extension theorem to the zero linear functional on to obtain a linear functional with for every . SetThis is an affine function, satisfies for every , and has . Let . Every member is an affine minorant, while the member indexed by attains at . Thus the exact representation isThis is the finite convex function as supremum of affine minorants property. The linear functionals are algebraic; without a topology no assertion of continuous affine minorants is intended.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 70 2 i Solution Created 2026-10-03 Updated 2026-10-14
The degree- Bernstein basis on isThe associated Bézier curve is . The basis is nonnegative and has partition of unity, since . Thus the curve is a convex combination of its control points, giving the convex hull enclosure useful for geometric bounds. The same identity makes the construction invariant under application of affine functions.
It interpolates its endpoint controls, , , and its endpoint tangent vectors are and . These follow fromThe control polygon therefore gives direct geometric editing and tangent control. Repeated interpolation by the De Casteljau algorithm evaluates and subdivides the curve without converting to a monomial representation. Together, positive geometric weights, simple endpoint behavior and stable subdivision make this basis useful in computer aided geometric design.
Past exam of the mathematics course of the University of Cambridge 2004 iii Paper 70 4 ii Solution Created 2026-10-03 Updated 2026-10-14
Let . Every available mixed derivative factors:If the univariate factors have continuity and , the right-hand side has equal one-sided traces across a knot for , and across a knot for . Their products therefore remain continuous, including where knot lines cross. The basis and its surface inherit coordinate-wise continuity orders , and joint continuity. In particular, degree- and degree- B-splines at simple knots give and continuity in the respective directions. Higher continuity can occur through special coefficient cancellation, but is not generally guaranteed.
Nonnegativity passes to products. Their partition of unity follows fromThus the surface remains in the convex hull of its active control points and commutes with application of affine functions. The support is the Cartesian product of the two univariate supports, giving local rectangular influence regions and efficient local evaluation. Linear precision also passes independently in each coordinate. Clamped endpoint interpolation gives boundary curves determined by the outer rows/columns and corner interpolation; parameter-line curves inherit the corresponding univariate properties. These are the relevant inherited properties, rather than a claim of arbitrary global variation-diminishing behavior for surfaces.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 43 4 Solution Created 2026-10-03 Updated 2026-10-14
Let be the total exposure, and define the prior distribution expected value, prior variance and average binomial noise bySince the prior distribution has a probability density function on , and . All relevant moments exist because the parameter and observations are bounded. The binomial distribution givesThe law of total expectation, law of total variance and law of total covariance consequently yieldIn particular, conditional independence of the annual observations does not imply unconditional independence: they share the uncertain parameter.
To derive the optimal credibility estimate among affine functions of the observations, put and write . The conditional errors have zero conditional expectation, conditional variance , and zero pairwise conditional covariances. They are also uncorrelated with every integrable function of . Therefore the joint mean squared error isFor fixed slopes, the first term is uniquely minimized by . For fixed sum , the Cauchy-Schwarz inequality giveswith equality exactly when . Thus the remaining optimization is the strictly convex quadraticIts derivative vanishes at . Consequently the Bühlmann–Straub credibility estimate isThe individual coefficients are and . The strict quadratic minimizations establish global optimality and uniqueness, not just necessary equations. Here is the variance of hypothetical means, is the expected process variance, and is the Bühlmann–Straub credibility factor. More exposure gives more weight to the observed claim fraction. Since , the estimate remains between the observed pooled fraction and the prior expected value. If one separately permits a degenerate prior, leads to the constant estimate , interpreted as .
For the uniform distribution prior on ,With two years, put and . Then andTo compare with the Bayes estimator under squared error loss, use conditional independence to multiply the two binomial likelihood functions. Terms independent of cancel on normalization, and the uniform prior makes the posterior density proportional to . Hence Beta-binomial conjugacy givesFinally, for an arbitrary reported value , conditional quadratic loss decomposes asThe unique minimum is the posterior mean. Therefore the affine credibility estimate and the exact Bayesian estimate coincide in this case. The agreement illustrates exact beta-binomial credibility with unequal exposures; for a general prior distribution, minimizing over affine functions of the observations need not recover the unrestricted posterior mean.
Past exam of the mathematics course of the University of Cambridge 2006 iii Paper 66 4 b Solution Created 2026-10-03 Updated 2026-10-14
Orient the plane relative to the eye. For its affine function , assume and put . The desired closed half-space is . If the eye is on the plane, the notion of its side is undefined and a side convention must be supplied.
Apply recursive half-space clipping of a subdivision curve to each initial curve piece. Obtain a certified bounding volume , and calculate , . For a control-point convex hull, these extrema occur at its vertices, so this test is inexpensive. If , discard the piece. If , retain the whole piece and draw its chord only when its certified flatness is within the screen-space tolerance; otherwise subdivide and draw the children in parameter order. If , subdivide and repeat the classification.
At a sufficiently flat and sufficiently short terminal piece, clip the approximating chord from to against . If both endpoints are nonnegative retain the chord; if both are negative discard the chord; for opposite signs split it atRetain the portion with nonnegative . Handle an endpoint exactly on the plane without dividing by zero, and retain a coplanar chord under the closed-half-space convention. The recursion yields an ordered polyline rather than connecting endpoints of disconnected retained pieces.
Crucially, do not reject an unresolved whole curve merely because its endpoints have negative signs: it can cross the plane twice and have a visible interior excursion. The preceding terminal chord rule is a rendering approximation at an explicitly chosen spatial tolerance. A flatness bound and a diameter bound make any missed leaf-sized excursion spatially small; they do not prove exact crossing topology, especially for a near-tangent contact or an unfavorable projection. Use the actual viewing projection to enforce a screen-space tolerance, with special handling near a perspective singularity.
If exact clipping intervals are required for a spline representation, isolate all roots of , split at them and classify each intervening interval. Bernstein basis coefficient bounds, derivative bounds and recursive subdivision can isolate roots on polynomial spans, including even-multiplicity tangencies. Treat identically coplanar spans separately. For a general subdivision curve, keep unresolved straddling pieces flagged or refine to the chosen tolerance instead of claiming that a finite endpoint-sign test is exact. Certified half-space rejection combined with adaptive subdivision is the recursive drawing algorithm; exact boundary topology needs additional root isolation.
Past exam of the mathematics course of the University of Cambridge 2007 iii Paper 49 1 Solution Created 2026-10-03 Updated 2026-10-14
A cubic spline belongs to and is a polynomial of degree at most three on each interval separated by the spline knots. A natural cubic spline is additionally an affine function on the exterior intervals and . On this is equivalent to the endpoint conditions ; these conditions remain part of the definition when an outer knot coincides with or .
Let be the natural cubic spline interpolant of the prescribed values, and let be any other interpolating function. Set , so . On the interval , integration by parts twice givesbecause the fourth derivative of each cubic piece is zero. The second boundary term is zero because vanishes at the spline knots. After summing the first terms, the interior contributions cancel by continuity of and , and the two remaining terms vanish by the natural endpoint conditions. On the exterior intervals . Thus , and the second derivative roughness penalty satisfiesIf equality holds, the continuous nonnegative function has zero integral, so everywhere. Hence is an affine function, and its zeros at two distinct spline knots force . This proves the minimum roughness property of the natural cubic spline interpolant and its equality case: the unique minimum-roughness interpolant is .
For the fixed-design nonparametric regression fit, use the penalized least squares criterionLet be the natural cubic spline interpolant with value vector . Replacing by for leaves the residual sum unchanged and reduces the second derivative roughness penalty, strictly unless . It therefore remains to minimize the finite-dimensional quadratic formThe supplied spline roughness penalty matrix is positive semidefinite. For every nonzero vector ,Consequently is a positive-definite matrix, and is strictly convex. Its normal equations for linear least squares have the unique solutionThe preceding strict reduction also proves uniqueness over the whole class , not just over the natural cubic splines. This is the cubic smoothing spline. If the residual criterion is divided by instead, the corresponding formula is , reflecting a change in the numerical convention for the smoothing parameter.
The independence and specified error mean and variance are not needed for existence or uniqueness of this minimizer. They do imply, with smoothing matrix and , that and . The null space of consists of sampled affine functions: these have zero roughness, and conversely zero roughness forces their natural cubic spline interpolant to be an affine function. Thus these functions are reproduced without bias of an estimator, while other components are smoothed.

