February 5, 2010
Category:
I'm still not happy about NASA scrapping Ares and the manned lunar/Martian plans, but I'm less unhappy than I was. As long as unmanned planetary science picks up most of the slack I'll grudgingly deal with it. The extra earth science is still stupid; if you want more of that, get NSF or NOAA to do it.
Mars exploration has been back in the news recently too, with the Spirit rover finally breaking down and getting stuck in place permanently. This is pretty impressive - it was originally designed to work for 90 days but here it is still functioning 6 years later. Even as a stationary platform it can continue to do interesting science. The main concern is keeping it sufficiently powered during the coming Martian winter. The rovers are solar powered, and solar energy is increasingly hard to come by as you move farther from the sun. It's why probes that go to the outer planets are pretty much never solar powered.
Here's the reason. The sun dumps its energy out evenly in all directions. By the time it gets to Earth, that energy is spread over a sphere with the same radius as the Earth's orbit. The surface area of a sphere is 4*pi*r^2, so the sunlight energy flowing in through each square meter of sun-facing solar panel is the sun's total output divided by that area. You can do the math, and it'll turn out to be around 1300 watts per square meter.

Inverse Square Law, from Wikipedia.
But if you move to Mars, the radius that the sunlight is being spread over is much larger. Mars is about 1.5 times farther from the sun than the Earth is, so the power is reduced by a factor of (1.5/1)^2 = 2.25. That's less than 600 watts per square meter in the ideal case, which a rover on the Martian surface assuredly is not.
What about the Cassini probe orbiting Saturn? Saturn is about 9.5 times farther from the sun than the Earth, so the sunlight there is reduced by (9.5/1)^2 = 90.25. That's about 14 W/m^2 in the ideal case, which is why Cassini is nuclear-powered. The New Horizons mission to Pluto? By the time it gets there the available solar power will be reduced by a factor of around 900. It's nuclear-powered as well.
Conversely, probes to Mercury and Venus have all the solar power they want. Unfortunately those planets present their own unique challenges, and adequate power is pretty far down the list.
Posted by Matt Springer at 11:55 AM • 8 Comments • 0 TrackBacks
February 2, 2010
Category:
Every year there's a Super Bowl, and every year the whole shebang gets started by a famous person tossing a coin into the air. The team winning the toss gets to decide whether they want to begin the game on offense or defense. Theoretically this choice might produce an advantage. If so, would be interesting to know how much. The same thing happens in physics - just how much signal is hidden in the random noise of an experimental apparatus?
Let's take a look at the numbers and try to see what kind of advantage the toss-winning team has. The data is pretty straightforward - in 43 coin tosses, the winner has gone on to win 20 games and lose 23 games. As such it would seem that winning the toss is a disadvantage. But is it, or is the seeming disadvantage just a matter of the random fluctuations inherent in a small sample size? Keep in mind that the fairness of the toss itself isn't really the issue. If they all came up heads that wouldn't necessarily have any bearing on whether winning that biased toss was actually an advantage in winning the game. We just want to know if a toss win has any bearing on game outcome.
If there were no relationship between wining the toss and the game, we can expect that the probability of a game win is 0.5 given a toss win. Now it's time to break out some math: since the sample size n = 43 and probability p = 0.5, the normal distribution of mean np and variance np(1-p)is a good approximation for the distribution of game wins that the toss winner ought to experience.

