## My 2019 Mathematics A To Z: Sample Space

Today’s A To Z term is another from goldenoj. It’s one important to probability, and it’s one at the center of the field.

# Sample Space.

The sample space is a tool for probability questions. We need them. Humans are bad at probability questions. Thinking of sample spaces helps us. It’s a way to recast probability questions so that our intuitions about space — which are pretty good — will guide us to probabilities.

A sample space collects the possible results of some experiment. “Experiment” means what way mathematicians intend, so, not something with test tubes and colorful liquids that might blow up. Instead it’s things like tossing coins and dice and pulling cards out of reduced decks. At least while we’re learning. In real mathematical work this turns into more varied stuff. Fluid flows or magnetic field strengths or economic forecasts. The experiment is the doing of something which gives us information. This information is the result of flipping this coin or drawing this card or measuring this wind speed. Once we know the information, that’s the outcome.

So each possible outcome we represent as a point in the sample space. Describing it as a “space” might cause trouble. “Space” carries connotations of something three-dimensional and continuous and contiguous. This isn’t necessarily so. We can be interested in discrete outcomes. A coin’s toss has two possible outcomes. Three, if we count losing the coin. The day of the week on which someone’s birthday falls has seven possible outcomes. We can also be interested in continuous outcomes. The amount of rain over the day is some nonnegative real number. The amount of time spent waiting at this traffic light is some nonnegative real number. We’re often interested in discrete representations of something continuous. We did not have $\frac{1}{2}\sqrt{2}$ inches of rain overnight, even if we did. We recorded 0.71 inches after the storm.

We don’t demand every point in the sample space to be equally probable. There seems to be a circularity to requiring that. What we do demand is that the sample space be a “sigma algebra”, or σ-algebra to write it briefly. I don’t know how σ came to be the shorthand for this kind of algebra. Here “algebra” means a thing with a bunch of rules. These rules are about what you’d guess if you read pop mathematics blogs and had to bluff your way through a conversation of rules about sets. The algebra’s this collection of sets made up of the elements of X. Subsets of this algebra have to be contained in this collection. Their complements are also sets in the collection. The unions of sets have to be in the collection.

So the sample space is a set. All the possible outcomes of the experiment we’re thinking about are its elements. Every experiment must have some outcome that’s inside the sample space. And any two different outcomes have to be mutually exclusive. That is, if outcome A has happened, then outcome B has not happened. And vice-versa; I’m not so fond of A that I would refuse B.

I see your protest. You’ve worked through probability homework problems where you’re asked the chance a card drawn from this deck is either a face card or a diamond. The jack of diamonds is both. This is true; but it’s not what we’re looking at. The outcome of this experiment is the card that’s drawn, which might be any of 52 options.

If you like treating it that way. You might build the sample space differently, like saying that it’s an ordered pair. One part of the pair is the suit of the card. The other part is the value. This might be better for the problem you’re doing. This is part of why the probability department commands such high wages. There are many sample spaces that can describe the problem you’re interested in. This does include one where one event is “draw a card that’s a face card or diamond” and the other is “draw one that isn’t”. (These events don’t have an equal probability.) The work is finding a sample space that clarifies your problem.

Working out the sample space that clarifies the problem is the hard part, usually. Not being rigorous about the space gives us many probability paradoxes. You know, like the puzzle where you’re told someone’s two children are either boys or girls. One walks in and it’s a girl. You’re told the probability the other is a boy is two-thirds. And you get mad. Or the Monty Hall Paradox, where you’re asked to pick which of three doors has the grand prize behind it. You’re shown one that you didn’t pick which hasn’t. You’re given the chance to switch to the remaining door. You’re told the probability that the grand prize is behind that other door is two-thirds, and you get mad. There are probability paradoxes that don’t involve a chance of two-thirds. Having a clear idea of the sample space avoids getting the answers wrong, at least. There’s not much to do about not getting mad.

Like I said, we don’t insist that every point in the sample space have an equal probability of being the outcome. Or, if it’s a continuous space, that every region of the same area has the same probability. It is certainly easier if it does. Then finding the probability of some result becomes easy. You count the number of outcomes that satisfy that result, and divide by the total number of outcomes. You see this in problems about throwing two dice and asking the chance the total is seven, or five, or twelve.

For a continuous sample space, you’d find the area of all the results that satisfy the result. Divide that by the area of the sample space and there’s the probability of that result. (It’s possible for a result to have an area of zero, which implies that the thing cannot happen. This presents a paradox. A thing is in the sample space because it is a possible outcome. What these measure-zero results are, typically, is something like every one of infinitely many tossed coins coming up tails. That can’t happen, but it’s not like there’s any reason it can’t.)

