Geometric Probability In "Eye Of The Needle"
Look. We all have our issues. We all have our obsessions. There was never any way I was going to let “Eye Of The Needle” get away with its seemingly terrible understanding of probability. I do this professionally; it’s literally my job to correct people when they get this stuff wrong. So, in this first IDFC bonus post, let’s talk about the idea that there’s a one in four chance of a wormhole opening in the Alpha Quadrant, and why it got my teeth grinding like two Stonehenges wrestling.
First of all, the science, at least as I (barely) understand it. A wormhole is a curve in space, and the closer the two ends of a wormhole are, the steeper the curve needs to be. That actually makes wormholes that cut over short distances less likely than ones with apertures that are further apart. As an analogy, imagine you have a particularly flexible tree branch in your hand; one so bendy it won’t ever snap. Now imagine painting two dots on the branch and bending it until those points touch. If the points are far apart this actually takes much less effort than if they’re close together. Long wormholes are therefore much more likely than short ones, and by “long” I mean intergalactic long. It’s more plausible that wormholes could allow travel between galaxies than within them.
But fine. That clearly isn’t the way Trek wormholes work, for whatever reason. Maybe all that mucking about with warp drives did more damage to space-time than anyone realised, and the laws of physics have gone all Jackson Pollock. Let’s assume then that franchise wormholes almost always tend to be intragalactic. At that point it genuinely does seem reasonable to assume any given wormhole has a one in four chance of leading to the Alpha Quadrant. After all, the galaxy is roughly symmetrical, in both shape and mass. There’s no obvious reason any given quadrant would be hogging all the spatial anomalies.
However. There’s a big difference between wormholes being equally common in each quadrant, and a wormhole aperture in the Delta Quadrant having the same chance of leading to each quadrant. To use the most obvious analogy possible, believing you’re equally likely to find a worm in each part of your garden is different to believing a worm you just watched bury itself into the earth in one garden corner is as likely to pop up again in the opposite corner as the one you just saw it in.
I promised maths to you, and I SHALL DELIVER. First of all, let’s settle on our model. I’m going to need to take some liberties in order to make my job a little more manageable. For instance, our galaxy has a spiral cross-section, and isn’t of uniform depth. Holding to these facts would make our calculations and our diagrams quite complicated, so I’m going to simplify things a little and assume our galaxy is elliptical, and also that the distance a wormhole aperture has above or below the galactic plane isn’t really relevant (the Milky Way is far wider than it is tall, after all).
We’ll therefore use the model shown below for our galaxy. Distances are in thousands of light years. From checking out various online sources regarding the location of Earth and how the Vulcans originally carved up the galaxy, we can place Earth (in blue) and the four quadrants in this model fairly easily.
Another simplification is needed now. I’m going to assume that “Caretaker” moved Voyager seventy light-years away from Earth itself, rather than the Badlands or the nearest point in Federation space. Given how often Earth is used as a metonym for the whole of the UFP, I don’t feel too bad about this choice, especially since there’s no easy way to work out what area Starfleet is buzzing around in anyway - and since the show itself ends with Voyager reaching Earth. On the graph below, then, I show all points in the Delta Quadrant which are exactly seventy thousand light years from Earth, making them contenders for the approximate location of the Caretaker’s array.
Since their initial relocation, the ship has probably reduced their spatial arrears by 250 light years or so. That’s not really enough distance to actually show up on the figure, though, so we’ll stick with the red curve above. Unfortunately, there’s not much to go on regarding where on that curve our heroes currently reside, since we’re only ever given the direct distance home. That said, we can make some educated guesses. Fortunately, “Educated Guess-Maker” would be on my business cards if I actually had any. For instance, the further the ship is from the border with the Gamma Quadrant, the less time they will spend in the Delta Quadrant on the way back. As can be seen in the above figure, there are points on the red curve that, were Voyager to have started there, the direct route home would require spending more time in the Beta than Delta Quadrant, something I don’t remember the show ever discussing. That argues for putting their initial position near the vertical axis. Maybe not too close, though, since the ship is headed directly for Federation space, rather than to the Bajoran wormhole in the Gamma Quadrant.
It doesn’t really matter. This post is intended to be about the application of probability theory to Trek wormhole mechanics. If I get the ship’s position out a little (or even a lot) it shouldn’t matter too much to what I’m focussing on. Here then, as best as I can work out, is the rough position of the USS Voyager as of stardate 48579.4, when Harry Kim’s Miniscule Hole was discovered.
At last we arrive at the crux of my point. As I’ve said above, the assumption that a randomly chosen wormhole is equally likely to have an exit in the Alpha quadrant is a reasonable one. Certainly there’s no obvious reason why this wouldn’t be true, and it’s pretty common in at least undergraduate-level probability models to make this kind of assumption unless you have compelling evidence against it (we shall come back to this). The most complicated probability models are sufficiently terrifying that, all things considered, it makes more sense to start simple and demand evidence of complexity rather than the other way round.
The fundamental problem is this: once you know the wormhole in question is in the Delta Quadrant, you actually have to break assumptions of equal chance to believe there’s a one in four chance of its other end being in the Alpha Quadrant. Again, consider the worm. In order to believe the pink hermaphrodite you just saw turning subterranean is as likely to re-appear on the opposite corner of your garden as the one it burrowed into, you actually have to believe that the worm is more likely choose some directions than others. You also have to make some pretty odd assumptions about how far the worm is likely to travel, too.
Confused? Things should get clearer once we return to my nice accessible galaxy map. I need to add in some more assumptions first, though, so we can run a simulation or two. Don’t worry; I’ll interrogate these assumptions later. For now, though, let’s work on the principle that if Voyager enters a wormhole, they are equally likely to travel in any given direction (again, we’re only considering 2D displacement). Let’s also assume we have some idea of what the average length of a wormhole is, and how far from that average length any specific wormhole might deviate. In mathematical parlance, we have the mean and standard deviation of the wormhole length.
Standard deviation might be a step too far for the layperson, so I’m going to spend some time offering some insight into what it actually is (those that are comfortable with it can skip this paragraph). Imagine you are buying fruit from the supermarket. If you’re buying apples, you might expect the mean number of apples in a bag to be six. If so, you’d also expect the contents of any given bag to be very close to six. If the bag is sold according to the weight of the apples, you might get seven apples if some are a bit small, or maybe five if you have a monstrously large fruit in there somewhere, but the number of apples in any given bag will never be all that much different from six. We would say in this situation that the standard deviation of the number of apples is small, because what you get is equal to or very close to the mean value. Now think about buying raisins instead. Imagine that the packaging tells you that there’s 200g of fruit in the bag, and that the mean number of raisins in the bag is six hundred. It shouldn’t be difficult to believe that in any single specific bag there will be a lot more/fewer raisins than precisely six hundred, because raisins are small and sneaky. This doesn’t imply that higher means always suggest higher standard deviations – you’d expect more standard deviation in apple bags sold by weight than, say, a box of coffee pods which promises to contain precisely 100 such pods. It’s about how far from the average value you realistically expect to see any individual value get.
Everyone got that? Good. So how does any of that relate to wormholes? I shall tell you. The basic idea is this: a larger mean wormhole length means we expect to travel further through such an anomaly. A larger standard deviation of wormhole length means we expect a bigger difference between the average journey length and that of any specific journey – the journey length becomes less reliable, in some sense.
We’re pretty close now to being able to simulate possible exit points for Kim’s wormhole. All we need now is a description of how deviations from the mean actually vary. Are shorter-than-average journeys as likely as longer-than-average journeys? Are journeys that are only slightly longer than average more likely than journeys that are much longer than average? These kinds of considerations are dealt with by what we call the “distribution” of wormhole lengths. It is the distribution which allows me to generate numbers I can use to simulate wormhole lengths, and the choice of that distribution makes a big difference to how the questions above would be answered. For the mathematically literate, I’m starting off assuming the distance between a given wormhole’s two ends is exponentially distributed. For the rest of you, we’re going to begin by exploring the idea that wormholes are more often than not of below-average length.
(Occasionally people are surprised that this is possible. How can more distances be below average than above average? Surely the whole point of an average is that you have as many values above the average as below it? Well, not actually. That’s what the median means, but not what the mean, er, means (mathematicians seldom help themselves when it comes to names). Consider the following set of numbers: 1, 1, 1, 1, 1, 1, 1, 1, 1, 991. The mean of these numbers is 100, and all but one of the numbers are below that value. In the exponential distribution very large values occasionally happen, and this drags the mean value upwards so that the much more common small values lie below it.)
Right. Let’s give this a shot. Let’s use the specific form of exponential distribution which gives us a wormhole a length of two thousand light years on average. The standard deviation of this distribution is also two thousand, which maybe isn’t much use to quote, but tells mathematicians that 95% of our wormhole lengths will lie between 50.6 and 7377.8 light years. I’ll assume all directions of travel are equally likely.
Having done all this, I can simulate, say, ten possible locations for the wormhole exit, shown below. All I’ve done here is randomly choose a direction and a distance from Voyager ten times using the R computer package.
This is only a fraction of the options, of course, so let’s cover more possibilities by generating a thousand possible wormhole exits.
As you can see, under the assumption of exponentially-distributed wormhole lengths with a mean of two thousand light years, there’s pretty much zero change of Voyager ending up in the Alpha Quadrant. Even the Gamma Quadrant seems pretty unlikely. Let’s try increasing the mean length of a wormhole, then. Below is what we get if we stick with using the exponential distribution, but increase the mean length to ten thousand light years. Under this assumption, 95% of wormholes have a length between 253.2 and 36888.8 light years.
Now the Gamma Quadrant is in play, but still not the opposite side of the galaxy. You’ll note though that there are some points (46 out of 1000, in fact) that lie outside our simplistic model of the Milky Way. Since we’re assuming that can’t happen – there can’t be a one in four chance of ending up in each quadrant if there’s some chance of not ending up in the galaxy at all – there are two options here regarding what to do with them. I can cast them aside, or I can truncate the wormhole’s distance so they stop at the edge of the galaxy. I’m going to use the former, mainly out of mathematical simplicity – calculating all the locations these 46 courses intersect with the galactic boundary would be a bit of a faff. As a result, I actually break the assumption that all directions are equally likely – the more “northerly” the direction chosen the more likely the wormhole will end up outside the galaxy and therefore be removed – but the alternative is to assume that wormholes are most dense on the galactic rim. If that were true you’d actually expect Voyager to be heading away from Earth, not towards it.
The revised figure is below.
It’s hopefully obvious how we can solve the problem of never reaching the Alpha Quadrant with these possible exits; we can simply keep increasing the mean length of a wormhole. The problem is that by doing so we still won’t ever have the same chance of arriving in each quadrant. Let’s try a twenty thousand light year average next, and this time display a hundred thousand possible exits.
At this point we CAN reach the Alpha Quadrant, but it’s still vastly less likely than any other result: less than 1% of the possible exits are in the Alpha Quadrant even after we remove extra-galactic options (which were 22.3% of the total). More to the point, we can see that wormhole distances of less than, say, twenty-five thousand light years are much, much more likely than longer ones; the number of possible exits within that distance of Voyager are so great we can’t even make them out as little circles any more, they’re just an unbroken black blob (high-level maths terminology, there). The more we increase the average length, the more of our simulated exits will end up in the Alpha Quadrant, but the imbalance will remain. Shorter journeys will always be more likely than longer ones. We’re always more likely to end up in the Delta Quadrant than the Alpha.
Of course, all of this assumes that wormhole lengths are actually exponentially distributed. Maybe they’re not. There’s lots of other possibilities. We could for instance try using the normal distribution (the behaviour underlying that pesky bell curve you might have heard about). With the normal distribution, we actually do have that values are just as likely to be above average or below average. In fact, we can go further; the bell curve is symmetrical, meaning in practice that the chance of being above average by any specific amount is the same as the chance of being below average by that same amount. A specific normal distribution is defined by that average, and also the range in which we expect a given percentage of all values to fall.
Let’s give that a try, then. Below I’ve simulated one hundred thousand wormhole exits where the mean distance from entry to exit is fifty thousand light years, and 99% of wormhole lengths are within five thousand light years of that mean distance. Once again, all directions are equally likely.
We again remove the extra-galactic options (just over half the points on this occasion):
This time the wormhole exit is more likely to be in the Gamma or Beta Quadrants than the Delta Quadrant. The Alpha Quadrant still looks (just!) like the least likely option, but by increasing the mean length of wormhole we could very quickly find a model under which the Alpha Quadrant and the Beta Quadrant are both much more likely destinations than the Gamma or Delta. In fact, it’s entirely possibly we could find a mean and 99% value range which actually would give a one in four shot of arrival in the Alpha Quadrant.
Isn’t that game over, then? It would seem that at least in theory, we can find a situation where if enough of our assumptions pay off Kim’s wormhole might actually have a 25% of getting the crew back to their home quadrant. It would require that the ship be in just the right point in the galaxy, but it’s conceivable Janeway and Tuvok already know that this is the case. It would also be terribly unlikely that the chances of ending up in one of the other three quadrants would also all be one in four, but technically no-one actually claims otherwise. I can be as suspicious as I like about the thinking behind this comment, but I guess I can’t claim to be sure.
We are still left with issues to consider though. Take another look at the figure above. We can perhaps imagine increasing the radius and/or thickness of the black band above so that one quarter of it overlaps the Alpha Quadrant. Even if we did this, though, it should be clear that some areas within the quadrant would be more likely destinations than others. This seems like something our heroes should be considering. What if they find a wormhole to the Alpha Quadrant, but it leads to territory deep in the Cardassian Union? Or a star-system filled with ill-tempered Tholians? Or the Tzenkethi Throneworld? Better to end up in, say, a Klingon-controlled system in the Beta Quadrant than any of those, surely? There’s any number of places in the Alpha Quadrant which would be unacceptably dangerous for Voyager to appear in. And not just for the ship itself. Our crew might conclude that as far as they were concerned, there’s no location in the Alpha Quadrant so perilous it wouldn’t be worth the amount of distance shaved off their journey to arrive there (though even if the ship were instantly transported to the closest point in the Alpha Quadrant from their current position, they’d still have a roughly twenty-year journey back to Earth). But they’re still (mainly) Starfleet. I doubt Janeway would be prepared to risk kicking off an interstellar war by showing up deep in a hostile power’s space and claiming a wormhole sent them.
In short, even if the probability quoted is right – which it almost certainly isn’t – it’s still a daft to focus on it (he says, 3000 words into obsessively tearing it apart). And this consideration still holds even if we remove the assumption that some areas in the Alpha Quadrant are more likely to contain the wormhole exit than others. Which brings me to my final point. With all my mucking around with exponential and Normal distributions above, I’ve been ignoring the elephant in the lecture hall. Why not make the assumption, as the writers almost certainly did, that because a wormhole exit can appear in any given place, it’s equally likely to appear in any given place?
Assuming this property means applying what’s called the uniform distribution, and we use the idea in a huge number of situations, from dice rolls to raindrops hitting the pavement. Indeed, it’s so foundational an assumption in probability that for many people it doesn’t feel like an assumption at all, more like the lack of one. After all, if you’ve no idea where a raindrop will fall, why assume some paving slabs are more likely to be hit than others? If you have a dice in your hand and you’re about to roll it, why assume the dice is badly made or even loaded? The problem, though, is that an assumption of fairness is actually much harder to justify than its converse. Imagine you have a coin in your hands and you’re about to toss it. Which seems more likely: that it is exactly as likely to come down heads as tails? Or that for whatever reason – poor mixing of components, damage to the coin, asymmetric design, actual malpractice – the chance of heads and tails are at least a tiny bit different? Any specific assumption about exactly how the coin is biased is a strong one, but claiming the coin is more likely to be fair than not fair is actually pretty hard to justify.
In addition to that, as I mentioned above the problem with assuming the exit to a wormhole you’ve found is equally likely to be anywhere in the galaxy is that it forces you to assume some directions and distances of travel are more likely than others. There’s more galaxy coreward of Voyager than there is rimward, for instance, so assuming all locations are equally likely actually means believing wormholes near Voyager will more often point coreward. Coreward wormholes would also have to be longer on average than rimward ones, since there’s so much further you can go in that direction. In short, if you want to assume locations are uniform, you are required to assume neither direction nor distance can be as well.
(This commonly happens in probability, actually; you often find that you have multiple elements to a situation you’re modelling, and if you assume a uniform distribution for some of them you automatically rule out a uniform distribution for others. Maths is tricksy.)
Be that as it may, though, the assumption of uniformity does help us answer one question: what is the probability of the Kim wormhole actually getting Voyager closer to Earth than they currently are? This is a much better question to ask than whether a wormhole opens in the Alpha Quadrant. The answer remains of limited use, since there’s still all sorts of places the ship wants to avoid, whether that be the well-known borders of the Romulan Empire’s galactic westward holdings, or the unknown sprawls of the Dominion or the Borg. Since this issue applies to the one in four value too, though, it seems hard to argue that this alternative approach isn’t a superior one.
Plus, it lets me employ geometry too, which makes for a nice change. I won’t bore you with the combination of trigonometry and trapezium rule I used to put this together this, but by my calculations (mainly done on a scrap of paper in a pub, so, y’know…) just over 86% of the galaxy is within seventy thousand light years of Earth, and therefore closer to Earth than Voyager’s current position. You can see this if I return to an earlier figure and extend the red arc representing that distance from our planet. A wormhole leading back to the Alpha Quadrant is unlikely. A wormhole that would get the ship closer to home is much more plausible, though of course the closer they get home the less likely any wormhole they find would actually help them out.
In conclusion, then: the idea a wormhole in the Delta Quadrant has a 25% of leading to the Alpha Quadrant is almost certainly wrong for both physical and mathematical reasons, and even if it isn’t, there are powerful reasons not to focus on that value in any case. The value of 86% is also shot through with problems – though there’s no way to improve upon it without knowing the amount of space the United Federation of Planets covered (though I know it was less than 11% as of TNG season 1) – but nevertheless it is an improvement upon the episode’s own value according to its own logic.
Phew. That was fun! Four thousand words and twelve diagrams based on a throwaway comment. What a glorious and total waste of our valuable mutual time.
I can’t wait to do it again.
Comments