# Sunday Function

Time for a vacation! Grab a globe of the earth and pick a random number between 0 and 180 degrees for your latitude and between 0 and 360 for your longitude and set off on your vacation. It's exciting! You're bound for anywhere on earth, and every obscure location has the same probability of being chosen!

"Not so fast," the stern voice of vector calculus intones. "In fact not every location is equally probable. You're most likely to be visiting one of the polar regions if you pick a location using your method."

Why is this? Picture abstractly a globe of the earth with a latidude and longitude grid laid over it, like so:

What you've done is to pick a latitude and longitude with uniform probability. This means you're equally likely to end up in any one of those square-ish grid sections. But the grid sections each contain less area as you get closer to the poles and so the grid density per area increases as you go farther from the equator. There's more opportunities to land near a pole than elsewhere.

Well, you have nothing against the polar regions but you don't want to be biased. How can you pick a latitude and longitude such that every location has equal probability? The answer is that you need a weighting function to artificially even out the probabilities. This is called in vector calculus the differential element of solid angle. For spherical coordinates it's our Sunday Function:

So as you go toward the equator the sine of the angle between your location and the earth's polar axis approaches a maximum and therefore the probability density reaches a minimum. Correcting for this requires a little bit of manipulation from this formula which I will skip, but you can read about the technical details here. Once you do the correction, you can pick latitude and longitude weighted in such a way as to make your random location uniformly distributed on the surface of the earth.

Now you'll probably end up vacationing in the ocean, but I'll leave correction for that as an exercise for the reader!

Tags

### More like this

##### Sunday Function
Here is a picture of the earth, with latitude and longitude lines in ten-degree increments: Despite the fact that each vaguely rectangular area formed by the intersection of those lines forms a 10 degree by 10 degree region, the actual square-mile area of each rectangle varies. The ones near the…
##### Measure the Tilt of the Earth on the Solstice! (This Wednesday!)
"Soon the earth will tilt on its axis and begin to dance to the reggae beat to the accompaniment of earthquake. And who can resist the dance of the earthquake, mon?" -Peter Tosh Every year, there are two special days where every place on Earth receives the same amount of sunlight -- 12 hours --…
##### And so I'm where, exactly?
"And you may find yourself in another part of the world. And you may find yourself behind the wheel of a large automobile. And you may find yourself in a beautiful house, with a beautiful wife. And you may ask yourself, 'Well, how did I get here?'" -Talking Heads What would you do if you woke up…
##### The solstice (in a two-sphere cosmos).
Here in the Northern Hemisphere (of Earth), today marks the Winter Solstice. Most people have some understanding that this means today is the day of minimum sunlight, or the longest night of the year. Fewer people, I think, have a good astronomical sense of why that is the case. So, in honor of…

The other day I was asked to explain why physicists use non commutative groups to one of my young relatives. I asked her, "suppose you were somewhere on the earth. You walk 1 mile north, than 1 mile east, then one mile south, and finally 1 mile west. Do you end up where you started?"

On getting an answer of "yes", I said, okay, "what about 100 miles?" "1000 miles?" Getting out a globe, I showed that, indeed, you clearly don't get back where you started for 1000 miles, and so this suggests that you only get back to where you started approximately for the 1 mile case.

By Carl Brannen (not verified) on 19 Oct 2008 #permalink

And, of course, thanks to Archimedes, if you pick "z" randomly rather than latitude, you don't need a weighting function.

By Pseudonym (not verified) on 19 Oct 2008 #permalink

I don't think the premise here is correct!

while it i's true there is less area closer to the poles, the probability that you will pick any particular latitude is the same.

You have equal probability of picking the equator as you do the poles, or any latitude in between.

It is true, however, that it is more likely that places near the poles will be more likely to be within a specified distance to a meaningful location (such as a city), because the distribution of random locations will be denser, but there is no difference in the probability that the location you choose will be any specific latitude.

That's actually the main issue - that a random latitude and longitude isn't equivalent to a random piece of area. Your odds of landing on a specified square mile in Barrow, Alaska are significantly higher than your odds of landing in a specified square mile in Equador.

I agree, but the way you stated the premise: "There's more opportunities to land near a pole than elsewhere." That statement is not correct.

Looking only at latitude, you are equally likely to choose a high number as a low number.

Looking at longitude, there are equally many degrees of longitude at 89 degrees as there are at the equator.
That the random locations are closer makes no difference, they are still distinct locations.

The only reason area would come into the picture is if you were to say that if two locations were within a specified distance of one another, they count as the same location.

It seems like you are treating degrees of latitude and longitude as units of distance, but they are units of angle.
It doesn't matter how big the circle is a degree is still a degree, whether it's length is an inch or a mile.

Actually looking at things in terms of area is inescapable. The probability of landing on any given location is exactly zero everywhere, as there's an infinite number of possible locations. The differential area element represents an areal probability density, which only makes sense integrated over some area.

"while it i's true there is less area closer to the poles, the probability that you will pick any particular latitude is the same."

True, you will not be more likely to be near the pole, rather, your chance of being within Antarctica will be larger than one would expect, given Antarctica's area. You have a better chance of winding up in a given square metre in Antarctica than a given square metre in Barbados.

"You're most likely to be visiting one of the polar regions if you pick a location using your method."

This is misleading. I read that to mean you're likelier to be closer to the pole than the equator.

"Your odds of landing on a specified square mile in Barrow, Alaska are significantly higher than your odds of landing in a specified square mile in Equador"

This is correct.

There are far fewer specifiable square miles within a given distance of either pole than there within the same distance of the equator. Therefore, your chance of landing within a given distance to either pole should be the same as your chance of landing within the same distance from the equator.