If every outcome isn’t equally likely, though? Sometimes we can redesign the sample space to something that is. The result of rolling two dice is a familiar example. The chance of the dice totalling 2 is different from the chance of them totalling 4. So a sample space that’s just the sums, the numbers 2 through 12, is annoying to deal with. But rewrite the space as the ordered pairs, the result of die one and die two? Then we have something nice. The chance of die one being 1 and die two being 1 is the same as the chance of die one being 2 and die two being 2. There happen to be other die combinations that add up to 4 is all.

Sometimes there’s no finding a sample space which describes what you’re interested in and that makes every point equally probable. Or nearly enough. The world is vast and complicated. That’s all right. We can have a function that describes, for each point in the sample space, the probability of its turning up. Really we had that already, for equally-probable outcomes. It’s just that was all the same number. But this function is called the probability measure. If we combine together a sample space, and a collection of all the events we’re interested in, and a probability measure for all these events, then this triad is a probability space.

And probability spaces give us all sorts of great possibilities. Dearest to my own work is Monte Carlo methods, in which we look for particular points inside the sample space. We do this by starting out anywhere, picking a point at random. And then try moving to a different point, picking the “direction” of the change at random. We decide whether that move succeeds by a rule that depends in part on the probability measure, and in part on how well whatever we’re looking for holds true. This is a scheme that demands a lot of calculation. You won’t be surprised that it only became a serious tool once computing power was abundant.

So for many problems there is no actually listing all the sample space. A real problem might include, say, the up-or-down orientation of millions of magnets. This is a sample space of unspeakable vastness. But thinking out this space, and what it must look like, helps these probability questions become ones that our intuitions help us with instead. If you do not know what to do with a probability question, think to the sample spaces.

This and other essays for the Fall 2019 A to Z should be at this link. Later this week I hope to publish the letter T. And all of the A to Z essays ought to be at this link. Thanks for reading.

## Dice and Compass Games

By the way, I wasn’t the only one to write about that dice problem the other day. Jim Doherty, with the MrDardy blog, also spoke about it. He’s actively teaching, and hopes to report what his classes made of it. He writes regularly about the teaching experience and the experiments to try to make it better.

This did get me into a fun bit of Twitter chatter about the odds of bloggers writing about the same question like this. I can’t imagine the question having a real answer, though. We both wrote about it because we saw the same initial question on Twitter. But we saw it because we both try following stuff in the mathematics blogosphere. Among other things, that seeks out and connects fun problems like this. And it’s a problem easy to write up.

In a bit more of mathematical puttering-about news, here’s a pleasant little tool for making geometric constructions. It’s got compass-and-straightedge, as well as protractor-and-ruler, features. I admit I’m not sure I have a practical use for it, but it’s pretty and fun.

And you can do amazing things with compass-and-straightedge constructions. For my money, the most amazing thing is quadrature. That’s starting from some other shape and constructing a square with the same area. There are shapes it’s easy to do this for: rectangles, triangles, polygons of all sorts. There are shapes it’s impossible to do this for: circles, most famously. And then there are shapes you’d think would be impossible but aren’t, such as certain lunes. These are crescent-moon shapes. If circles are impossible (and they are), wouldn’t you think a shape with edges are the arcs of two different circles would be impossible too? And yet, they’re possible, for at least the right lunes.

Here’s one. Draw a half-circle. Let’s say, for convenience, that you’ve drawn the upper half of one. Now draw the vertical line from the center of the circle to its top point. Then draw the line connecting the leftmost corner to the top corner. This will be the hypotenuse of a right triangle with two 45-degree angles.

Next, draw the half-circle that fits on that hypotenuse, and that points outward, past the edge of the original half-circle. The lune of interest is the one between the original half-circle and the new one. And you can, using only compass and straightedge, produce a square with exactly the same area as that curved shape. If that’s not remarkable enough, it’s the same area as that triangle we had to start out. But we can not, using compass and straightedge, make a square that’s the same area as that little wedge between lune and triangle.

The quadrature of the triangle isn’t too hard to work out, if you start from scratch. (If you don’t know how to start, try starting with the area of a rectangle instead.) The lune, I’ll admit, I didn’t figure out by myself, but it’s not absurd. That the remaining wedge is impossible you won’t prove on your own. I’m not sure how I would explain it, not in only a few essays.