Probability distribution of wins with n = 43, p = 0.5
The standard deviation is the square root of the variance - in this case, the standard deviation is 3.28. In the normal distribution, about 68% of the time the actual number of successes is within one standard deviation of the mean. Here, the mean is 21.5 game wins. Therefore there's a very good chance (~32%) that statistical fluctuations will put the actual number of game wins outside that range without the toss giving an actual advantage or disadvantage. Thus if the number of game wins is inside the range 18-25, we have no grounds for concluding that victory in the toss affects victory in the game. Since the actual number of game wins is 20 - well within that range - it's not especially likely that you need to worry if your team loses the toss. If the actual number of game wins were outside the one-standard-deviation interval but within the two-standard-deviation interval (about 14-28) we might raise an eyebrow, but we still wouldn't necessarily be on very solid ground to assume a relationship. Outside the two-standard-deviation interval we might be justified in suspecting a relationship between toss wins and game wins. A larger n would help clarify the issue, as it shrinks the standard deviation compared to the expected number of wins.
The coin toss that determines possession in overtime is another story. There the number of game wins compared to toss wins is wildly out of proportion to the p = 0.5 hypothesis, and the winner does in fact have an important advantage. But that's a story for another time.
[Statisticians will justly note that what I have not strictly done is to calculate estimated probability of a game win given a toss win. This is true, but is also more complicated and doesn't accomplish much that we didn't already learn by working in terms of deviation from an assumed p = 0.5.]
Posted by Matt Springer at 3:29 PM • 24 Comments • 0 TrackBacks
February 1, 2010
Category: Sunday Function
Step right up, Ladies and Gentlemen! Get your ticket to see the True Oddities of the Natural World! Do not be taken in by the Shameful Forgeries at Inferior Circuses, here you will see Genuine Curiosities from the Mists of Time! Beside these Archaic Functions, the Two-Headed Horse or Whatever is a Mere Bagatelle!
So, why do we bother having a sine and a cosine? They're the same thing, one just happens to be shifted. Whatever angle you plug into cosine, you'll get the same result if you plug that angle plus 90 degrees into the sine. Why not just scrap one of them entirely and just teach the idea of plugging in the equivalent angle?
And certainly you could. They are the same function, up to that shift. But in many other senses, they're different functions entirely. They have opposite parity properties, they satisfy differential equations with entirely different initial conditions, their Taylor series expansions don't share a single term, they're entangled with the theory of the complex numbers in different ways, and so on. In that sense the fact that these two very separate functions are really the same is a deep property of mathematics.
As such, we have the sine and cosine and mathematicians would generally be horrified at the suggestion that we scrap our notation that treats them independently. But this hasn't been true for every trig function in the past. Some permutations of sine and cosine were originally useful for some obscure (usually navigational) purpose, but as their practical utility waned they were forgotten. Since they didn't really have independently important mathematical properties of their own, they're now written only in terms of the "standard" sine and cosine functions. Just for today, we'll reanimate a few of them Frankenstein-style and see what they look like:
The Versine:


Back before electronic calculators, it was pretty irritating to have to square small numbers. Since the square of the sine pops up in trig very frequently, it was useful to have tables of the versine pre-computed in a book. For the same reason there was also the vercosine, which is the same function with the sine squared switched out for cosine squared.
The Coversine:


Just like sine and cosine are shifted from each other, the coversine is just the versine shifted. There's also the covercosine, which is shifted from the vercosine in the same way.
The Haversine:


The haversine is just the versine divided by 2. It found its use mostly in navigation, where it can be used to find the distances between two points on a sphere - such as the earth. The haversine has its own twin, the havercosine, which is the vercosine divided by 2. I'm getting tongue-tied just typing this.
The Hacoversine:


I promise I'm not making these up. Like its cousin the haversine, the hacoversine is mainly useful for doing trig on a sphere when you don't have a calculator handy to square the familiar trig functions. Does it have a twin like the other functions above? Does a bear, uh, eat berries in the woods? Of course it does. The hacoversine has a twin which is just the covercosine divided by 2. It's called, I am sorry to say, the hacovercosine.
Let's just say I'm happy to stick with the good old sine and cosine.
Posted by Matt Springer at 11:39 AM • 11 Comments • 0 TrackBacks
January 29, 2010
Category:
I believe we have a Super Bowl coming up. Or, if the NFL is so picky about the use of their trademarks, I believe we have a "Big Game" coming up. As a native south Louisianian, I'm for the eternally long-suffering Saints, who in all their years have never even been to a Super Bowl. That hypothetical situation was really a part of New Orleans culture - instead of "when hell freezes over" it was always "when the Saints win the Super Bowl". Maybe they'll finally do it. I'm not holding my breath, but honestly New Orleans is pretty much crazy with joy that they actually made it to the game.

