## Monday, June 30, 2014

### The Extent to Which I Could Change My Mind

It pays sometimes to ask yourself the question, what would change my mind? To what extent could my mind be changed? What alternatives would I consider?

Asking this kind of question is an important part of basic mental hygiene. After all, if you never consider the possibility of being wrong, then for all you know you are wrong. If you never consider the possibility of truth in other systems, then for all you know they are true.

This is a personal post, where I'm going to talk about my religious beliefs. That's not what I normally do on this blog, but it's my blog and I'll do what I want. I should mention, this post was inspired in part by a good friend of mine, Nathaniel Givens, in his post here on Times and Seasons.

Labels:
CS Lewis,
world's worst scientist

## Monday, June 23, 2014

### On the Berenstein Bears Switcheroo

Two years ago, I wrote a post about one of the icons of my childhood, the Berenstein Bears. Except, as I learned, they aren't called the Berenstein Bears. As it turns out, they're the Berenstain Bears.

BerenstAin. With an "A".

My mind was blown. I had very distinct memories of the bears. I grew up reading their books and watching them on TV in school, and remember how it

*used*to be spelled. I tried to figure out when the name had changed.

## Wednesday, April 30, 2014

### Time Travel Doesn't Work That Way

Tales of characters finding themselves hundreds of years in the past or the future are as old as the human imagination. In recent years, since the codification of special relativity, this idea has taken a slightly more scientific bent, time travel now being the domain of crazed scientists, as opposed to fairy tricksters.

There are basically two ways to talk about time travel. One is the literary, magical kind of time travel in stories like Rip Van Winkle, Harry Potter, Back to the Future, or Terminator; this is how time travel is almost always treated in popular culture. The other is the scientific, relativistic approach, found in stories such as... well, none of them that I know of, because it's too difficult for liberal arts majors to understand, and doesn't make for as fun of a story.

compliments SMBC |

Nevertheless, in this post I want to offer an alternative explanation, of how time travel would work physically within the framework of General Relativity.

Special Relativity came first, as a theory that united space and time in to a single 4-dimensional entity called spacetime. The "special" here means that it was later realized to be a special case of a more general theory -- the General Theory of Relativity. More on that later. The "relativity" is the more intriguing part. This name was given to the theory because of how it treated distances in space and intervals in time. Namely, that they could be mixed together, depending on the speed of the observer. A scientist riding a spaceship and a scientist standing on an asteroid will get two different measurements of the length of the asteroid. If the scientist on the asteroid drops a rock, he and the spaceship scientist will measure two different amounts of time it takes the rock to fall.

The lynch pin in Special Relativity is the experimental observation that the speed of light is independent of how fast you move relative to the light source. What does this mean?

Suppose you're in a giant warehouse. You're standing still. In the center of the warehouse is one of those machines that shoots tennis balls. Using some sort of experimental apparatus, you can measure the speed of the tennis balls. Say you measure them to have a speed of 20 mph. Then you start walking towards the machine, at a speed of 2mph. Your measurement apparatus is not very smart, and doesn't know that you're moving. In fact, as far as it can tell, all that happened is the tennis balls sped up; now instead of moving at 20 mph, they move at 20 + 2 = 22 mph. By moving towards something, speeds add! If you walked away from the machine at the same speed, then your apparatus would measure 20 - 2 = 18 mph. The speeds subtract! This makes sense, intuitively. When you're driving, the passing cars seem to move a lot faster than the trees on the side of the road. The important key here is, the speed you measure for the objects depends upon your own speed.

This is called the principle of Galilean Relativity, after Galileo Galilei. The speeds of objects add relative to other objects.

Light does not work that way.

In the center of the warehouse, there is also a light bulb. Using a different apparatus, you can measure the speed of light. Standing still, you measure the speed of light to be 670,616,629 mph. Light moves pretty fast, as it happens. You start running at the light bulb, but you still measure the speed to be 670,6616,629 mph. Maybe you're not running fast enough for the apparatus to notice the change? So you get in a car and rev the engine up to 200 mph at the light bulb, but still measure 670,616,629 mph. You get on a high speed, magnetically-hovering bullet train and travel 10,000 mph toward the light bulb, and you still measure 670,616,629 mph. It never goes up. Dejected, you turn the train around, and to your continued frustration, even when going 10,000 mph the

*other*way the speed of light from the light bulb is still 670,616,629 mph.

The speed you measure for light does not depend upon your own speed.

When scientists first discovered this, there was a lot of debate trying to figure it out. A lot of it had to do with "ether", a fictitious fluid through which photons were supposed to move, and a dragging of the ether relative to moving bodies that affected the speed of the interior light beams. It was confusing stuff. Then Albert Einstein had an insight. At first glance, if you didn't know it, it was one of the most ridiculous things you could propose, but it turned out to be real genius.

Einstein decided that the speed of light wasn't the speed of an actual object, but some kind of fundamental constant that was always the same in every frame of reference. He called this constant c, the speed of light. But since speed has units of distance per time, this gave c as a fundamental scaling factor between distances and time intervals. The result was a unification of the two in to a single geometric entity called spacetime.