And with that hook, I’d like to toss in one last appeal for any requests for the Winter 2016 Mathematics A To Z. Before you pull out calendars on me and work out how long three-a-week essays might last, remember that I live in a state that typically gets a long winter. Letters are filling up, but many are still open. And last time around I had to really dig to find a good y- or z- term. If you want a sure in, those are good letters to think up.

## Proportional Dice

So, here’s a nice probability problem that recently made it to my Twitter friends page:

(By the way, I’m @Nebusj on Twitter. I’m happy to pick up new conversational partners even if I never quite feel right starting to chat with someone.)

Schmidt does assume normal, ordinary, six-sided dice for this. You can work out the problem for four- or eight- or twenty- or whatever-sided dice, with most likely a different answer.

But given that, the problem hasn’t quite got an answer right away. Reasonable people could disagree about what it means to say “if you roll a die four times, what is the probability you create a correct proportion?” For example, do you have to put the die result in a particular order? Or can you take the four numbers you get and arrange them any way at all? This is important. If you have the numbers 1, 4, 2, and 2, then obviously 1/4 = 2/2 is false. But rearrange them to 1/2 = 2/4 and you have something true.

We can reason this out. We can work out how many ways there are to throw a die four times, and so how many different outcomes there are. Then we count the number of outcomes that give us a valid proportion. That count divided by the number of possible outcomes is the probability of a successful outcome. It’s getting a correct count of the desired outcomes that’s tricky.

## Where Are The Unfair Coins?

I had been reading Anand Sarwate’s essay “Randomized response, differential privacy, and the elusive biased coin”. It’s about the problem of how to get honest answers when the respondent might feel embarrassed to give an honest answer. And that’s interesting in its own right.

Along the way Sarwate mentioned the problem of finding a biased coin. In probability classes and probability problems we often call on the “fair coin” or “unbiased coin”. It’s a coin that, when tossed, comes up tails exactly half the time, and comes up heads the other half. An unfair coin, also called a biased coin, doesn’t do that. One side comes up, consistently, more often than half the time.

Both are beloved by probability instructors and textbook writers. It’s easy to get students to imagine flipping a coin, and there’s only two outcomes of a coin flip. So it’s easy to write, and solve, problems that teach how to calculate the probabilities of various events. Dice are almost as popular, but the average cube die has a whopping six possible outcomes. That can be a lot to deal with.

Between my title and Sarwate’s title you likely know where this is going. Someone (Andrew Gelman and Deborah Nolan) finally got to ask the question: are there even unfair coins? And the evidence seems to be that you really can’t bias a coin. It’s possible to throw a coin so that a desired side comes up more often than chance. But it’s not inherent to the coin, unless it’s a double-headed or double-tailed coin. I’d always casually assumed that biased coins were a thing, just like loaded dice were. Now I have to reconsider that. I’d also doubt this loaded-dice thing. But would dozens of charming lightly comic movies about Damon Runyonesque gamblers lie to me?

## A Summer 2015 Mathematics A To Z: dual

And now to start my second week of this summer mathematics A to Z challenge. This time I’ve got another word that just appears all over the mathematics world.

## Dual.

The word “dual” turns up in a lot of fields. The details of what the dual is depend on which field of mathematics we’re talking about. But the general idea is the same. Start with some mathematical construct. The dual is some new mathematical thing, which is based on the thing you started with.

For example, for the box (or die) you create the dual this way. At the center of each of the flat surfaces (the faces, in the lingo) put a dot. That’s a corner (a vertex) of a new shape. You should have six of them when you’re done. Now imagine drawing in new edges between the corners. The rule is that you put an edge in from one corner to another only if the surfaces those corners come from were adjacent. And on your new shape you put in a surface, a face, between the new edges if the old edges shared a corner. If you’ve done this right, you should get out of it an eight-sided shape, with triangular surfaces, and six corners. It’s known as an octahedron, although you might know it better as an eight-sided die.

## Reblog: A quick guide to non-transitive Grime Dice

The bayesianbiologist blog here has an entry just about a special set of dice which allow for an intransitive game. Intransitivity is a neat little property, maybe most familiar from the rock-paper-scissors game, and it’s a property that sneaks into many practical applications, among the interesting ones voting preferences.

A very special package that I am rather excited about arrived in the mail recently. The package contained a set of 6-sided dice. These dice, however, don’t have the standard numbers one to six on their faces. Instead, they have assorted numbers between zero and nine. Here’s the exact configuration:

Aside from maybe making for a more interesting version of snakes and ladders, why the heck am I so excited about these wacky dice? To find out what makes them so interesting, lets start by just rolling one against another and seeing which one rolls the higher number. Simple enough. Lets roll Red against Blue. Until you get your own set, you can roll in silico.

