Skip to main content
What is a Kalman Filter?
  1. Glossary/

What is a Kalman Filter?

6 mins·
Ben Schmidt
Author
I am going to help you build the impossible.

You are going to hear about the Kalman Filter if you hang around engineering teams long enough.

It usually comes up when you are dealing with hardware, robotics, or complex financial models.

At its core, the concept addresses a fundamental problem every business faces.

Data is messy.

Sensors are imperfect.

The world is noisy.

A Kalman Filter is an algorithm designed to estimate unknown variables based on a series of measurements observed over time. It takes data that contains statistical noise and inaccuracies and produces a result that tends to be more precise than those based on a single measurement alone.

For a founder, understanding this concept is vital not just for product development but for understanding how we process information in an uncertain environment.

How the Algorithm Works

#

To understand the Kalman Filter, you have to accept that you never actually know the true state of a system. You can only estimate it.

The algorithm operates in a continuous two-step loop.

The first step is the Prediction.

The system uses its current knowledge to guess what the state will be in the next moment. It relies on a physical model of how the world works. If a drone is flying forward at ten miles per hour, the model predicts it will be further ahead in one second.

The second step is the Update.

The system takes an actual measurement from a sensor. This might be a GPS reading or an accelerometer data point. Because the real world is imperfect, this measurement includes noise.

The magic happens when the algorithm combines the Prediction with the Update.

It compares the two. It looks at the uncertainty of its own prediction and the uncertainty of the measurement.

If the sensor is known to be very noisy, the algorithm trusts the prediction more. If the model is known to be a bit shaky but the sensor is high precision, it trusts the measurement more.

It calculates a weighted average.

This produces a new estimate that lies somewhere between the prediction and the measurement. This new estimate becomes the baseline for the next cycle.

Kalman Filter vs. Moving Average

#

Founders are often familiar with a Simple Moving Average (SMA). You see this in revenue charts or stock prices.

It is reasonable to ask why you cannot just use an average to smooth out the noise.

A moving average looks backward. It takes a window of past data and averages it. This inherently introduces lag. If a drone turns sharply, a moving average will be slow to reflect that change because it is still weighing the old data where the drone was flying straight.

A Kalman Filter is recursive and predictive.

It does not need to store a massive history of past data points. It only needs the last estimate and the new measurement. This makes it computationally efficient.

More importantly, it incorporates a model of physics or system dynamics. It knows how the object should move.

A moving average only knows where the numbers were.

The Kalman Filter is superior in dynamic environments where you need real-time responsiveness without the lag associated with historical averaging.

Applications in a Startup Environment

#

There are specific industries where this is not just theory but a requirement for viability.

Robotics and Autonomous Vehicles

It turns noise into a trajectory.
It turns noise into a trajectory.
This is the classic use case. A self-driving car uses LIDAR, radar, and cameras. All of them are slightly wrong at different times. The Kalman Filter fuses these inputs to determine where the car actually is on the road.

IoT and Wearables

Consider a fitness tracker. It tries to count steps while attached to a wrist that is moving erratically. The accelerometer data is incredibly noisy. The device uses filtering to distinguish a step from you waving at a friend.

Fintech and Economics

While originally designed for navigation, the logic applies to economic systems. Markets are noisy. Tracking the true underlying value of an asset amidst volatile trading volume requires estimating a hidden state from noisy observations.

The Founder’s Mental Model

#

Beyond the code, the Kalman Filter offers a powerful framework for executive decision making.

As a founder, you operate in a loop that mirrors this algorithm.

You have a Prediction. This is your strategic plan. You believe that if you execute X, then Y will happen.

You have a Measurement. This is market feedback. It is customer churn, sales data, or user reviews.

Crucially, your measurement is noisy. One angry customer is not a trend. One viral post is not a scalable channel.

If you react entirely to every measurement, you are “chasing the noise.” Your strategy becomes erratic. You pivot too often.

If you rely entirely on your prediction, you are ignoring reality. You are hallucinating a business that does not exist.

The Kalman Filter logic suggests you need to assign a “gain” or weight to these inputs.

How much do you trust your intuition versus the data coming in this week?

If your data collection (measurement) is known to be flawed or early-stage, you should lean heavier on your thesis (prediction). As your data becomes statistically significant and reliable (low noise), you shift the weight and trust the measurement more than your initial guess.

Assessing Your Technical Debt

#

Implementation of a Kalman Filter is not trivial. It requires a deep understanding of the mathematical model of your system.

You must ask your technical team specific questions before demanding this solution.

Do we have a mathematical model of the system that is good enough to make predictions?

If the underlying physics or behavior of the system is a total mystery, the prediction step will fail. The filter will yield garbage.

Is the noise in our sensors Gaussian?

The standard Kalman Filter assumes that the noise follows a normal distribution (a bell curve). If your data has wild, unpredictable outliers or systematic bias, the standard filter will not work. You may need more complex variations like the Extended Kalman Filter or Particle Filters.

Are we solving for lag or for accuracy?

If you just need to smooth out a monthly sales chart for a pitch deck, this is overkill. Use a moving average.

If you need a robot to catch a ball, or a trading bot to react to millisecond discrepancies, you need the filter.

Building for the Unknown

#

Startups are machines built to reduce uncertainty.

We start with a hypothesis and we run experiments to validate it. The Kalman Filter is the mathematical embodiment of this process.

It acknowledges that we are never 100% right. It acknowledges that our tools are never 100% accurate.

It gives us a way to navigate despite those limitations.

It provides a method to keep moving forward, continuously refining our understanding of where we are and where we are going.

It turns noise into a trajectory.

When you build your product or your organization, consider how you filter the signal from the noise. It might be a line of code, or it might just be the way you decide what to do next.