It was important that spacetime was geometric. This meant that the same concepts that are normally used in discussion of space -- such as distances, directions, axes, speeds -- could be applied at a higher level to talk about movement in this new four dimensional spacetime. Objects were given what is called a 4-velocity, measuring their rate of movement in spacetime. The 4-velocity of every object (at least all those you've ever seen) has a constant magnitude of c. Now, mind you, that's the 4-velocity, not the normal velocity. When you see an object "standing still", it is actually moving forward in time at the speed of light. When the object "speeds up" or "slows down" (from 3D point of view), it is actually only changing direction in spacetime; now it is moving partially forward in time and partially forward in space.

Make sure to keep these words straight: "speed" is an object's rate of movement in space; "velocity" is an object's rate of movement and the direction of its movement; "four-speed" is an object's rate of movement in spacetime, and is always c; "four-velocity" is an object's movement and the direction of its movement in space and in time; the magnitude of the four-velocity is the four-speed.

The car turns from N to NW. It's speed stays the same, but its velocity changes direction |

This is a similar situation to an object in spacetime. When it is "stationary", the direction of its movement is strictly temporal, with four-speed c; just like the car going North at 100 mph, which we do not perceive as moving West. When the object accelerates in space, it actually only changes direction in spacetime, keeping the same four-speed of c; much like our driver turning the car to go partially West, but still moving 100 mph.

You can see how this would put limits on the spatial velocity of objects. Because the four-speeds of objects in spacetime are always c, and because "acceleration" only changes direction in spacetime, it means the largest speed that you could ever give to a real object is c. Nothing can move faster than the speed of light.

The car is moving West a quickly as it can |

Now, this is not a true analogy. If it were, then scientists would have discovered spacetime a long time ago. The difference is a geometric one, because the geometry of spacetime is not quite the same as the geometry of space. In our car example, it is possible to turn the car so that it only moves West, and not North. In spacetime, it is not possible to turn an object so that it only moves in space and not in time.

To see this, remember that nothing moves faster than light. But light definitely has spatial movement; otherwise, the universe would be pitch black. Light also definitely moves forward in time; otherwise, lightbulbs wouldn't do anything and there'd be no way to light up a dark room.

This then suggests a method of visualizing spacetime. We make the following diagram, and draw what is called a light cone. A point on this diagram is called an "event"; just as normal events like birthday parties or weddings have locations and times, so too do spacetime events. These tell you when and where. At the center of the diagram, where the time and space axes cross, we are going to have a physicist stand. The physicist has a stop watch and a lightbulb. At the same time he hits the stopwatch and turns on the lightbulb, and watches as light shoots out from the bulb. It moves with speed c, and gets farther away from the physicist with each passing second. The lines that light follows in the spacetime diagram make the light cone.

How else would you know he's a physicist, without mad scientist hair and a lab coat? |

$$\Delta s^2 = \Delta x^2 + c^2\Delta t^2.$$

However, what makes spacetime different from normal geometry is that the time coordinate has a negative sign, meaning the Pythagorean Theorem in spacetime looks like this

$$\Delta s^2 = \Delta x^2 - c^2\Delta t^2.$$

The negative sign is important, and is what gives spacetime most of its interesting properties.

If you are standing still, then the path you follow in spacetime is a straight line parallel to the time axis; i.e., you only move forward in time. Your four-velocity points straight up. If you begin walking, then you rotate your four-velocity, so that it points more along the x axis [The negative sign is important, and is what gives spacetime most of its interesting properties.

**see note below about reference frames**]. Moving faster, you go a larger distance in a similar amount of time, and so your four-velocity points further along the x axis. The limit is when you are moving with a speed of c; this is as fast as you can ever go, but here we see your four-velocity only makes a 45 degree angle with the space and time axes.

This puts limits not only on our ability of spatial movement, but also on our ability to exploit the connection between space and time. If time is just a direction, after all, why not just walk to the past, or to the future, as surely as we walk North or West?

As you can see in the diagram, the process of, say, instantaneous teleportation is available; just move only along the x axis as far as you like without moving on the t axis. However, doing that would put you outside of the light cone, which requires moving faster than the speed of light, which is impossible.

Also, the diagram makes the process of time travel available. All it requires is "turning around" completely in spacetime, so that your four-velocity points in the opposite direction. However, this is also impossible, for at some point in the process of turning around, you must rotate your four-velocity through 45 degrees, which makes your speed faster than light, and is thus forbidden. So even though special relativity illustrates how time travel would work, special relativity also forbids time travel to work.

The problem is that our four-velocity has to stay inside of the light cone. This is a fundamental fact of nature; we can never move outside of a light cone. A lesser man would give up at this point, but not us. Rather than admit defeat, we will simply change the light cones, and we will do this with general relativity.

In special relativity, the path we would like to follow requires us to leave the light cones.

But what if we just tipped them all over, in just such a way that our backwards-in-time path was always inside the cones?

General relativity introduces the possibility of spacetime curvature; most importantly, the possibility of space-time mixing. When space and time are mixed in very extreme cases, a spatial direction like North becomes equivalent to a time direction; by walking North, you actually move forward or backward in time.

These sorts of spacetimes are easy to construct, mathematically. Just add a term that mixes space and time in to the equations in general relativity. Physically, however, these spacetimes are impossible to construct.

Of the proposal for time travel metrics, most of them succumb to the principle of garbage in/garbage out. The "garbage out" in this case would be the possibility of time travel to the past. The "garbage in" is the distribution of mass that you'd have to make in order to curve space in the right way.

For instance, the simplest metric allowing for time travel is van Stockum space, which was shown by Frank Tipler to allow for time travel. However, van Stockum space describes an infinitely long rotating cylinder. It is impossible to construct an infinitely long cylinder (obviously).

Another example are wormholes, connecting two temporally separated regions of spacetime. These require negative mass, and there does not exist negative mass.

The Kerr spacetime, which describes space in the vicinity of a rotating massive object, allows for time travel. However, time travel only occurs for the blackhole case, and only inside of the event horizon; a time traveler from the future could never reach the outside world and have any impact on the past. These are just a few examples, but every other proposal has failed on similar grounds.

Time travel to the past, so far as well know, is physically prohibited. Nonetheless, Einstein's relativity explains to us how it would work if there were such a thing. Let us point out some facets.

Firstly, space and time are united in to a single geometric entity called spacetime. While the geometry of spacetime bears subtle differences to the geometry of space, it is still a geometric entity.

A reasonable way to visualize world lines |

The disturbing part of this picture is that the top of the rectangle is always there. Even when your finger is half-way to the top, the positions of all the world lines are already there. They don't need you to catch up to exist. The future is written, even if we'll never know what it is until we get there.

If you're having trouble understanding why this implies world lines are fixed, hold a pen in your hand. Look at the bottom of the pen. Is the top of the pen still there? It's the same thing here, but now "the top" is "the future". You may say that you can change the top of the pen, maybe by squeezing the bottom, but when you change it, you are changing it

*in time*. If you think maybe the world lines might change, then keep in mind, time is a direction in this picture; the world lines definitely do change in that direction, which is moving from the bottom to the top of the rectangle. There is no other "outside time" for them to change with respect to.

This is disturbing to humans because we like to imagine ourselves as having free wills (and are we free to imagine otherwise?), but there simply isn't any other way to look at things once you've acknowledged spacetime as valid... and there isn't really any way to understand the universe without spacetime being valid.

You shouldn't think of this view as denying you anything, like freewill or boundless possibilities. If you really had them at all, then they must be compatible with this view; if they aren't, then you never had them to begin with, so you really haven't lost anything. I'm not saying there isn't freewill; I'm saying if there is, then it's compatible with this view.

The green world line goes back in time Any affect it has on the other lines, it had before it 'left' |

To answer all possible time travel paradoxes, again, turn to our visualization of the transparent rectangle with the world lines embedded as colored lines inside of it. Lines can only exist that run from the bottom to the top of the cylinder (or, perhaps, make closed loops within it). Lines that do are possible. Lines that don't are impossible. This resolves nearly every possible paradox.

Another important point to note is that the act of traveling backwards in time is not an "instantaneous" thing. What would that even mean, anyway? Rather, traveling backward in time is literally traveling, backward in time. You have to rotate your four-velocity to point backward, and then move in spacetime.

This also does not back-trace your previous world line, putting you as yourself in high school. Technically, from an outside perspective (the world lines are embedded in a rectangle sitting on your desk), you still are yourself in high school; if you're not experiencing yourself in high school right now, then blame entropy.

Rather, moving backwards in time traces a new world line that moves from top-to-bottom, and then at some point turns around and moves bottom-to-top again. During this top-to-bottom process, it is possible to interact with other objects. Someone traveling backwards in time is perfectly visible to anyone around them. As you travel back in time, you will see a second copy of yourself walking backward towards you and finally merging with you. This occurs when you switch from backward to forward traveling. You will then see a second copy of yourself split off from you. That copy will be doing all the things you did while time traveling, only in reverse order.

It would probably be a pretty horrifying experience, really.

How long is Red's beard when Blue enters? |

This sort of thinking though -- world lines and four-velocities -- is how time travel "actually" works. While time travel is impossible (currently, anyway), the picture from general relativity tells us that the only way for movement backwards in time to work is if it respects the geometric picture of spacetime. The geometric picture of spacetime would make such things as changing the past, separate world lines, instantaneous "jumps", or stationary machines all impossible, and would instead imply a single, fixed, and deterministic sequence of events that may include reverse time travel, but is not changed by reverse time travel.

There are some fascinating stories to be told about the physical picture of time travel, to be sure. Sadly, however, it is normally the literary picture that we see in films and books. Hopefully this article has help clear up the differences, and explained the faults of the popular view.

NOTE: In this post, I do not introduce reference frames, which is a point against me. I intended to explain the geometry of spacetime, without dealing with the pesky issue of how things change depending on who is watching, so I left out that additional complication. When I talk about four-velocities (as above), I am assuming all of this is measured by a stationary observer. Just know that the simple picture I painted here is complicated by the fact that most observables in relativity change depending on who is doing the observation.

Labels:
time travel,
world's worst scientist

## Sunday, March 9, 2014

### Anti-Paradox

I have become accustomed to using the word "anti-paradox" to describe a particular kind of time travel oddity. I first encountered this word either on Wikipedia or TVTropes (sometimes it's hard to tell). Now, despite my constant searching, not only can I not find the original article, but I cannot find any article anywhere on the internet using the word in the way I remembered seeing it. The definition, as near as I can remember it, is as a follows:

*An anti-paradox is a self-supporting, self-validating, tautological statement or situation.*

It is a statement that is true precisely because it is true.

One of the examples that the article gave was the Robert A Heinlein book, "All You Zombies". But that plotline is convoluted, and gross, so let me give a simpler example of a time travel anti-paradox.

A man is sitting in his room. Suddenly, in a whir of sound and light, a metallic box appears in the room with him, and out steps an elderly gentleman. The elderly fellow explains that this box is a time machine. The elder has finished with time travel and wants to end his days as he remembers them before he left; and so, he is giving the machine to the younger man. The younger man takes the machine and travels up and down the timeline, meeting famous people from history and exploring the technology of the future. After decades of time travel adventures, saving the world from evil robot kings and stopping the Eiffel Tower from collapsing (he succeeds), the man becomes tired. All this moving. He wants to stop, and find some time, and just stay there. But the only time he really remembers having any attachment to is the time before he left. And so he returns to that day when he first got in the machine, and hands it off to his younger self, and stays there in his own time until such runs out.

This situation is an anti-paradox. The man gets the time machine because he has the time machine because he gets the time machine because he has the time machine. The attainment of the time machine is the cause of its own attainment.

This isn't contradictory, nor does it even offer an apparent contradiction. It might be more correct to say that

*it makes*. The "problem" with it is that it doesn't have any exterior input. No one builds the time machine. The man has a time machine because he has a time machine.

**too much**senseI distinctly remember reading this situation as being called an anti-paradox. Can anyone corroborate this?

If not, then let me propose the word for general use. Anti-paradox: a self-supporting, self-validating tautology.

## Friday, March 7, 2014

### "Why Don't They Just Use the Time Turners to..."

The following video about sums up the way most people think of the Time Turners.

Why don't you just use them to travel back and kill Voldemort? Or even Hitler? As Snape says, you'd save countless innocent lives in the future.

I have never held back from criticizing Harry Potter. Actually, I have kind of a hate-crush on the series. Despite my sometimes overzealous criticism of everything about Harry Potter, the function of Time Turners as seen in

*Prisoner of Azkaban*is the best depiction of time travel that I have yet encountered in any fictional medium. It is one of the primary things in the series that I have to say, Rowling did perfectly.

Which is weird, because it's the most obvious point of criticism from everyone else.

Whenever you want to ask yourself the question, "Why don't they just go back in time and ...", stop, and ask yourself instead:

"Why don't they just not go back in time and rescue Buckbeak?"

Maybe that's too abstract at the moment. Let me try something else.

You can go back and try to kill Voldemort. Just get a Time Turner and spin it back a billion times. Go ahead.

Most wizards are terrified of time travel. The effects are supposed to make you go mad. Wizards are cool with literal ghosts living in their rooms, and with dragons in their banks, and with actual fortune telling, and with lifting objects off the ground with magic, but they are absolutely superstitious about time travel.

Why are they superstitious about it? Because weird, looping oddities occur that cause all of the wizards to experiment with time travel to go crazy.

from SMBC |

It just didn't work.

It's possible every time wizard to ever exist has gone back to kill Voldemort. But it never works.

It will never work.

You can go back in time to kill Voldemort. But you won't.

I know you won't, despite all your effort, because Voldemort doesn't die until the time of the story.

It's not like your free will is impeded. You can try all you want and do whatever you want to kill Voldemort. No mystic force is going to tug at your insides and prevent you from pulling the trigger. If you think about it, there is nothing impeding my free will when it comes to wining the Olympics. But I'm never going to. And you're never going to kill Voldemort.

Its physically possible to kill him. Your bullets won't bounce harmlessly off of his chest, or stop in mid-air right in front of him, or whatever. Not like you'll get far enough to find out, though; if your bullets were about to hit Voldemort, then they would hit Voldemort, and he would die. And Voldemort doesn't die at that time. So your bullets won't get close enough to prove they could hit him.

You're not going to kill Voldemort, because you're just not going to. There's no better explanation. You just don't.

If you did, he wouldn't be the antagonist of the book series. And yet there he is,

*Avada Kedavra*-ing people all over the place. So whatever plans you make to kill him in the past, they just aren't going to work (and may just exacerbate the problem), and you should move on and try something else.

Please note how the causality works here. I am not saying

Voldemort is alive in 1994 ----> You can't kill him in the past.I am instead saying

You don't kill Voldemort in the past ----> Voldemort is alive in 1994.

So back to the original question:

"Why don't they just not go back in time to save Buckbeack?"

Think of what it entails that they do go back to save Buckbeak. During most of the events leading up to the Shrieking Shack, there are two copies of Harry and Hermione. One copy follows the other, and the two interact to a substantial extent. We don't see the second copy because they stay hidden, but we do observe their actions as unexplained anomalies that occur to the primary copy.

By the time the group gets to the hospital room and Dumbledore advises them to use the Time Turner to save Buckbeak and Sirius, those events have already happened.

This is important. The copy of Harry and Hermione seen by the protagonists when they travel back in time is not some fictional, hypothetical alternate timeline Harry and Hermione. They are seeing Harry and Hermione. That is, they are seeing themselves. Just a few hours ago. We just read about these parts. These are

**Harry and Hermione. There are no Timeline A and Timeline B versions of the two; there's just Harry and Hermione, and the things that they cause to occur have already, in fact, occurred.**

*the*We saw these events forward, then reversed, then saw them again from a different perspective. We did not switch tapes.

And here we have a situation that speaks to the reverse of the usual time-travel paradoxes. The most famous, namely the grandfather paradox, asks what would happen if you went back in time and killed your grandfather (or yourself), thus ending your existence before you can go back in time to end your existence. Another, related paradox asks what happens if you go back in time to kill Hitler, or save the Titanic, or whatever; if you succeed, then you erase your motivation for time traveling in the first place, so you would never time travel, which means you would never make the change, which means you would time travel.

This time we ask a weirder question, sometimes called an anti-paradox: what if Harry doesn't travel back in time, and therefore doesn't save himself from the Dementors?

Clearly, by the time we get to the part where Dumbledore recommends time travel, Harry doesn't have a lot of options. If he decides not to, then he must already be dead. But Harry isn't dead. So Harry is going to decide to travel back in time.

However, it isn't just limited to Harry. If Harry decides not to travel back in time, then Buckbeak must be already dead. But Buckbeak isn't dead. So Harry is going to decide to travel back in time.

And it isn't limited to who's alive and who isn't. If Harry decides not to travel back in time, then those rocks in Hagrid's garden don't get thrown. But the rocks in Hagrid's garden do get thrown. If Harry doesn't, the blades of grass he stepped on won't get pushed down in quite the same way, but they do get pushed down in quite that way. If Harry doesn't, the molecules of water in the lake won't get stirred up like they do, but they do get stirred up like they do. The oxygen molecules he breathed wouldn't have been turned in to carbon dioxide, but they were turned in to carbon dioxide. The entropy of Scotland wouldn't have seen any contribution from Harry's metabolism, but entropy did increase from Harry's metabolism. On and on.

Every single infinitesimal impact Harry had on the universe would not have occurred, and they all did occur. Maybe humans didn't notice each little thing like entropy and O2 --> C02 reactions, but physics is notoriously unconcerned with human cognizance. Those things did happen, and in fact we "saw" them happen on screen the first time through, before Harry and Hermione decide to go back in time.

So that's why they don't use the time turner to stop Voldemort. Because everyone to use a time turner to stop him fails, has failed, and will fail. It's a plan that never works and will never work. There isn't even any reason to try, and anyone who has tried to do anything with time travel has gone insane or worse.

As to why our heros don't at least attempt it, maybe it's because if they did, then the story would be about their colossal failure and collapse into madness, which isn't the sort of thing that tends to make it in to books. At least not children's books.

So, despite everything else I've said on the subject, when it comes to time travel, I really have to tip my hat to Rowling. She did it very well.

Of course, the real question is why wizards would take literally the most dangerous item they know of -- so terrifying that people accustomed to conversing with ghosts leave them locked in a special, secret vault deep underground where no one can find them -- and lend it to a 13-year-old girl

*so she can get to her classes on time*. But that's another post.

Labels:
Harry Potter,
time travel,
world's worst scientist

## Thursday, February 20, 2014

### Opposed Checks in D&D are the Same as Coin Flips

This is a lesson in statistics and probability, as applied to the popular Dungeons and Dragons role playing game. I'm having trouble lately with the LaTeX embedder: if you see a lot of dollar signs and slashes, then check your plugins and permissions on your browser and allow MathJax to work, so you can see the equations better.

At least since version 3.0, the Dungeons and Dragons rule book has featured a rule of opposed checks. These are supposed to represent, using dice, the opposition of two separate skills: so, your ability to Hide versus the orc's ability to Spot; your ability to tie a rope versus the orc's ability to escape from bonds. You roll your skill, the orc rolls his skill, you apply modifiers, and the higher outcome wins.

Even before this, rolling dice was a common way to set the difficulty of something in old versions and in other non-d20 games. How hard is the door to force? You didn't think of it, now you're on the spot, so you roll a die to figure out how hard it is. Then you tell the PCs to beat that number on their own roll. Makes sense.

Doing checks this way is, from a probabilistic point of view, about as good as flipping a coin. The probability of the PC winning is slightly more than 50-50. In terms of DCs, an opposed check (before modifiers) is equivalent to a DC of 10.5.

I'll prove it.

When you roll a die, a number comes up. A random number, hopefully. If the dice has $n$ sides, then this number is between $1$ and $n$. It is customary to denote a random number with a capital letter: in this case, I'm going to call $X$ the result of rolling the die; $X=1, 2, 3,\ldots, n$, depending on what we roll.

If we consider some number between $1$ and $n$, say 6, then the probability that $X=6$ is, as we all know, $1/n.$ It is common to write this as $\Pr(X=6) = \frac{1}{n}.$ And, of course, it isn't just for $X=6$ that this is the case, but for any number $x$ between $1$ and $n$. More generally, for any such $x$, we write $\Pr(X=x) = \frac{1}{n}.$

In our case, we are going to roll the same die twice. This gives us two random numbers (the results of the two dice), which we will call $X_1$ and $X_2.$ For concreteness, suppose this is an opposed strength check between the PC and an Orc. We'll say that $X_1$ is the die we (the GM) roll for the Orc, and $X_2$ is the die that the PC rolls. We want to know $\Pr(X_2 \geq X_1)$, that is, the probability that the second result is higher than the first or in game terms, the probability that the PC wins his contest against the Orc.

This could go a number of ways. The GM might roll a 1, in which case the PC is guaranteed to win, or the GM might roll a $n$, in which case the PC has to also roll $n$ or lose, with other possibilities in between. But we don't want to consider the probability of the PC winning given some particular roll from the GM, because that's trivial. So what we want to do instead is consider all of these possibilities.

We look at

$$\Pr(X_2\geq X_1) = \sum_{x=1}^n \Pr(X_2 \geq x) \cdot \Pr(X_1=x),$$

which means that we consider the probability of the GM rolling some number $X_1=x$, then multiply by the probability of the PC winning given this roll, then consider this for all the possible $x$ the GM might roll and add these together. That gives us the probability of the PC winning his roll, regardless of what the GM rolls.

Breaking this down, we find

$$\Pr(X_2\geq X_1) = \sum_{x=1}^n \sum_{y=x}^n \frac{1}{n} \frac{1}{n} = \frac{1}{n^2}\sum_{x=1}^n\sum_{y=x}^n 1 = \frac{1}{n^2}\sum_{x=1}^n (n-x+1).$$

Stopping for a second, for people less familiar with this stuff, the $\sum_{y=x}^n$ term means that we add up every value of $X_2$, starting at $x$, and ending at $n$. Concretely, if we're rolling a d20, and the Orc's roll is $X_1=15$, then we add up contributions from $y=15,16,17,18,19,20,$; that's $6 = 20-15+1$ terms we consider. More generally, it is $n-x+1$ terms, which is why we wrote $(n-x+1)$ there. Moving on,

$$\Pr(X_2\geq X_1) = \frac{1}{n^2} \left(\sum_{x=1}^n n - \sum_{x=1}^n x + \sum_{x=1}^n 1\right) = \frac{1}{n^2}\left(n^2 - \sum_{x=1}^n x + n\right).$$

The term $\sum_{x=1}^n x$ means the sum of the first $n$ numbers. So,

$$\sum_{x=1}^n = 1 + 2 + 3 + 4 + 5 + \cdots + n.$$

Those who've had Calculus will be familiar with this, but other people maybe no so much. There's a beautiful formula due to Gauss, arguably the first person to discover it, whose proof is even more beautiful. Consider the following image:

This shows a bunch of stacks of squares, increasing from 1 to 2 to 3, on up to $n$. The area of these squares is $\sum_{x=1}^n x.$ Now consider a second one of exactly the same size: the two interlock, forming a rectangle:

The width of the rectangle is $n$ and the height is $n+1$, so its areas is $n(n+1)$. But the area of the rectangle is equal to twice the area of the stacked squares! Therefore,

$$\sum_{x=1}^n x = \frac{n(n+1)}{2}.$$

So then, carrying on with our equation, we now have

$$\Pr(X_2 \geq X_1) = \frac{1}{n^2}\left(n^2 - \frac{n(n+1)}{2} + n\right) = 1 - \frac{n+1}{2n} + \frac{1}{n} = \frac{2n - n - 1 + 2}{2n} = \frac{n+1}{2n},$$

which, as I said, is slightly better than 50% probability.

For a 6-sided die, it is $\frac{7}{12}.$ For a 20-sided die, it is $\frac{21}{40}$, which is a 52.5% chance of success, which corresponds to a DC of 10.5. A flat DC 10 is a 55% chance of success. So rolling an opposed roll for the Orc is the same as considering the Orc's passive check.

That is without modifiers. To include modifiers, start at flat DC 10, and modify as

$$DC = 10 + (\text{Orc's mod}) - (\text{PC's mod}).$$

For an Orc with +3 and a PC with -1, the check would be at

$$DC = 10 + 3 - (-1) = 14.$$

This will be (mostly) statistically equivalent to a modified opposed check ($\pm$ a 2.5% sliver of probability)

I did this all for dice, which are what is relevant to RPG players. For dice, the result is not quite $1/2$ because the rolls can only equal certain specific results (like 1, or 7) and a tie goes to the player, but in a general case, it is actually true that the probability of a second random number being larger than the first random number is exactly $1/2$: that is, $\Pr(X_2>X_1) = \frac{1}{2}.$ I'll prove it.

So, consider $X_1, X_2$, which are still random numbers, but not necessarily from a die. For instance, we might push blocks on ice, and $X_2$ and $X_1$ gives the distance the blocks travel before coming to rest. Or throw darts at a wall and $X_2,X_1$ are the distances from a bullseye. Or something. It's also not necessarily that case that every possible value is equally likely. For a fair die, every number has probability $1/n$ or coming up; for throwing darts at a bullseye, if we're any good, then we will be more likely to be near the bullseye. Let $\Pr(X=x) = p(x)$, where $p(x)$ is just some function: give it a value $x$ and it gives you a probability $p$. Here $p(x)$ is called the "probability distribution function". For simplicity, we also consider $\Pr(X\leq x) = F(x)$, called the "cumulative density function". This is the probability of $X$ being less than some value $x$; as we'll see, a separate symbol for this is really useful.

As before, we have

$$\Pr(X_2\geq X_1) = \int \Pr (X_2\geq x)\cdot\Pr(X_1=x)dx = \int (1-F(x))p(x) dx = \int p(x)dx - \int F(x)p(x)dx.$$

You may be wondering what the weird S is, the $\int$ thing. That's an integral sign, and it basically just means "add up all the possible values of $x$." It's different from the $\sum$ symbol in that $\sum$ considers only discrete values while $\int$ considers continuous spectra of values. We have used here the fact that $1 = Pr(X\leq x) + Pr(X\geq x) = F(x) + \Pr(X\geq x)$ to express this in terms of $F$.

If we add up all the probabilities of things happening, we should get 100%; that is, $\int p(x)dx = 1.$ This makes sense; the probability that we roll a 1 or a 2 or a 3, etc, is 1. So

$$\Pr(X_2\geq X_1) = 1 - \int F(x)p(x)dx.$$

To fully evaluate this, we can write it another way. Think what happens if, instead of rolling for the orc first then making the PC roll higher than that, we have the PC roll, then roll for the orc and make sure the orc rolls lower. It's the same thing in the end, but can be written as:

$$\Pr(X_2\geq X_1) = \int \Pr(X_2 = x) \Pr(X_1 \leq x) = \int p(x) F(x) dx.$$

Comparing these two,

$$\int p(x) F(x)dx = \Pr(X_2\geq X_1) = 1 - \int p(x) F(x)x,$$

which must mean $\Pr(X_2 \geq X_1) = \int p(x)F(x)dx = 0.5.$

So, the long and short of it is, if we have two random numbers that we produce in the same way, one after the other, and we want to know the probability that the second is larger than the first, then this is 50%. In terms of D&D, this means that if you generate the DC for a skill check by rolling a die, then have the PC roll to beat that die, then you may as well flip a coin to accomplish the same thing. This also means you can fix the DC of the opposed rolls at 10, and just add the Orc's bonuses and subtract the PC's bonus to increase the DC; it achieves the exact same thing.

If this result is unsatisfying to you, consider using a different system of opposed rolls that changes the dice used by each party, for slightly swingier results.

Note: this was originally written on 2/20/2014, but was updated on 5/7/2018 to make the wording more clear.

At least since version 3.0, the Dungeons and Dragons rule book has featured a rule of opposed checks. These are supposed to represent, using dice, the opposition of two separate skills: so, your ability to Hide versus the orc's ability to Spot; your ability to tie a rope versus the orc's ability to escape from bonds. You roll your skill, the orc rolls his skill, you apply modifiers, and the higher outcome wins.

Even before this, rolling dice was a common way to set the difficulty of something in old versions and in other non-d20 games. How hard is the door to force? You didn't think of it, now you're on the spot, so you roll a die to figure out how hard it is. Then you tell the PCs to beat that number on their own roll. Makes sense.

Doing checks this way is, from a probabilistic point of view, about as good as flipping a coin. The probability of the PC winning is slightly more than 50-50. In terms of DCs, an opposed check (before modifiers) is equivalent to a DC of 10.5.

I'll prove it.

When you roll a die, a number comes up. A random number, hopefully. If the dice has $n$ sides, then this number is between $1$ and $n$. It is customary to denote a random number with a capital letter: in this case, I'm going to call $X$ the result of rolling the die; $X=1, 2, 3,\ldots, n$, depending on what we roll.

If we consider some number between $1$ and $n$, say 6, then the probability that $X=6$ is, as we all know, $1/n.$ It is common to write this as $\Pr(X=6) = \frac{1}{n}.$ And, of course, it isn't just for $X=6$ that this is the case, but for any number $x$ between $1$ and $n$. More generally, for any such $x$, we write $\Pr(X=x) = \frac{1}{n}.$

In our case, we are going to roll the same die twice. This gives us two random numbers (the results of the two dice), which we will call $X_1$ and $X_2.$ For concreteness, suppose this is an opposed strength check between the PC and an Orc. We'll say that $X_1$ is the die we (the GM) roll for the Orc, and $X_2$ is the die that the PC rolls. We want to know $\Pr(X_2 \geq X_1)$, that is, the probability that the second result is higher than the first or in game terms, the probability that the PC wins his contest against the Orc.

This could go a number of ways. The GM might roll a 1, in which case the PC is guaranteed to win, or the GM might roll a $n$, in which case the PC has to also roll $n$ or lose, with other possibilities in between. But we don't want to consider the probability of the PC winning given some particular roll from the GM, because that's trivial. So what we want to do instead is consider all of these possibilities.

We look at

$$\Pr(X_2\geq X_1) = \sum_{x=1}^n \Pr(X_2 \geq x) \cdot \Pr(X_1=x),$$

which means that we consider the probability of the GM rolling some number $X_1=x$, then multiply by the probability of the PC winning given this roll, then consider this for all the possible $x$ the GM might roll and add these together. That gives us the probability of the PC winning his roll, regardless of what the GM rolls.

Breaking this down, we find

$$\Pr(X_2\geq X_1) = \sum_{x=1}^n \sum_{y=x}^n \frac{1}{n} \frac{1}{n} = \frac{1}{n^2}\sum_{x=1}^n\sum_{y=x}^n 1 = \frac{1}{n^2}\sum_{x=1}^n (n-x+1).$$

Stopping for a second, for people less familiar with this stuff, the $\sum_{y=x}^n$ term means that we add up every value of $X_2$, starting at $x$, and ending at $n$. Concretely, if we're rolling a d20, and the Orc's roll is $X_1=15$, then we add up contributions from $y=15,16,17,18,19,20,$; that's $6 = 20-15+1$ terms we consider. More generally, it is $n-x+1$ terms, which is why we wrote $(n-x+1)$ there. Moving on,

$$\Pr(X_2\geq X_1) = \frac{1}{n^2} \left(\sum_{x=1}^n n - \sum_{x=1}^n x + \sum_{x=1}^n 1\right) = \frac{1}{n^2}\left(n^2 - \sum_{x=1}^n x + n\right).$$

The term $\sum_{x=1}^n x$ means the sum of the first $n$ numbers. So,

$$\sum_{x=1}^n = 1 + 2 + 3 + 4 + 5 + \cdots + n.$$

Those who've had Calculus will be familiar with this, but other people maybe no so much. There's a beautiful formula due to Gauss, arguably the first person to discover it, whose proof is even more beautiful. Consider the following image:

This shows a bunch of stacks of squares, increasing from 1 to 2 to 3, on up to $n$. The area of these squares is $\sum_{x=1}^n x.$ Now consider a second one of exactly the same size: the two interlock, forming a rectangle:

The width of the rectangle is $n$ and the height is $n+1$, so its areas is $n(n+1)$. But the area of the rectangle is equal to twice the area of the stacked squares! Therefore,

$$\sum_{x=1}^n x = \frac{n(n+1)}{2}.$$

So then, carrying on with our equation, we now have

$$\Pr(X_2 \geq X_1) = \frac{1}{n^2}\left(n^2 - \frac{n(n+1)}{2} + n\right) = 1 - \frac{n+1}{2n} + \frac{1}{n} = \frac{2n - n - 1 + 2}{2n} = \frac{n+1}{2n},$$

which, as I said, is slightly better than 50% probability.

For a 6-sided die, it is $\frac{7}{12}.$ For a 20-sided die, it is $\frac{21}{40}$, which is a 52.5% chance of success, which corresponds to a DC of 10.5. A flat DC 10 is a 55% chance of success. So rolling an opposed roll for the Orc is the same as considering the Orc's passive check.

That is without modifiers. To include modifiers, start at flat DC 10, and modify as

$$DC = 10 + (\text{Orc's mod}) - (\text{PC's mod}).$$

For an Orc with +3 and a PC with -1, the check would be at

$$DC = 10 + 3 - (-1) = 14.$$

This will be (mostly) statistically equivalent to a modified opposed check ($\pm$ a 2.5% sliver of probability)

I did this all for dice, which are what is relevant to RPG players. For dice, the result is not quite $1/2$ because the rolls can only equal certain specific results (like 1, or 7) and a tie goes to the player, but in a general case, it is actually true that the probability of a second random number being larger than the first random number is exactly $1/2$: that is, $\Pr(X_2>X_1) = \frac{1}{2}.$ I'll prove it.

So, consider $X_1, X_2$, which are still random numbers, but not necessarily from a die. For instance, we might push blocks on ice, and $X_2$ and $X_1$ gives the distance the blocks travel before coming to rest. Or throw darts at a wall and $X_2,X_1$ are the distances from a bullseye. Or something. It's also not necessarily that case that every possible value is equally likely. For a fair die, every number has probability $1/n$ or coming up; for throwing darts at a bullseye, if we're any good, then we will be more likely to be near the bullseye. Let $\Pr(X=x) = p(x)$, where $p(x)$ is just some function: give it a value $x$ and it gives you a probability $p$. Here $p(x)$ is called the "probability distribution function". For simplicity, we also consider $\Pr(X\leq x) = F(x)$, called the "cumulative density function". This is the probability of $X$ being less than some value $x$; as we'll see, a separate symbol for this is really useful.

As before, we have

$$\Pr(X_2\geq X_1) = \int \Pr (X_2\geq x)\cdot\Pr(X_1=x)dx = \int (1-F(x))p(x) dx = \int p(x)dx - \int F(x)p(x)dx.$$

You may be wondering what the weird S is, the $\int$ thing. That's an integral sign, and it basically just means "add up all the possible values of $x$." It's different from the $\sum$ symbol in that $\sum$ considers only discrete values while $\int$ considers continuous spectra of values. We have used here the fact that $1 = Pr(X\leq x) + Pr(X\geq x) = F(x) + \Pr(X\geq x)$ to express this in terms of $F$.

If we add up all the probabilities of things happening, we should get 100%; that is, $\int p(x)dx = 1.$ This makes sense; the probability that we roll a 1 or a 2 or a 3, etc, is 1. So

$$\Pr(X_2\geq X_1) = 1 - \int F(x)p(x)dx.$$

To fully evaluate this, we can write it another way. Think what happens if, instead of rolling for the orc first then making the PC roll higher than that, we have the PC roll, then roll for the orc and make sure the orc rolls lower. It's the same thing in the end, but can be written as:

$$\Pr(X_2\geq X_1) = \int \Pr(X_2 = x) \Pr(X_1 \leq x) = \int p(x) F(x) dx.$$

Comparing these two,

$$\int p(x) F(x)dx = \Pr(X_2\geq X_1) = 1 - \int p(x) F(x)x,$$

which must mean $\Pr(X_2 \geq X_1) = \int p(x)F(x)dx = 0.5.$

So, the long and short of it is, if we have two random numbers that we produce in the same way, one after the other, and we want to know the probability that the second is larger than the first, then this is 50%. In terms of D&D, this means that if you generate the DC for a skill check by rolling a die, then have the PC roll to beat that die, then you may as well flip a coin to accomplish the same thing. This also means you can fix the DC of the opposed rolls at 10, and just add the Orc's bonuses and subtract the PC's bonus to increase the DC; it achieves the exact same thing.

If this result is unsatisfying to you, consider using a different system of opposed rolls that changes the dice used by each party, for slightly swingier results.

Note: this was originally written on 2/20/2014, but was updated on 5/7/2018 to make the wording more clear.

Labels:
math,
random,
world's worst scientist

## Wednesday, January 29, 2014

### Speculating on Blindsprings

I recently stumbled on to a web comic called Blindsprings, after seeing a banner ad for it. Let me take this time to recommend it to you.

Blindsprings is a comic that just went online back in October. If you go to the website, you can see that not much has happened yet. As such, it's hard to gauge just what the story is or where it's going. So far though, surmising from the information available, I think this has the potential to be something really, truly great. What is also exciting is being able to see the story develop from the beginning.

Plus, the artwork is beautiful.

this was the ad for it |

The main heroine is a young girl named Tamaura. She lives alone in the forest, where she attends to animals and plants trees and performs many other tasks for a shady group known as "the spirits". It's a simple, idyllic kind of life. One day she meets a young man named Harris, who has heard a fable of her and came to investigate the truth of it. The two become friends, and after spending time with her, Harris decides to go off to a place called Kirkhall to study what is called Academic Magic.

The setting is not the standard "medieval" fantasy kind of setting, but something more like early Enlightenment era. Really, not much of it has been revealed yet, so that's mostly a surmisation. We are not even finished with the prologue.

Go read it.

After you've read it, come back here and let's talk about it. There's not much of it (so far), so should be easy.

There are SPOILERS below.

Labels:
fiction,
magic,
world's worst scientist

Subscribe to:
Posts (Atom)