WHY MATHEMATICS?
Why Mathematics? | Maximum Mean Discrepancy: RKHS Witness Functions, Kernel Bandwidth, Two-Sample Testing and Forecast Evaluation
How MMD compares two distributions through kernel means, with a complete two-sample calculation, testing limits and responsible uses in AI.
Why mathematics is important becomes easier to see when a real decision depends on it. This guide follows the mechanism from definitions and dimensions to a worked calculation, validation, practical learning and responsible use. It keeps factual evidence separate from interpretation and treats every illustrative scenario as an example rather than a promise of results.
Choose a reading route
- Embed two distributions through kernel expectations
- Calculate within-sample and cross-sample similarities
- Use witness functions to localise differences
- Separate discrepancy magnitude, null calibration and practical importance
Chapter map
- 1. Samples
- 2. Kernel
- 3. P self terms
- 4. P mean
- 5. Q self terms
- 6. Cross terms
- 7. Squared MMD
- 8. MMD
- 9. Witness function
- 10. Null hypothesis
- 11. Permutation
- 12. Unbiased form
- 13. Sample size
- 14. Preprocessing
- 15. Forecast link
- 16. Claim
Visit the How Mathematics Works hub for the wider series and its connections to education, reasoning, science, computing, design and careers.
1. Samples
A small example makes the mechanism visible. Use P={0,2} and Q={1,1}.
A concrete situation
Treat them as two empirical distributions.
What the mathematics does not license
Dependence changes test calibration. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
State sampling. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
2. Kernel
This is where modelling choices begin to affect evidence. Use Gaussian bandwidth one.
A concrete situation
Keep the same kernel for all terms.
What the mathematics does not license
Bandwidth controls sensitivity. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Freeze choice. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
3. P self terms
The central mathematical idea is concrete. Calculate 1,exp(-2),exp(-2),1.
A concrete situation
Use all four ordered pairs.
What the mathematics does not license
This is the biased V-statistic form. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Name estimator. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
4. P mean
Here the geometry becomes operational. Average the four terms.
A concrete situation
Result is about .5677.
What the mathematics does not license
Do not replace with an unordered mean silently. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Show denominator. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
5. Q self terms
This step deserves a careful pause. All four Q similarities equal 1.
A concrete situation
Mean is 1.
What the mathematics does not license
Duplicate observations affect the empirical distribution. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Retain duplicates. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
6. Cross terms
The useful question is not only how to calculate, but what the calculation assumes. Each P-Q similarity is exp(-.5).
A concrete situation
Cross mean is about .6065.
What the mathematics does not license
Use mn cross pairs. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Audit count. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
7. Squared MMD
A small example makes the mechanism visible. Add .5677+1-2(.6065).
A concrete situation
Result is about .3546.
What the mathematics does not license
This number is not a p-value. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Label statistic. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
8. MMD
This is where modelling choices begin to affect evidence. Take square root if reporting unsquared form.
A concrete situation
Value is about .5955.
What the mathematics does not license
State squared or unsquared. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Keep units abstract. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
9. Witness function
The central mathematical idea is concrete. Subtract kernel mean embeddings over z.
A concrete situation
Locate regions of difference.
What the mathematics does not license
Witness shape depends on kernel. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Plot honestly. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
10. Null hypothesis
Here the geometry becomes operational. State P=Q at population level.
A concrete situation
Separate equality from model usefulness.
What the mathematics does not license
Failure to reject is not proof of equality. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Bound inference. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
11. Permutation
This step deserves a careful pause. Shuffle labels only when exchangeability under null is valid.
A concrete situation
Recompute statistic.
What the mathematics does not license
Time dependence can invalidate ordinary permutations. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Use blocks if justified. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
12. Unbiased form
The useful question is not only how to calculate, but what the calculation assumes. Exclude within-sample diagonals.
A concrete situation
Know it can be negative in finite samples.
What the mathematics does not license
Population MMD squared remains nonnegative. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Explain distinction. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
13. Sample size
A small example makes the mechanism visible. Report m and n.
A concrete situation
Assess power and uncertainty.
What the mathematics does not license
Small samples can miss meaningful differences. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Avoid certainty. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
14. Preprocessing
This is where modelling choices begin to affect evidence. Freeze scaling and feature extraction.
A concrete situation
Apply equally to both samples.
What the mathematics does not license
Learned preprocessing can leak labels. Keeping this boundary clear makes the result easier to audit and transfer.
Try it, check it, transfer it
Separate training. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
15. Forecast link
The central mathematical idea is concrete. Use MMD for batch distribution comparison.
A concrete situation
Distinguish one-case kernel scoring.
What the mathematics does not license
Related geometry does not erase different estimands. A trustworthy workflow records the choice before seeing the final test result.
Try it, check it, transfer it
Name intent. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
16. Claim
Here the geometry becomes operational. Name kernel, bandwidth, estimator and calibration.
A concrete situation
Teaching squared MMD is .3546.
What the mathematics does not license
Do not infer cause from distribution difference. Evidence becomes stronger when the limitation is tested instead of hidden.
Try it, check it, transfer it
Bound conclusion. Then explain the result to someone who has not seen the formula. If the explanation needs a hidden assumption, add that assumption to the model record.
Did You Know? In this chapter, the most important number is useful only together with its construction rule. Changing scaling, sample membership or validation design can change the numerical answer without changing the arithmetic.
A seven-day practice lab
- Day 1: define the decision, observation unit, X variables and Y or reference condition.
- Day 2: reproduce the smallest worked example and check every dimension, unit and sign.
- Day 3: build a transparent baseline and write what it assumes.
- Day 4: fit the main method inside a training-only pipeline; record every parameter.
- Day 5: challenge one assumption with a deliberately difficult dataset or operating regime.
- Day 6: compare validation metrics with the practical workload created by errors.
- Day 7: present one supported conclusion, one unresolved uncertainty and one safe next experiment.
Questions for a student, parent or mentor
- Which part of the model is a mathematical definition, and which part is a choice?
- What small calculation would catch a sign, scale or dimension error?
- What evidence comes from training, validation and the untouched test?
- What benign condition could look like a fault or prediction failure?
- How would the answer change for another response, asset, school project or time period?
- What should a human review before acting on the score?
A method-specific audit before deployment
Maximum mean discrepancy compares two probability distributions by finding the largest difference in expected function value over the unit ball of a reproducing-kernel Hilbert space. With a characteristic kernel, zero population MMD identifies equal distributions. Gretton and colleagues developed kernel two-sample tests around this idea, including quadratic-time statistics, asymptotic results and distribution-free procedures under stated conditions.
Take forecast sample P={0,2}, reference sample Q={1,1} and the Gaussian kernel with bandwidth one. The biased within-P average is (1+exp(-2)+exp(-2)+1)/4≈.5677. The within-Q average is 1. Every cross similarity is exp(-.5), so the cross average is about .6065. The biased squared MMD is .5677+1-2(.6065)=.3546. It is a sample discrepancy, not a p-value.
The witness function shows where the distributions differ by subtracting their kernel-smoothed mean embeddings. Statistical significance needs a null calibration such as a valid permutation procedure, and practical importance needs domain context. Bandwidth, dependence, sample size and preprocessing can change power. The unbiased estimator can be negative in finite samples even though population squared MMD is nonnegative.
A responsible comparison separates forecast cases from model-training data, freezes the kernel and bandwidth policy, matches outcome units, respects time or spatial dependence and reports uncertainty or a calibrated test. MMD between two batches is distinct from scoring one forecast distribution against one realised case, even though the same kernel geometry links both ideas. Students can transfer the method to simulation checks, generative AI, sensor distributions and dataset shift without treating one statistic as automatic proof of cause or usefulness.
Frequently asked questions
What does MMD compare?
Two probability distributions through the largest RKHS expectation difference.
When does zero identify equality?
At population level with a characteristic kernel on the stated class.
Is squared MMD a p-value?
No. A test needs a valid null calibration.
Why use a witness function?
It shows where kernel-smoothed distribution differences occur.
Can an unbiased estimate be negative?
Yes in finite samples even though population squared MMD is nonnegative.
What must be reported?
Samples, dependence, preprocessing, kernel, bandwidth, estimator, calibration, uncertainty and effect interpretation.
Primary source and fact-check note
Arthur Gretton, Karsten M. Borgwardt, Malte J. Rasch, Bernhard Schölkopf and Alexander Smola, “A Kernel Two-Sample Test,” Journal of Machine Learning Research 13(25), 723–773 (2012). Definitions and core claims in this article were checked against this primary publication. Calculations shown here were independently recomputed. Examples are educational illustrations; they are not reported industrial performance results.
Useful next reading
- Kernel scores for individual forecasts
- Energy score
- Variogram score
- How Uncertainty Quantification Works
- Mathematics World at Bukit Timah Tutor
Keep the options open. Mathematics education supports clearer questions, transferable problem-solving skills and informed choices across science, engineering, computing, AI, statistics, design and many other careers. It does not guarantee intelligence, income, admission or employment; those outcomes depend on far more than one subject or model.
Extended laboratory: score-specific validation and responsible use
Target audit
Freeze whether the task scores one realised case, estimates an unnormalised density or compares two sample distributions; keep these estimands separate.
Formula audit
Write every logarithm, derivative, Laplacian, expectation, kernel term, self-pair, cross-pair, constant and denominator explicitly.
Computation audit
Reproduce the teaching arithmetic independently and test code on identical distributions, a shifted point, a zero probability and a known normal shape.
Support audit
Check event categories, continuous units, density support, smoothness, boundary conditions, sample dependence and feature scaling.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Tuning audit
Predeclare clipping, derivative convention, kernel family, bandwidth, estimator and preprocessing; do not tune them to obtain a preferred ranking.
Companion audit
Add calibration, marginal or distance-based evidence so one local, derivative or kernel total cannot stand for every forecast property.
Uncertainty audit
Use matched cases, valid permutations or dependence-aware resampling according to the estimand; report finite-sample limits.
Final claim
Describe the exact probability, density-shape or distributional feature supported by the analysis and stop before causal or universal claims.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Mechanism workshop: calculate, challenge and transfer
Workshop 1: Samples
Begin with this mechanism: Use P={0,2} and Q={1,1}. Recreate the concrete case: Treat them as two empirical distributions. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Dependence changes test calibration. Complete the transfer step: State sampling. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 2: Kernel
Begin with this mechanism: Use Gaussian bandwidth one. Recreate the concrete case: Keep the same kernel for all terms. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Bandwidth controls sensitivity. Complete the transfer step: Freeze choice. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 3: P self terms
Begin with this mechanism: Calculate 1,exp(-2),exp(-2),1. Recreate the concrete case: Use all four ordered pairs. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: This is the biased V-statistic form. Complete the transfer step: Name estimator. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 4: P mean
Begin with this mechanism: Average the four terms. Recreate the concrete case: Result is about .5677. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Do not replace with an unordered mean silently. Complete the transfer step: Show denominator. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 5: Q self terms
Begin with this mechanism: All four Q similarities equal 1. Recreate the concrete case: Mean is 1. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Duplicate observations affect the empirical distribution. Complete the transfer step: Retain duplicates. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 6: Cross terms
Begin with this mechanism: Each P-Q similarity is exp(-.5). Recreate the concrete case: Cross mean is about .6065. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Use mn cross pairs. Complete the transfer step: Audit count. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 7: Squared MMD
Begin with this mechanism: Add .5677+1-2(.6065). Recreate the concrete case: Result is about .3546. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: This number is not a p-value. Complete the transfer step: Label statistic. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 8: MMD
Begin with this mechanism: Take square root if reporting unsquared form. Recreate the concrete case: Value is about .5955. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: State squared or unsquared. Complete the transfer step: Keep units abstract. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 9: Witness function
Begin with this mechanism: Subtract kernel mean embeddings over z. Recreate the concrete case: Locate regions of difference. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Witness shape depends on kernel. Complete the transfer step: Plot honestly. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 10: Null hypothesis
Begin with this mechanism: State P=Q at population level. Recreate the concrete case: Separate equality from model usefulness. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Failure to reject is not proof of equality. Complete the transfer step: Bound inference. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 11: Permutation
Begin with this mechanism: Shuffle labels only when exchangeability under null is valid. Recreate the concrete case: Recompute statistic. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Time dependence can invalidate ordinary permutations. Complete the transfer step: Use blocks if justified. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 12: Unbiased form
Begin with this mechanism: Exclude within-sample diagonals. Recreate the concrete case: Know it can be negative in finite samples. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Population MMD squared remains nonnegative. Complete the transfer step: Explain distinction. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Did You Know? A sophisticated adjustment can be algebraically correct and still answer the wrong scientific question when samples, labels, batches or validation boundaries are wrong.
Workshop 13: Sample size
Begin with this mechanism: Report m and n. Recreate the concrete case: Assess power and uncertainty. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Small samples can miss meaningful differences. Complete the transfer step: Avoid certainty. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 14: Preprocessing
Begin with this mechanism: Freeze scaling and feature extraction. Recreate the concrete case: Apply equally to both samples. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Learned preprocessing can leak labels. Complete the transfer step: Separate training. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 15: Forecast link
Begin with this mechanism: Use MMD for batch distribution comparison. Recreate the concrete case: Distinguish one-case kernel scoring. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Related geometry does not erase different estimands. Complete the transfer step: Name intent. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.
Workshop 16: Claim
Begin with this mechanism: Name kernel, bandwidth, estimator and calibration. Recreate the concrete case: Teaching squared MMD is .3546. Write sample labels, outcome units, kernel values, bandwidth, within-sample means, cross means, squared MMD, test calibration and uncertainty with units, signs, identifiers and assumptions. Calculate the smallest non-trivial example by hand and reproduce it independently. Challenge this limitation: Do not infer cause from distribution difference. Complete the transfer step: Bound conclusion. Change exactly one probability, support point, log base, density unit, clipping floor, observation, derivative, boundary condition, kernel, bandwidth, member, sample size, self-pair rule, feature scale, permutation scheme or dependence assumption. Explain which mathematical object changes, which score or discrepancy term moves, which ranking survives and which claim must weaken. Keep target definition, calculation, aggregation, uncertainty and interpretation on separate notebook lines. Explain the result once to a student with full arithmetic and once to a parent with the real decision and original units. Add a counterexample involving zero support, an unreported unit change, a nonsmooth density, a failed boundary condition, a noncharacteristic kernel, bandwidth collapse, duplicate samples, invalid permutations or a statistically detectable but practically tiny difference. State the extra evidence that would separate the explanations. Finish with one supported sentence, one unsupported sentence and one useful next measurement.