Alphabeta Math
Pipeline-generated
How statement and proof provenance work

The first chip identifies the source of the statement or construction; the second identifies the source of its local proof or verification.

  • Literature-sourced: the exact statement appears in a cited source; only wording and notation differ.
  • AI-adapted: a semantically identical restatement of literature-sourced material, modulo indexing, notation, and boundary cases adopted by the library.
  • AI-generated: a genuinely novel statement formulated by AI, with no source for the claim itself.

These labels describe origin, not correctness: citations and verification chips remain separate evidence.

✓ 3 results · all verified · 2 also independently AI-judged
Every result on this page is machine-checked by a proof checker and read in full and owner-audited; the judge is an additional, independent cross-model AI review of the proofs. The 1 not AI-judged were verified by owner audit (typically over a confirmed judge false positive), not failures.

Bagging and random forests — Examples

1 · Prerequisites

2 · Logical flowchart

3 · Definitions, theorems and proofs

None yet.

4 · Examples, counterexamples and false statements

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

A zero-margin bootstrap forest need not approach strict-margin risk

Example

Use classification labels 0<1 and the fixed training sample D=((x1,0),(x2,1)) with x1=(0,1) and x2=(1,0). Grow trees with depth cap 1 and one uniformly selected feature at the root, along with the size-2 bootstrap samples in the bagged random-forest algorithm. Let Θb be IID tree randomizations with common law Q, write pc(x)=Q{h(x,Θb)=c}, and define m(x,y)=py(x)−max⁡c≠ypc(x). Let the test pair have the point-mass law at (x∗,Y)=((1/4,1/4),1), and for B trees let GB(x) be their majority vote with class 0 breaking a tie and PEB=1{GB(x∗)≠1}. Then each randomized tree predicts class 1 at x∗ with probability 1/2, so m(x∗,1)=0 and P{m(X,Y)<0}=0. For every odd B, PEB has expectation 1/2 over the tree randomizations; consequently it cannot converge almost surely to the strict-margin value 0.

For a mixed bootstrap sample, the two possible root splits and their leaf labels are shown below. In each tree the left child is selected when the displayed feature is at most 1/2, and the right child otherwise. The test point lies in the left child of both trees, whose labels differ. The diagram records these two CART cases; the verification derives the risk from the finite randomization counts and does not rely on the diagram.

diagram failed to render:
\begin{tikzpicture}[level distance=10mm,sibling distance=18mm]
  \node[draw] at (0,0) {$x_1\le\tfrac12$}
    child {node[draw] {$0$}}
    child {node[draw] {$1$}};
  \node[draw] at (6,0) {$x_2\le\tfrac12$}
    child {node[draw] {$1$}}
    child {node[draw] {$0$}};
\end{tikzpicture}

Facts & Assumptions

Given: The sample and test law in the Example, independent bootstrap samples of size 2, and independent uniform one-feature choices at each tree root.

[F1]

Bagged random-forest construction on a fixed finite sample: A bootstrap sample contains Nbi copies of training observation i, and a node uses its independently drawn feature subset when forming split candidates.

[F2]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

[F3]

Dominated convergence: Almost-everywhere convergence under a common integrable majorant implies convergence of the integrals.

[F4]

Almost-sure limiting risk of an infinite random-forest classifier: The stated conditional-risk limit assumes that the zero-margin test-pair set has probability zero.

Verification

1.1givenF1algebra

There are four equally likely ordered bootstrap draws. The count vectors (2,0) and (0,2) each have probability 1/4, and the mixed count vector (1,1) has probability 1/2.

2.1givenF1step 1.1algebra

With counts (2,0) the only leaf predicts 0, and with counts (0,2) it predicts 1. With mixed counts, either feature separates the two training points at 1/2. The selected feature is uniform: feature 1 sends x∗ to the class-0 leaf, while feature 2 sends it to the class-1 leaf. Hence Q{h(x∗,Θ)=1}=1/4+(1/2)(1/2)=1/2.

3.1givenF2F4step 2.1algebra

At the point-mass test pair, p0(x∗)=p1(x∗)=1/2, so m(x∗,1)=0 and P{m<0}=0; the zero-margin hypothesis in [F4] fails. For every odd B, the class-1 vote count has a symmetric binomial law with no tie; exactly half of its outcomes are below B/2. The conditional risk is the error indicator at this single test pair, so EQ[PEB]=1/2.

4.1F3step 3.1algebra∎

If PE2k+1→0 almost surely, then the bounded random variables PE2k+1∈[0,1] would have expectations tending to zero by [F3]. This is incompatible with step 3.1, so the full risk sequence cannot converge almost surely to the strict-margin value 0.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passjudge pass (gpt-6-luna)Open item page →

An out-of-bag prediction can differ from the full finite forest

Example

