Lite / Intelligent Robotic Systems / Week 32
How many runs is enough?
One run says the new filter halves the error. The next run says it makes things worse. How many runs before you believe either?
Why should I care?
Noisy sensors and random disturbances mean any single run can mislead. Repeating trials estimates how much results wobble, and the standard error tells you how many runs you need before a difference stands out from the wobble.
- Report repeated trials as mean ± standard deviation with n.
- Use the standard error to choose a number of trials.
- Explain why seeds and randomised run order make trials fair and repeatable.
Predict
To halve the uncertainty (standard error) of a mean, how many more trials do you need?
- Twice as many
- Four times as many
- One more
Guess first, then reveal
Four times as many, because SE = SD/√n. Doubling √n means quadrupling n. Precision gets expensive fast.
Discover
Run the fusion lab several times with the same settings but different noise. Note the final error each time, then compute the mean and SD of five runs by hand. Change the noise level and repeat: how does the SD change?
What the interactive shows (text version)
In the fusion lab, repeating a run with different noise gives slightly different final errors; their standard deviation grows with the noise setting.
Understand
Mean ± SD, with n
Report repeated trials as mean ± standard deviation (n = …). The sample SD, √(Σ(x − x̄)²/(n − 1)), describes how much single runs vary. Always state n and whether the ± is SD or SE.
Standard error and sample size
The standard error SE = SD/√n describes how uncertain the mean is. To reach a target SE, you need n ≥ (SD/target)². Run a few pilot trials to estimate the SD, then choose n so the SE is small compared with the difference you care about.
Seeds and run order
In simulation, a seed fixes the random noise and disturbances, so a run can be repeated exactly and both methods can face identical conditions. On hardware, randomise the run order so drifts (battery, temperature, wear) spread across conditions instead of favouring one.
Explain it another way
Intuitive
One coin toss tells you little about a coin; a hundred tell you a lot. Each extra toss helps a bit less than the last.
Technical
Sample means are themselves random; their spread shrinks as 1/√n. Seeded simulations remove nuisance variation between conditions (common random numbers), which makes comparisons much more sensitive.
Mathematical
Pilot SD = 4 cm, target SE = 1 cm: n ≥ (4/1)² = 16. Target 0.5 cm: n ≥ 64.
Applied
Simulation studies of controllers and planners typically run every method on the same list of seeds and report the mean and spread across them.
Worked example 1
Five docking errors: 12, 15, 11, 14, 13 mm. Report them.
Mean = 65/5 = 13 mm. Deviations −1, 2, −2, 1, 0; squares sum 10; SD = √(10/4) ≈ 1.58 mm. Report 13.0 ± 1.6 mm (mean ± SD, n = 5). SE = 1.58/√5 ≈ 0.71 mm.
Common mix-ups
More trials make the robot more consistent.
✓ More trials make your estimate of the mean more precise; the SD of single runs stays about the same.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Run five pilot trials of any lab or Build metric, compute mean ± SD, and use it to choose n for an SE of one tenth of the mean. State whether that n is affordable.
Reflect
When would you accept fewer trials than the formula suggests?
Write your answer on paper or in your own notes. Lite never stores what you write.