Fig 1. Drew Brees doing a classical dynamics problem.
We can add some physics to the mix, too. Let's figure out a football's trajectory in terms of the initial throw. We know that as soon as the ball leaves the player's hand there's only one force acting on it - gravity. Well, there's air resistance too, but a football is pretty aerodynamic so we'll just ignore it as a first approximation. Gravity acts vertically downward, so the ball will begin accelerating straight down. But there's no forces acting in the horizontal direction, so according to Newton there's no change in horizontal velocity. This constant sideways velocity combined with an accelerating downward velocity gives us the arc that we're all so familiar with.
Some of the energy of the initial throw will give the ball an initial upward velocity, and some will give it an initial horizontal velocity. By some classic trig, the first is the speed of the throw times the sine of the angle of the throw, and the second is the speed times the cosine of the angle. Write these down:


Here x0 and y0 are the initial coordinates of the ball; we'll let them both equal 0 for convenience. Theta is the angle of the throw, v0 is the initial speed. a is the acceleration due to gravity, which is -g, or -9.8 m/s^2. The minus is because it's accelerating downward.
Both of these equations contain the time t, which means they describe the x and y positions as a function of time after the throw. If we're only interested in total range, we can solve one of them for t and plug it into the other. At the end of the football's arc, it's y position will be 0. So set y = 0, solve the y equation for t, and plug that into the x-equation. That gives you the x-position at the time at which the football has hit the ground, and we'll go ahead and call the range R:

The usual thing to do is simplify this a little with a trig identity:

The max the sin term can possibly be is 1, for a throw at a 45 degree angle, as we might have suspected. Now you might notice that the range is proportional to the square of the initial velocity. Throw twice as fast, the ball goes four times as far. Plugging in the numbers, even at a 45 degree angle you'd have to throw at about 30 m/s = 67 miles per hour to throw the 100 yard length of the field. Short passes are much easier, but they're thrown fast anyway to make up for the fact that a 45 degree angle throw is usually a suicidal move at short range. Lower angles and correspondingly higher speeds are required.
Posted by Matt Springer at 1:18 PM • 14 Comments • 0 TrackBacks
January 27, 2010
Category:
Let's say you wanted to kill NASA. You couldn't just blink it out of existence I Dream Of Jeannie style, but you might be able to strangle it to death in bureaucracy. How might you do it?
For starters, you might completely scrap any attempt to return humans to the moon. You might completely scrap any attempt to put men on Mars. Having gotten rid of most of the inspiration that keeps the agency in the public eye, you could make sure there was no chance of reversing course on any reasonable timetable by scrapping the agency's previous research and cancelling development on the rockets and systems needed to accomplish those goals.
Then you might redirect those and other agency funds into navel-gazing Earth science projects that are supposed to be the domain of agencies like NSF and NOAA, adding bureaucratic conflict in to a recipe already heavily seasoned with dullness. Because if there's one thing the public is inspired by and not at all sick of, it's climate science. After all, nobody likes to see the titular Aeronautics and Space that gave us up close and personal exploration of Mars, or Hubble's images of the cosmos, or far-flung missions to the beautiful outer planets.
As a final frying pan upside the head, you might require that NASA maintain the most expensive and least useful boondoggle of manned spaceflight - the International Space Station. You might do so even knowing that shortly the Space Shuttle program is being phased out and can only launch a few more times - three, currently. You'd make sure the only way to reach the ISS was through the good graces and launch capabilities of our close geopolitical allies the Russians, with a vague possibility of contracting private launches at some point in the future, presumably when such private launch capability exists. It currently doesn't.
Well, I hope you enjoyed NASA while it lasted because this ain't hypothetical. It's Obama's forthcoming NASA budget.
When the White House releases his budget proposal Monday, there will be no money for the Constellation program that was supposed to return humans to the moon by 2020. The troubled and expensive Ares I rocket that was to replace the space shuttle to ferry humans to space will be gone, along with money for its bigger brother, the Ares V cargo rocket that was to launch the fuel and supplies needed to take humans back to the moon.
There will be no lunar landers, no moon bases, no Constellation program at all.
In their place, according to White House insiders, agency officials, industry executives and congressional sources familiar with Obama's long-awaited plans for the space agency, NASA will look at developing a new "heavy-lift" rocket that one day will take humans and robots to explore beyond low Earth orbit. But that day will be years -- possibly even a decade or more -- away.
...
They also said that the White House plans to extend the life of the International Space Station to at least 2020. One insider said there would be an "attractive sum" of money -- to be spent over several years -- for private companies to make rockets to carry astronauts there.
Regardless of my opinions of his other policy, me and many other scientists were quite hopeful about Obama's campaign promises on science and technology. But with bank bailouts and thus-far futile stimulus having already cost about 500 times more than what NASA needs to stay on its manned flight schedule, I'm starting to think that hope was futile.
Posted by Matt Springer at 12:03 PM • 50 Comments • 0 TrackBacks
January 26, 2010
Category:
I'm a bit bogged down in Mathematica code at the moment and have already choked the memory to death on a relatively high-performance machine doing what I thought would be a straightforward electric field calculation. Rechecking everything is taking some time, which distracts from writing here.
In the meantime I'd like to point out a few good links to read about my favorite subfield of physics - laser physics. This year represents the 50th anniversary of the invention of the laser, and it would indeed be pretty hard to come up with a more important piece of physics for the modern world. The transistor, maybe, but that's about it.
LaserFest is celebrating with lots of snazzy writing and interviews, Cocktail Party Physics is giving a great brief history of the subject, and Uncertain Principles wants to know what the most amazing use of a laser is.
That's pretty much an impossible question, but I'd like to go off the beaten path and nominate holography. It's literally a photograph of an object in Fourier transform space, and generates a 3d image out of nothing more than crazily veering tiny interference fringes on an ordinary photographic plate. In fact if you cut a hologram in half you don't get a hologram of half an object, you get a hologram of the whole object with half its frequency components missing - you lose resolution and get a blurrier but still otherwise complete image. Holy carp.
More on lasers and holograms later. I'm off to write some more code simulating, well, the dynamics of a laser pulse. If I can get the thing working, I'll post the results here.
Posted by Matt Springer at 1:33 PM • 2 Comments • 0 TrackBacks
January 24, 2010
Category: Sunday Function
And now, two quick notes before we get to business:
1. God help me, but I've joined the Twitter bandwagon. Here I am, @BuiltOnFacts. Though it goes under this blog's name, it is more of a "personal" account. So you'll be reading some incomprehensible personal minutiae, random observations, wild assertions, and somewhat more politics that I typically introduce here. But you may enjoy it nonetheless, and if you ever have physics questions that can be answered in 140 characters feel free to fire away.
2. Speaking of politics, this paragraph is political and I dislike it when people shoehorn politics into non-political posts. As such I will not even be slightly offended in you skip this paragraph. Onward: I'm a little horrified at some of the the horror that's followed Citizens United v. FEC. Some of it's due to misreporting (corporate campaign contribution limits were upheld, for instance). Some of it's rabbit-chasing with the "corporate personhood" debate, which actually has pretty much nothing to do with the case, which should have come out the same even if corporations weren't "persons" (the 1A doesn't confer rights on people (except for assembly), it prohibits the government from making laws that abridge certain things). Finally, pretty much all speech that rises above personal pamphleteering is corporate speech in some sense - including the speech you're reading now. The decision is certified ACLU-kosher, and I highly recommend constitutional law professor Ilya Somin's excellent look at the issue. You can certainly be a proud liberal and still cheer the decision.
Ok, how about an actual function? I'm picking out a function that contains oceans of depth, but we're just going to dip our toe into the water to see what the water feels like. You may be familiar with the Legendre polynomials, which we've talked about on a few occasions. They're just a set of ordinary everyday polynomials that happen to have certain useful properties. They're numbered by the order of the polynomial. The zeroth order polynomial is 1, the first order is x, the second is .5(3x^2 - 1), well the coefficients can get a little complicated but they are just regular polynomials. Let me plot the first four on the same graph:

You can see that some of them are even (they're symmetric about the y-axis) and some are odd (inverted with respect to the other side of the y-axis). We've explored this property in the past, too. More on this in a second.
Our function contains all of the Legendre polynomials in one fell swoop. It's the generating function of the Legendre polynomials:

The Legendre polynomials are defined as the functions Pn(x) that make that equation true. Every single one of the properties of the Legendre polynomials from the recursion relationships to the differential equation to their orthogonality can be derived directly from the generating function. It can get somewhat complicated, so we'll only derive one of the easiest properties today. Let's derive the parity (even/odd) characteristics of the Legendre polynomials.
First, x and t are variables so we can let them be whatever we want. Let's replace t with -t and x with -x:

Negative times negative is positive, so actually the middle expression is the same both here and in the original expression. Equating equals with equals, this means:

We can pull the -1 out from the parentheses:

Now here's the key thing. This is a sum so we can't just cancel the t willy-nilly. But we can recognize that each t^n is attached to a unique Pn and effectively serves just as a label. In other words, what's true for the sum is also true term-by-term. If you're skeptical, just spend a few moments thinking about it, or write down a few terms explicitly to see how it works. This means:

Now we can cancel the t^n:

Which is precisely the statement of alternating even/odd parity that we expected from the graph. Ok, I admit this one was a little esoteric. But I think it's still pretty cool!
Posted by Matt Springer at 10:34 AM • 12 Comments • 0 TrackBacks
January 22, 2010
Category:
If you were to find the URL to the ScienceBlogs back end, you'd be presented with a logon prompt. Assuming you knew my username, and it wouldn't be hard to guess, all that stands in between you and a free ScienceBlogs platform to promote your favorite cause is a password. As such a good password is pretty important, and people correspondingly use good ones. Right?
Well, as you probably guessed the answer is no. Razib points out an article determining that the most common password is "123456". Many systems won't even let you pick out a password that terrible, but very often the passwords people do chose even with minimum requirements are pretty awful.
But what makes a password good or bad? In short, the time it takes to guess. To pare things down to their binary essentials, let's pretend passwords could only consist of the numbers 0 and 1. If you have a one character password, there's only two possibilities. If you have a two-character password, there's four: 00, 01, 10, and 11. Each time you add another character the number of possibilities doubles. To be safe, you want to make sure there's no reasonable way for a person to go through all of them by brute force.
So let's set a safety threshold. Assume your attacker can guess 1000 passwords per second. This is pretty generous for most contexts, but it's a good starting point. At that rate in a year your attacker can guess about 32 billion passwords. If you're picking your password randomly from a set larger than that, you're probably safe. In our example of 1s and 0s, we know each additional character doubles the possibilities, so we need to invert that and find out how many characters we need to have at least 32 billion possibilities. In other words, 2^n = 32,000,000. The solution for n, given b^n = x is just the base b logarithm of x. The base 2 logarithm of 32 billion is 34.9, so a random string of 35 1s and 0s will keep you safe. But that's an impractically huge and difficult password so we want something easier.
How about random letters and numbers? There's 36 choices, not including capitalization. Taking the logarithm, we find that it is 6.75 and thus we need just 7 random letter/number characters for a decent password. They do have to be random, picking from a non-random set like your family's initials might not be so good. Still, such a password is not super easy, but doable.
How about random words? Your average desk dictionary might have 20,000 words or so, and repeating our procedure means we need a whopping three random words for the same level of security. Not bad at all, and that's my suggestion. Three random dictionary words, with a digit included at the end if your program requires it.
Since the hard part of choosing a new password is remembering it at the beginning, write it down and keep it in your wallet for a while. Some people gasp at this, but if your password isn't protecting anything more valuable than your financial identity you aren't adding much risk. If your password is really so valuable that it pales in comparison to your ID and credit cards, then you should consider being more cautious. But most passwords aren't, and the risk of forgetting or simply being tempted to pick a bad password is more dangerous. Better yet, pick a good free password manager like KeyPass and then you only have to remember one good password. The program will generate very strong passwords for the rest, and keep them safe and encrypted under your master password.
My password here? 12 random letter/number characters, generated and managed by KeyPass. Good luck!
Posted by Matt Springer at 11:22 AM • 19 Comments • 0 TrackBacks
January 21, 2010
Category:
This is a little off the beaten path, but it's a silly little diversion with some classic "the press lacks numeracy skills" complaints as a bonus. Thomas Frank writing in the Wall Street Journal has written a rather wild piece - One Cross of Gold, Coming Up: How the government could get even with right-wing cranks.
It's mainly in a Modest Proposal sort of vein; I don't expect he's even a little serious. Still, fun to take a look at. His proposal runs more or less as follows:
1. All those right wing cranks are hoarding stashes of gold.
2. The federal government has lots of gold in Fort Knox.
3. Sell it all on the open market, reducing the deficit, cratering the price of gold, and wiping out the finances of the right.
4. Cackle maniacally in the manner of Sesame Street's Count von Count!
As it is satirical in nature, I'm not giving the Journal a hard time for publishing something so reminiscent of Dr. Evil. I am going to give them a hard time for not thinking about the math of the situation. If they had, they'd see two gaping holes in the plan, either one of which alone would in reality end the plan with an empty Fort Knox and an entirely undamaged group of right wing gold bugs.
1. The Theoretical Problem: To flood a commodities market, you need a flood of that commodity. According to Mr. Frank, Fort Knox contains 261 million troy ounces of Gold. According to The Economist, world production of gold is around 2.4 billion troy ounces per year. In short, the liquidation of the entirety of Fort Knox would be the equivalent to adding a little over a month's worth of natural mine production. Since essentially all the gold that has ever been mined is still in circulation, such an action simply wouldn't necessarily dent the price very much. It would be analogous to the occasional pre-election releases of oil from the Strategic Petroleum Reserves. It produces a limited and temporary price drop, but the extra supply is so small as to not make much difference. On the other hand investors could take it as a sign of governmental instability and drive up the price of gold.
[UPDATE: Hubris, meet Nemesis. I have myself made a serious mistake! World gold production is actually only 75 million troy ounces a year. On the other hand, Fort Knox only holds about 147 million troy ounces, as not all the US gold is stored there. As such it represents a little under two years worth of world production. A sudden release probably would dent prices significantly, though only on a temporary basis since central banks would immediately seize on the opportunity to buy a valuable commodity at a discount during a period of otherwise uncertain economic times. Ditto other large exchange-traded funds and industrial users. Thus Point 1 is likely still valid over the mid to long term, but over the short term the government could flood the market if it wanted. Point 2 still stands unaffected.
UPDATED UPDATE: There's some discussion in the comments indicating that in fact my original point is still likely to be correct even with the updated information on the yearly mine rate. Either way, the overall point about the overall lack of effect stands, but it may in fact still stand even in the short term, which my update cast doubt on.]
2. The Observational Problem: Individual investors in the US - right wing or otherwise - don't actually buy much gold. Frank seems to believe right-wing paranoia has driven up the price, but that's just bananas. The entire US only consumes a fraction of the world gold supply. Much the gold that is sold in the US goes straight to jewelery manufacturers and industrial users. The fraction that is purchased as an investment generally circulates among central banks, exchange-traded funds, and other large interests - not your average investor with a gold eagle coin or two. Their impact is certainly much smaller than the massive purchases of the central banks of China and India. Conversely, there's very little evidence that anyone, right or left, is actually investing any meaningful percentage of their assets in precious metals. No massive 401(k) exchanges for pretty metal, no sudden demand for safes, no sudden surge of reporting in the somewhat arcane IRS tax disclosures that commodities sellers must follow. Further, the dinky gold-selling outfits that advertise on Glenn Beck and the like are explicitly geared toward small transactions. If it were anything other than a niche within a niche within a niche, large-scale exchange-traded gold funds would be looking for customers in those markets as well. They ain't.
Either one of those two problems renders Frank's plan unworkable. Still, it's a cute little thought exercise. I do, on the other hand, wish an explicitly Wall Street publication had put a little more number crunching into it.
Posted by Matt Springer at 1:51 PM • 23 Comments • 0 TrackBacks