The recent fuss about Facebook and Google’s tracking programs and the ad targeting they offer has caused me to realize that most people either don’t understand or don’t care how advertising works. As the former CTO of an Internet advertising startup, I’ve given it a lot of thought in the last few years. This being me, the math geek, I’ve done a lot of this thinking mathematically, but I promise that I won’t inflict the math part on you.

Or at least not much.

So, let’s think about what advertising is for. The idea is to entice, and even convince, potential customers to become actual customers, and to buy things.

There are a million ways to do this, from old-fashioned word-of-mouth, to newspaper and magazine ads, to ShamWow pitchmen on late-night TV, to computer games that give you some kind of in-game goodies for watching an ad. (I’ve recently been compulsively playing a “terraform the universe” game that works like this; I hope to write a review soon.)

Every advertising method has some inherent cost. Word-of-mouth is low cost; national TV is expensive; others are in between. Every advertisement also has an inherent potential reward when someone is convinced, but not every person who sees an advertisement will actually buy the product. (I regularly see ads for products I already own; I imagine most everyone else has the same experience.)

This means we’ve wandered into the world of probability. Here’s the first of the two equations I’m going to mention, and I promise there’s nothing more than multiplication and division in either one. This first equation is called the expectation value, and it’s

E = P × V

Where P is the probability of something happening, V is the value of that thing happening, and E is the value you expect. P is always between 0 and 1, 0 ≤ P ≤ 1. In the imaginary world of Obamacare, the idea was that the mandate would force everyone to buy health insurance, so P would be 1, and the expected value would be the cost of an individual policy. In the real world, P is never 1 and usually pretty small.

The usual way of billing advertisers is by charging them per the number of impressions — the number of people who see the advertisement. This is usually quoted in “price per M” or “price per thousand” and the fact that they’re using a Roman numeral gives you an idea of how old the practice is.