Two nuclear submarines collided in the Atlantic, prompting my friend Sam to wonder, "what is the probability of two submarines colliding in the ocean?" Ignoring that we now know the true probability is 1, we can estimate the probability of collision by calculating the ratio of the volume of water through which the world's fleet of submarines travels in, say, 30 years to the total volume of the earth's oceans.
Fortunately, the news article, Wikipedia, and the rest of the internet have most of the values we need:
In 30 years (2.6×105 hours), one submarine will travel about 46 km/h × 2.6×105 h ≈ 1.2×107 km. That is about 8.5×107 times its own length. One submarine displaces 15,000 tons (1.36×10-5 km3) of water, so during that time it will travel through a volume of about 1.36×10-5 × 8.5×107 = 1,178 km3. With 250 such submarines, the total volume traveled comes to 2.94×105. The ratio of that to the volume of the world's oceans is 2.94×105 / 1.3×10^9 = 2.3×10-4.
Therefore, the probability that a fleet of 250 randomly-traveling Le Triomphant-sized submarines will have at least one collision in 30 years is around 1 in 5000.
This assumes that the average displacement of all subs deployed during those 30 years is roughly equivalent to 250 Le Triomphant class-sized subs. I have no idea if that is a valid assumption because I was unable to find a definite number for how many submarines are currently active, much less the year-to-year count or average size. Does anyone want to scrape Wikipedia's list of submarine classes to aggregate the average displacement and deployment numbers by year? Also, the number of submarines has decreased since the end of the cold war.
Check my math with the following Python script.
print "Q. What is the probability of two subs accidentally colliding in the ocean?"
print " http://www.dailymail.co.uk/news/worldnews/article-1146124/"
days_per_year = 365.24
hours_per_day = 24.0
return years * days_per_year * hours_per_day
lbs_per_ton = 2000.0
liters_per_lb = 1.0 / 2.2 # of water
cubic_km_per_liter = 1.0e-12
return tons * lbs_per_ton * liters_per_lb * cubic_km_per_liter
ocean_volume = 1.3e9 #km^3 http://hypertextbook.com/facts/2001/SyedQadri.shtml
number_of_subs = 250.0 # http://en.wikipedia.org/wiki/Nuclear_navy
travel_time = years_to_hours(30.0)
# Submarine Characteristics
sub_displacement = tons_to_cubic_km(15000.0)
sub_speed = 46.0 #km/h
sub_length = 0.14 #km
travel_distance = sub_speed * travel_time
volume_traversed = (travel_distance / sub_length) * sub_displacement
fleet_volume = number_of_subs * volume_traversed
ratio = fleet_volume / ocean_volume
print "A. %g" % ratio
Lucas says the following on the mailing list on which I originally posted the calculation:
nice! I don't know if the analysis is right, but it gives us an upper
bound at least!
Brett's calculation is equivalent to the following: set out 250 subs
that randomly teleport to cover the right volume. None of the subs
ever visits space that it or any other sub has been before. Now,
what's the probability of choosing a spot that a sub has been if I
were to randomly teleport a new sub into the ocean after 30 years?
I imagine this will over estimate a bit.
Since the total volume of the subs is much much smaller than the volume of the ocean, I think we can safely ignore "overlapping" yet non-colliding paths. Other than that, I think it is a good characterization.
The rules are simple: the player bets between one and one less than his or her total number of lives and presses a button to set the two wheels spinning. He or she then presses the button again and the wheels slowly spin down to plus or multiply on the left and zero, one, two, or three on the right. The player wins the number of lives in the expression formed from the bet, the operator on the left wheel, and the value on the right wheel.
I was curious how many lives the user could expect to win in this game, and because I'm taking a statistics course this semester, I had the power to satisfy this curiousity. What follows is an explanation of the calculation I performed and its surprising results:
There are 6 multiplies and 8 additions on the left wheel. On the right, there are 7 zeroes, 4 ones, 2 twos, and 1 three. I'm assuming that all values on either wheel are equally likely. Let W be the amount won.
Step One: List All Possible Outcomes
Because there are two possible values on the right wheel and four on the left, it is obvious that there are 2 * 4 = 8 possible outcomes:
W1 = bet + 0
W2 = bet + 1
W3 = bet + 2
W4 = bet + 3
W5 = bet * 0 [This result is the worst; the player loses everything]
W6 = bet * 1
W7 = bet * 2
W8 = bet * 3 [This result is the best, and as we'll see in step two, the most rare]
Step Two: Calculate the Probabilities
One can easily see that:
P(plus) = 6/(6+8) = 6/14
P(multiply) = 8/14
P(zero) = 7/14
P(one) = 4/14
P(two) = 2/14
P(three) = 1/14
From these basic probabilities, one can calculate the probabilities of all possible outcomes:
P(plus and zero) =
P(plus) * P(zero) = [because the wheels are independent]
8/14 * 7/14 =
P(W2) = 8/49
P(W3) = 4/49
P(W4) = 2/49
P(W5) = 3/14
P(W6) = 6/49
P(W7) = 3/49
P(W8) = 3/98
Step Three: Calculate the Expected Value
The expected value is defined as the sum of each value times the probability of getting that value. Basically, we take each outcome from part one and multiply it by its corresponding probability from part two to find the weighted average:
In the long run, the player can expect to win an average of (89/98)
* bet + 22/49 lives on each spin.
It surprised me to find that this game doesn't always favor the player. On large bets, the player can expect to lose lives in the long run. For example, if I continually bet 10 lives, I could only expect to win an average of 9.5 lives on each spin. Conversely, if I were to bet only two lives, I could expect to win an average of 2.25 lives. I found it even more surprising that the player can expect the most return, about an additional .35 lives, by betting the minimum one life on each spin. That's a good deal.
Why winnings decreases as the bet increases becomes obvious when we
try to calculate the gain rather than the winnings. We'll define the
gain G to be the amount above the bet that the player wins. So, we can
calculate the expected gain as follows:
E(W) - bet =
(89/98) * bet + 22/49 - bet =
-(9/98) * bet + 22/49
The expected gain is downward-sloping, so as the bet increases,
By setting the expected gain equal to zero, we can
determine the point above which the player can expect to lose lives.
E(G) = 0
-(9/98) * bet + 22/49 = 0
bet = -(22/49) * -(98/9)
bet ~ 4.9
This tells us that the player can bet up to four lives and expect
to gain lives in the long run. Above that, at a bet of five or
more, the player can expect to lose lives.
It makes me wonder if Nintendo planned it that way to help the struggling players but hold back the greedy ones.