TactivergeLite

Lite / Discovering How the World Works / Week 8

Every sensor jitters

A thermostat reads 19.8 °C, then 20.3 °C, then 19.6 °C, all in the same minute. Is the room getting hotter or colder?

About 25 min · 3 goals · Reviewed by the founders' mentors · Full interactive version

Why should I care?

Robots, weather stations and medical monitors all live with noisy sensors. Engineers can't make noise vanish, but they can design around it. Averaging is the first and simplest trick.

Predict

A noisy thermometer's single readings jump around by about ± 2 °C. If you average 16 readings, roughly how much does the average jump around?

  1. About ± 2 °C, the same
  2. About ± 0.5 °C
  3. Exactly 0 °C: averaging removes all noise
Guess first, then reveal

About ± 0.5 °C. Averaging n readings shrinks random scatter by about √n, and √16 = 4, so ± 2 becomes about ± 0.5. Averaging helps a lot, but it never removes noise completely, and it makes the reading slower to react.

Discover

Set noise to ± 2 °C and readings to 1. Press 'Take new readings' ten times and count how far the dot jumps. Now average 16 readings and do the same. How much steadier is the blue average line?

What the interactive shows (text version)

The noisy thermometer shows each reading as a dot on a number line from 10 to 30 °C, with the true temperature marked and the average shown as a line. With one reading the dot jumps widely each time you take a new set. With 16 readings averaged, the average line stays close to the true temperature.

You can also open the interactive on the full site when you have a faster connection.

Understand

What noise is

Noise is the random jitter in a sensor's readings. It comes from tiny electrical fluctuations, vibrations and air currents. Even when the true temperature is perfectly steady, a real thermometer's readings wobble a little up and down. Noise is random: it's not always too high or always too low.

Averaging tames noise

Because noise goes up as often as down, adding several readings lets the ups and downs partly cancel. The average is steadier than any single reading. The cost: you must wait for several readings, so the average reacts more slowly when the real temperature changes. Engineers balance steadiness against speed.

Glitches and outliers

Sometimes one reading is wildly wrong, like 85 °C in a 20 °C room, because of a loose wire or an electrical spike. This is an outlier. Engineers check for readings that are impossible or far from the rest, and investigate them rather than letting one glitch fool the whole system.

Explain it another way

Intuitive

Asking one person to guess the weight of a cake can be way off. Ask 16 people and average their guesses, and you'll usually land much closer.

Technical

Random noise with typical size σ (standard deviation) gives an average of n independent readings a typical error of σ ÷ √n. A moving average over the last n samples is a simple low-pass filter: it smooths quick jitter but lags behind real changes.

Mathematical

If single readings have σ = 2 °C: n = 4 gives 2 ÷ 2 = 1 °C; n = 16 gives 2 ÷ 4 = 0.5 °C; n = 100 gives 2 ÷ 10 = 0.2 °C. Halving the noise needs four times as many readings, so there are diminishing returns.

Applied

Kitchen scales often wait a moment and average before showing a steady number. Fitness trackers average heart-rate readings over several seconds so the display doesn't flicker.

Worked example 1

Readings: 20.4, 19.7, 20.1, 25.8, 19.8 °C. What's a sensible estimate of the temperature?

25.8 is far from the rest: probably a glitch, so check it and leave it out. Average the other four: (20.4 + 19.7 + 20.1 + 19.8) ÷ 4 = 80.0 ÷ 4 = 20.0 °C. Including the glitch would give 21.16 °C, over a degree too high.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. A thermometer in a perfectly steady room gives slightly different readings each second. Why?
Practice 2. What is the downside of averaging many readings?
Practice 3. Readings: 18.2, 18.5, 18.3, 61.0, 18.4 °C. What should the engineer do with 61.0?

°C

Apply it

In the noisy-thermometer diagram, set the true temperature to 19.5 °C (just below the setpoint) and noise to ± 2 °C. Take 20 sets of single readings and count wrong heater decisions. Repeat with 16 readings averaged. Write up your counts in a table and explain the difference.

Reflect

When would you rather have a fast, jumpy sensor, and when a slow, steady one?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Machines that noticeFrom readings to decisions →