Noise and filtering · University · about 25 min
Mean, standard deviation, and what one number from a sensor is actually telling you.
[1 mark]A still robot's depth readings have mean 57.0 cm and standard deviation 2.0 cm, and are Gaussian. About what fraction of readings land between 55 and 59 cm?
[1 mark]Same sensor: mean 57.0 cm, sigma 2.0 cm. About what percentage of readings fall outside 51 to 63 cm? Give a percentage to one decimal place.
[1 mark]This computes the mean and sigma exactly as the lesson does. What does it print?
readings = [56, 58, 60, 62, 64] mean = sum(readings) / len(readings) var = sum((r - mean) ** 2 for r in readings) / len(readings) sigma = var ** 0.5 print(mean, var, round(sigma, 2))
[1 mark]A sensor gives readings with sigma 0.3 cm, but their mean is 4 cm short of a tape-measured distance. What will fix it?
[1 mark]A student reads the depth sensor 100 times in a tight loop with no wait and gets sigma = 0.4 cm, much smaller than with a 0.1 s wait. Why is that number a lie?
[1 mark]A reading's spread is described by its standard deviation. What is the name of its square, measured in squared units?
Standing still, print mean: and sigma: for this sensor, in centimetres.
from bugbot import * connect() readings = []
Plan your program here, then type it in and press Run.