October 30, 2008

Fondling Balls

Iowahawk breaks out the calculator on poll reliability:

So if the sample size is 400, the margin of error is 1/20 = 5%; if the sample size is 625 the margin of error is 1/25 = 4%; if the sample size is 1000, it's about 3%.

Works pretty well if you're interested in hypothetical colored balls in hypothetical giant urns, or survival rates of plants in a controlled experiment, or defects in a batch of factory products. It may even work well if you're interested in blind cola taste tests. But what if the thing you are studying doesn't quite fit the balls & urns template?

If one or more of the above statements are true, then the formula for margin of error simplifies to
Margin of Error = Who the hell knows?

I think that the disparity among the polls is pretty good evidence of this. A lot of it, particularly the weighting is guess work, educated or otherwise. There's only one poll that matters (though with all of the chicanery going on, even that one is going to be in doubt, particularly if it's close on Tuesday). What a mess.

Posted by Rand Simberg at 07:24 AM

October 29, 2008

Doing The Math

The Obama campaign has been lying about its donor base:

If, as Obama says, most donations are grassroots and in small amounts, the numbers do not match up. If this many people donated to his campaign he would be polling at well over 50%.


In a grassroots movement, you smell the green. He's raised $600 million, as you say, in small donations. So divide it by ten bucks apiece and there's 60 million donors. If 120 million people vote on Tuesday, and he gets 50% that equals ...60 million voters! Honestly, you cynical rightwing losers, what's so suspicious about that math?

On Fox Newswatch on Saturday, Jane Hall said that many of her (journalism) students couldn't even calculate a percent. Of course, in this case, they're not motivated to figure it out, even if they know how.

Posted by Rand Simberg at 11:59 AM
A Beautiful Math

John Tierney writes about an interesting television special on fractals.

Posted by Rand Simberg at 11:39 AM

June 19, 2008

Made Of Math?

An interesting theory of life, the universe and everything. How would one test it, though?

Posted by Rand Simberg at 07:50 AM

May 08, 2008

The Logic Of Superstition

For what it's worth, I set my watch to the destination time zone when they close the plane doors.

Posted by Rand Simberg at 10:06 AM

April 25, 2008

A Brief Tutorial

...on centrifugal force.

Posted by Rand Simberg at 05:34 AM

April 21, 2008

101 Great Computer Quotes

Here ya go.

[Via Geek Press]

Posted by Rand Simberg at 06:15 AM

February 20, 2008

Taking On McGyver

Here's a fun interview with the Mythbusters. I don't get this, though:

My favorite episode, that I think the science is the most right, is ''Bullets Fired Up'': Will a bullet that you fire directly into the air kill you when it comes back down? We tried it in several different ways, and every single way we tried it -- from a shop experiment, to a scaled outdoor experiment, to a full-size outdoor experiment where we fired a full clip of 9mm rounds into the air out in the desert -- confirmed the same results. If it's coming straight down, it won't kill you. But if you fire it on an angle of even two degrees, it stays on a ballistic trajectory and it will kill you. So when you see someone in a movie fire their automatic rifle on kind of a spray up into the sky, probably all of those bullets are actually deadly. The amount of data we collected on it was more than anybody up to that point had ever achieved on firing bullets into the air.

I don't get what they're saying here. Why would it come down any harder if it's at a slight angle? How did they determine whether or not "it would kill you"? If it's in a vacuum, it should come down with exactly the same vertical velocity component it had when it left the gun (except reversed), but the atmosphere complicates things. It seems to me that any bullet fired in the air is going to be coming down at terminal velocity, unless the potential energy is so high that it doesn't have time to get to terminal velocity before it hits the ground, but that's pretty hard to believe. When it leaves the muzzle of the gun, it's supersonic, but I would think that it won't be able to be going that fast when it falls back down, because of air drag. This seems like something that should be simulatable with CFD (it might even be possible to do it analytically, if the bullet was round).

Posted by Rand Simberg at 07:48 AM

April 27, 2007

Tidal Asymmetry

This post set off a discussion in which I pointed out that tidal forces are asymmetric. Carl Pham expressed skepticism at this, asking if I was saying that the tide rose higher on the side of the earth closer to the moon. I hadn't previously thought about this before, but since I do believe that tidal forces are asymmetric, this probably followed. Or at least it followed that they were different.