That was fun. We can do it over and over again and we’ll find that Red beats Blue more often than not. So it seems like Red is a pretty good…

View original post 485 more words

## Came On Down

On the December 15th episode of The Price Is Right, host Drew Carey mentioned as the sixth Item Up For Bids began that so far that show, all the contestants who won their Item Up For Bids (and so got on-stage for the pricing games) had come from the same spot so far, five out of six. He said that only once before on the show had all the contestants come from the same seat in Contestants Row. That seems awfully few, but, how many should there be?

We can say roughly how many “clean sweep” shows we should expect. There’ve been just about 6,000 episodes of The Price Is Right played in the current hour-long format (the show was a half-hour its first few years after being revived in 1972; it was a very different show in previous decades). If we know the probability of all six contestants in one game winning their Item Up For Bids — properly speaking, it’s called the One-Bid, but nobody cares — and multiply the probability of six contestants in one show coming from the same seat by the number of shows, we have the number of shows we should expect to have had such a clean sweep. This product, the chance of something happening times the number of times it could happen, is termed the “expected value” or “expectation value”, or sometimes just the “mean”, as in the average number to be, well, expected.

This makes a couple of assumptions. All probability problems do. For example, it assumes the chance of a clean sweep in one show is unaffected by clean sweeps in other shows. That is, if everyone in the red seat won on Thursday, that wouldn’t make everyone in the blue seat winning Friday more or less likely. That condition is termed “independence”, and it is frequently relied upon to make probability problems work out. Unfortunately, it’s often hard to prove: how do you prove that one thing happening doesn’t affect the other?

## Ted Baxter and the Binomial Distribution

There are many hard things about teaching, although I appreciate that since I’m in mathematics I have advantages over many other fields. For example, students come in with the assumption that there are certainly right and certainly wrong answers to questions. I’m generally spared the problem of convincing students that I have authority to rule some answers in or out. There’s actually a lot of discretion and judgement and opinion involved, but most of that comes in when one is doing research. In an introductory course, there are some techniques that have gotten so well-established and useful we could fairly well pretend there isn’t any judgement left.

But one hard part is probably common to all fields: how closely to guide a student working out something. This case comes from office hours, as I tried getting a student to work out a problem in binomial distributions. Binomial distributions come up in studying the case where there are many attempts at something; and each attempt has a certain, fixed, chance of succeeding; and you want to know the chance of there being exactly some particular number of successes out of all those tries. For example, imagine rolling four dice, and being interested in getting exactly two 6’s on the four dice.

To work it out, you need the number of attempts, and the number of successes you’re interested in, and the chance of each attempt at something succeeding, and the chance of each attempt failing. For the four-dice problem, each attempt is the rolling of one die; there are four attempts at rolling die; we’re interested in finding two successful rolls of 6; the chance of successfully getting a 6 on any roll is 1/6; and the chance of failure on any one roll is —

## At Least One Daughter Exists

In the class I’m teaching we’ve entered probability. This is a fun subject. It’s one of the bits of mathematics which people encounter most often, about as much as the elements of geometry enter ordinary life. It seems like everyone has some instinctive understanding of probability, at least given how people will hear a probability puzzle and give a solution with confidence. You don’t get that with pure algebra problems. Ask someone “the neighbor’s two children were born three years apart and twice the sum of their ages is 42; how old are they?” and you get an assurance of how mathematics was always their weakest subject and they never could do it. Ask someone “one of the neighbor’s children just walked in, and was a girl; what is the probability the other child is also a girl?” and you’ll get an answer.

But it’s getting a correct answer that is really interesting, and unfortunately, while everyone has some instinctive understanding and will give an answer as above, there’s little guarantee it’ll be the right one. Sometimes, and I say this looking over the exam papers, it seems our instinctive understanding of probability is designed to be the wrong one. I’m happy that people aren’t afraid of doing probability questions, not the way they are afraid of algebra or geometry or calculus or the more exotic realms, though, and feel like it’s my role to find the most straightforward ways to understanding which start from that willingness to try.

Some of the rotten track record people have in probability puzzles probably derives from how so many probability puzzles start as recreational puzzles, that is, things which are meant to look easy and turn out to be subtly complicated. I suspect the daughters-question comes from recreational puzzles, since there’s the follow-up question that “the elder child enters, and is a girl; what is the probability the younger is a girl?” There’s some soundness in presenting the two as a learning path, since they present what looks like the same question twice, and get different answers, and learning why there are different answers teaches something about how to do probability questions. But it still feels to me like the goal is that pleasant confusion a trick offers.