Take the classification sample D=((0,0),(1,1)) with ordered labels 0<1, grow depth-zero trees, and use B=2 bootstrap trees. A tree is out of bag for observation 1 exactly when its bootstrap count for training index 1 is zero. On the event that the first bootstrap count vector is (2,0) and the second is (0,2), the full forest receives one vote for each class and predicts 0 by the least-index tie rule. The out-of-bag set for observation 1 is then {2}, so its out-of-bag prediction is 1. This event has probability 1/16, and it exhibits a finite-forest out-of-bag prediction that differs from the full finite-forest prediction.

Facts & Assumptions

Given: Two independent size-2 bootstrap samples drawn uniformly with replacement from the two-observation training sample, with depth cap zero and the class tie rule in the Example.

[F1]

Bagged random-forest construction on a fixed finite sample: The out-of-bag set for observation i consists exactly of tree indices b with Nbi=0, and no prediction is returned when this set is empty.

[F2]

Empirical axis-aligned binary decision trees: A classification leaf predicts the most frequent class, choosing the least class index in a tie.

[F3]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

Verification

1.1givenF1F3algebra

Each tree draws two independent uniform indices from {1,2}. The probability of counts (2,0) for tree 1 is 1/4, and the probability of counts (0,2) for tree 2 is 1/4. Independence of the two trees gives probability (1/4)(1/4)=1/16 for the stated event.

2.1givenF2step 1.1

With depth cap zero, each tree is a single leaf. Its bootstrap sample contains only label 0 for counts (2,0) and only label 1 for counts (0,2), so [F2] gives predictions 0 and 1, respectively.

3.1F1step 1.1step 2.1algebra∎

The full forest has one vote for each class, so its least-index tie rule returns 0. For observation 1, the first tree has N11=2 and is excluded from the out-of-bag set, while the second has N21=0 and is the only included tree; its prediction is 1. The two predictions differ on the positive-probability event from step 1.1.

ExampleConstruction: AI-generatedVerification: AI-generatedprecheck passOpen item page →

A two-stump strength and correlation calculation

Example

Let X∈{0,1}, Y=X, with P(X=0,Y=0)=3/4 and P(X=1,Y=1)=1/4. Conditional on fixed training data, let each randomized tree independently be the constant class-0 stump with probability 3/4 and the constant class-1 stump with probability 1/4. For a randomization θ, write pc(x)=Q{h(x,θ)=c}; for y∈{0,1} define m(x,y)=py(x)−p1−y(x), s=E[m(X,Y)], and PE∗=P{m(X,Y)<0}. For each tree set rθ(x,y)=1{h(x,θ)=y}−1{h(x,θ)=1−y} and sd(θ)=Var⁡X,Y(rθ(X,Y)). For independent randomizations Θ,Θ′ let d=EQsd(Θ) and ρ=EQ×Q[Cov⁡X,Y(rΘ,rΘ′)]/d2. Then the limiting margins at the two test pairs are m(0,0)=1/2 and m(1,1)=−1/2, so s=1/4 and PE∗=1/4. Each tree's raw-margin standard deviation is 3/4, the covariance numerator defining ρ is 3/16, and ρ=1/4. The strength-correlation bound has right-hand side 15/4 in this example.

Facts & Assumptions

Given: The test law and independent two-stump randomization law in the Example.

[F1]

Bagged random-forest construction on a fixed finite sample: A regression or classification forest aggregates trees with a fixed class order, and a classification tree casts one class vote.

[F2]

Breiman's random-forest strength–correlation error bound: The strength is s=EPm, tree standard deviations are sd(θ)=Var⁡P(rθ), and for d>0 the correlation parameter is the expected independent-pair covariance divided by d2.

[F3]

Expectation of a nonnegative or integrable random variable: Expectation on a probability space is integration against its probability measure.

[F4]

Moments, variance, and covariance on a probability space: Variance and covariance are expectations of the corresponding centered products.

[F5]

Independent random elements have product joint law: The joint law of a finite independent family of random elements is the product of their marginal laws.

Verification

1.1F1F2F3algebra

By the tree-vote convention [F1], at Z=(0,0) the correct class receives probability 3/4 and the wrong class 1/4, giving margin 1/2. At Z=(1,1), the correct class receives probability 1/4 and the wrong class 3/4, giving margin −1/2. Therefore s=(3/4)(1/2)+(1/4)(−1/2)=1/4 and PE∗=1/4.

1.2F2F3F4algebra

For tree type A, the raw margin is +1 at (0,0) and −1 at (1,1); its mean is 1/2 and its second moment is 1, so its variance is 3/4. Type B reverses the two signs, giving mean −1/2 and the same variance 3/4. Thus sd(A)=sd(B)=3/4 and d2=3/4.

2.1F2F4F5step 1.2algebra

The independent pair has probabilities P(A,A)=9/16, P(B,B)=1/16, and total mixed probability 6/16. The covariance over Z is 3/4 for equal types and −3/4 for mixed types, so its expectation is [(9+1−6)/16](3/4)=3/16. By [F2] and [F5], ρ=(3/16)/(3/4)=1/4.

3.1F2step 1.1step 2.1algebra∎

Substitution gives ρ(1−s2)/s2=(1/4)(15/16)/(1/16)=15/4, and the example's error 1/4 satisfies the bound.

Sources