Weights, Estimate, and Effective Sample Size
Weights, Estimate, and Effective Sample Size
Ada re-derives this chapter’s own numbers step by step, at full precision
ADA · CALCULATION AUDIT
Weights, Estimate, and Effective Sample Size
The chapter runs a five-particle filter against a 10.0 m measurement and produces a weighted estimate of 10.02 m, then tests whether that vote has collapsed with an effective sample size of 2.31 particles against a 2.5 resampling threshold. A particle filter is a weighted vote, and every step is auditable arithmetic. This audit confirms the weights, the estimate, and the effective sample size that decides when to resample.
Companion to the chapter Particle Filters for Localization — every number here comes from that chapter.
See the relationship before changing it
The figure reads from left to right. The blue card is resampling threshold. The middle card applies the page rule. The green card is threshold. Walk the arrows once: set the input, apply the rule, then read the result with its unit.
Derive the baseline in four named moves
- 1
Name the input. The chapter baseline is 50 % of 5 particles.
- 2
Name the relationship. threshold = fraction x 5 particles
- 3
Substitute with units. 50 / 100 x 5 particles = 2.50 particles
- 4
Read the result. Keep the unit beside the value. Use it only inside the technical boundary on this page.
Predict, then change resampling threshold
Try Predict the direction of threshold = fraction x 5 particles. Test another resampling threshold, then compare threshold.
Observe A higher threshold resamples sooner. It does not change the measured effective sample size. Reset resampling threshold to 50 and compare threshold.
Explain A higher threshold resamples sooner. It does not change the measured effective sample size.
Check yourself
What should you do before trusting a moved-control result?
What does this small model leave out?
The chapter runs a five-particle filter against a 10.0 m measurement and produces a weighted estimate of 10.02 m , then tests whether that vote has collapsed with an effective sample size of 2.31 particles against a 2.5 resampling threshold. Calculate this case.
This audit confirms the weights, the estimate, and the effective sample size that decides when to resample. Check shows this.
The audit conclusion is narrow: the estimate 10.02 m is trustworthy here because ESS 2.31 out of 5 is only just below the trigger, so several particles still carry weight. Report ESS with every estimate — when it falls toward 1, the same weighted-mean formula is quietly speaking for a single surviving hypothesis. Check confirms it.
Technical boundaries
The fixed inputs for “Weights, Estimate, and Effective Sample Size” omit proposal mismatch, resampling variance, particle impoverishment, non-linear motion constraints, map error, or compute-time limits; “Weights, Estimate, and Effective Sample Size” therefore reports only its named fixtures.
Ada: A particle filter is a weighted vote, and the whole thing is auditable arithmetic. Let me confirm the weights, the estimate, and the resampling trigger using only the stated values.
The measurement is 10.0 m with sigma 1.0 m, and the five predicted particles are at 8.8, 9.5, 10.2, 11.0, and 12.0 m. Each relative likelihood is exp(-0.5 x error^2 / sigma^2) with sigma^2 = 1.0:
- x = 8.8, error -1.2:
exp(-0.5 x 1.44) = exp(-0.72) = 0.486752, about0.487. - x = 9.5, error -0.5:
exp(-0.5 x 0.25) = exp(-0.125) = 0.882497, about0.882. - x = 10.2, error +0.2:
exp(-0.5 x 0.04) = exp(-0.02) = 0.980199, about0.980. - x = 11.0, error +1.0:
exp(-0.5 x 1.00) = exp(-0.5) = 0.606531, about0.607. - x = 12.0, error +2.0:
exp(-0.5 x 4.00) = exp(-2.0) = 0.135335, about0.135.
Sum of likelihoods: 0.486752 + 0.882497 + 0.980199 + 0.606531 + 0.135335 = 3.091314, rounded to 3.091. Dividing each likelihood by that sum gives the normalized weights 0.157, 0.285, 0.317, 0.196, 0.044. The weighted estimate is:
8.8 x 0.157458 + 9.5 x 0.285476 + 10.2 x 0.317082 + 11.0 x 0.196205 + 12.0 x 0.043779 = 10.015492 m, about10.02 m.
Effective sample size then tests whether that vote has collapsed. For weights 0.62, 0.18, 0.10, 0.06, 0.04:
sum of squares = 0.62^2 + 0.18^2 + 0.10^2 + 0.06^2 + 0.04^2 = 0.3844 + 0.0324 + 0.0100 + 0.0036 + 0.0016 = 0.432000ESS = 1 / 0.432000 = 2.314815, about2.31particles.- Threshold
0.5 x N = 0.5 x 5 = 2.5. Since2.31 < 2.5, resample.
The audit conclusion is narrow: the estimate 10.02 m is trustworthy here because ESS 2.31 out of 5 is only just below the trigger, so several particles still carry weight. Report ESS with every estimate — when it falls toward 1, the same weighted-mean formula is quietly speaking for a single surviving hypothesis.
Every number above is taken from the chapter’s own material and re-derived step by step.