One attempt was made by Ilya to prove it, but I thought it flawed and oversimplified for reasons I pointed out in comments there, because one has to consider both centripetal effects and gravitational effects when analyzing tides.

Here's my attempt. Caution, math to follow:

Think about it this way. Let's take a one and a half body problem (a small satellite, which, unlike the moon, allows us to ignore the complication of its mass and assume that the center of mass of the system is at the earth's center). At orbital altitude in a circular orbit, gravity exactly offsets the centripetal acceleration, so there's no local vertical velocity, and the orbit stays circular, by definition. The tidal force is the difference between the two accelerations, which at orbital altitude is zero (that is, they're equal).

That is, M/Rc^2 = RcW^2, where M is the planetary mass times the universal constant, Rc is the radius of the circular orbit, and W is omega, the angular velocity. Now since the body is connected, W is a constant. If we vary Rc by distance A, above and below, we get for the case below:

M/(Rc - A)^2 = (Rc - A)W^2

or M/(Rc^2 - 2RcA + A^2) = RcW^2 - AW^2

or RcW^2 = M/(Rc^2 - 2RcA + A^2) + AW^2

Since RcW^2 is the centripetal acceleration at the orbital altitude, we can substitute the gravitational term at that altitude for it, so

M/Rc^2 = M/(Rc^2 - 2RcA + A^2) + AW^2

and the tidal force is the difference between them. Designating this Tb (for tidal force below) yields:

Tb = M/Rc^2 - M/(Rc^2 - 2RcA + A^2) - AW^2

Similarly, for the tidal force at distance A above:

Ta = M/Rc^2 - M/(Rc^2 + 2RcA + A^2) + AW^2

OK, it's not obvious on inspection (at least to me) which number is larger and which is smaller, but I hope that it's obvious that in general, for any value of A other than zero, they're two different numbers in magnitude (there may be some non-zero value of A for which they're equal, but as I said, in general they are not). Therefore, the gravity-gradient acceleration field is asymmetric.

[Update a couple minutes later]

In proofreading it, I realize that there's no purpose in substituting the gravity term in. But it doesn't hurt anything, and trying to fix it at this point would probably introduce an error.

Posted by Rand Simberg at 01:16 PM

March 20, 2007

Go To: Heaven

John Backus, the inventor of FORTRAN, has written his last line of code.

FORTRAN wasn't my first language. When I started engineering school in Ann Arbor, they told me I had to learn a programming language, but they didn't say which one, so I took a CS course in which we were inducted into the programming world with ALGOL. I used it to write a simulation of heat transfer, with no problems, though the engineering professor didn't know the language. But I had to take a graduate course in numeric analysis, in which one had to write in FORTRAN, to be able to interact with the instructor's subroutines, so I went to a few free lectures on it that he held at night for the general student population (and in fact public). After learning how to program in a structured language, I was appalled at DO loops and gotos, and their potential for spaghetti. I've used it quite a bit since, but still try to use as much structure as whatever version allows. Still, as the article notes, it was a huge breakthrough in making computers practical.

And here, courtesy of wikipedia, are a few FORTRAN jokes:

* "GOD is REAL unless declared INTEGER."

* Joke, circa 1980 (following the standardization of FORTRAN 77): "Q: What will the scientific programming language of the year 2000 look like? ... A: Nobody knows, but its name will be FORTRAN."

* A good FORTRAN programmer can write FORTRAN code in any language.

* Computer Science without FORTRAN and COBOL is like birthday cake without ketchup and mustard.


Posted by Rand Simberg at 08:47 AM

March 19, 2007

Influenced By Escher?

Here are some fascinating and beautiful computer graphics.

[Update a few minutes later]

A commenter says they're not computer generated, that they're paintings. Either way, very interesting.

Posted by Rand Simberg at 11:40 AM

March 13, 2007

I Got Six Out Of Eight

I screwed up number two, because I didn't read carefully, and thought it was asking about the minute hand (which was simple--a hundred twenty degrees). And I couldn't manage number five in my head. I was trying to do the algebra, and couldn't manage it. And a couple of them, as noted, are trick questions.

And I certainly wouldn't have done that well at age eight.

Posted by Rand Simberg at 11:08 AM