Showing posts with label probability. Show all posts
Showing posts with label probability. Show all posts

And still counting...

Predicting the future

The 2010 general election is not yet over in California. The secretary of state's office in Sacramento continues to issue updates as it aggregates the returns trickling in from California's fifty-eight counties. As of the last report, time-stamped 5:00 p.m. on Friday, November 19, twenty-six counties still had untallied ballots to count. By adding up the counties' estimates of vote-by-mail and provisional ballots, the secretary of state announced that approximately 629,634 votes remained to be processed.

It's not a moot point. While attorney general Jerry Brown trounced Meg Whitman in winning his third term as governor and Barbara Boxer convincingly defeated Carly Fiorina on her way back to the U.S. senate, one statewide race remains too close to call. The Democratic nominee to succeed Brown as attorney general currently has 4,291,854 votes to her Republican rival's 4,248,804, a margin of only 43,050. Taking into account a scattering of votes among minor party candidates, that breaks down to 46.0% to 45.5%.

Democrat Kamala Harris and Republican Steve Cooley have swapped the lead back and forth a few times since the vote tallies began to be published after the November 2 election. Cooley actually declared victory election night (see the video below), but woke up the next morning to discover that Harris had edged ahead. When the vote count moved him back into the lead a few days later, he was smart enough not to make yet another premature victory speech. When Harris regained the lead, she prudently kept her own counsel.

My own opinion? For a couple of weeks now, I have been expecting a Harris victory. It's in the numbers.

I looked into the numbers because one of my friends, a retired journalist, was scoffing at the superficiality of the news articles on the election results in the attorney general's race. Except for striving heroically for different ways of saying “too close to call,” none of them offered any substantive analysis.

“It all depends of where the remaining votes are,” he said. “Instead of just paraphrasing the press releases from the candidates, the reporters ought to dig into the details. They should do some reporting.”

He prodded me into action. I downloaded the secretary of state's report on unprocessed ballots (well over two million at that time) and loaded it into a spreadsheet. Then I perused the secretary of state's report on the percentages accruing to each candidate in each county. By way of example, consider Tulare county, where California's most conservative voters gave Harris only 29.8% to Cooley's 62.4%. Tulare's county clerk estimated that 3,350 ballots remained to be processed. Applying the percentages to this number, I computed that Harris would get 998 more votes and Cooley would get 2,090. (I'm sure Mom & Dad's vote-by-mail ballots are in the latter batch.)

I applied this process to all of the counties with outstanding ballots, obtaining an estimate for the additional votes likely to be obtained by Harris and Cooley. Upon adding the estimates to the votes counted to date, I found myself looking at a razor-thin Harris victory. Every so often I would return to the secretary of state's website to tweak the percentages to reflect the completed count. Those numbers were very stable, seldom moving more than one-tenth of a percent. The predicted Harris margin varied, but never vanished.

My latest computation, based on yesterday's numbers, suggests that Kamala Harris will defeat Steve Cooley for the office of attorney general by 45,902 votes. I'm not sure about the 2, though.

If the numbers hold up, the Golden State will have handed the Democratic Party a clean sweep of every statewide office. May it make the most of its opportunity.


Note: I should give a tip of the hat to Timm Herdt of the Ventura County Star. He had the same idea that I did and published his estimate on November 9 on his blog. In my opinion, however, Herdt pulled up just a bit short by confining his attention to the 21 counties with the most votes remaining to be processed. In so close a contest, it was unwise to scorn the little counties and risk that much round-off error. On the basis of his computations, Herdt figured that Cooley had an edge.

While I obviously think Herdt was wrong, my ex-journalist friend can be relieved to learn that at least one reporter is willing to go digging for news. It's not quite obsolete yet.



Read more...

King of the silver lining

Please ignore the dark clouds

As a completely rational man, I do not countenance superstitious behavior. For me, “knock on wood” is just a jocular expression. Spilling salt doesn't bother me (except for the mess it might leave). I'll pet a black cat any old time (assuming it's not hissing at me).

But sometimes I wonder. I appear to be the master of mitigated bad luck. A few examples will demonstrate my outlier status on the coincidence curve.

On the afternoon of the day before the start of the new semester at my school, I decided on impulse to run an errand. I jumped into my car and headed toward town.

Thup, thup, thup.

Not a normal car noise. I pulled over and checked out my vehicle. The right rear tire was almost flat.

Damn.

And on the day before school starts, too. However, I was close to the Big O Tires where I had purchased the rubber I use to meet the road. I therefore risked thupping a few blocks more, where the automotive mechanic popped off the tire, fixed it, and had me back on the road in half an hour.

No charge.

By no stretch of the imagination is a flat tire good news. However, had I not discovered the flat that afternoon, I would have discovered it early in the morning when leaving (or trying to leave) for the first day of school. Not good. I might have been late for the first session of my first class of the day. Definitely not good.

One more thing: Had I been traveling in a different direction, I would probably have pulled into the car dealership where I sometimes get my vehicle serviced. I would have gotten the tire fixed, but certainly not comped.

See what I mean about silver linings?

Several years ago, driving north on Highway 99 on Washington's Birthday, I heard an unpleasant noise from under the hood of my car. The fan clutch had seized up and apparently didn't want to die alone. It took out the water pump and the radiator in its death throes. My car and I ended up by the side of the road, over a hundred miles from my destination.

Rotten luck, no?

Yes, but not entirely rotten. In those pre-cell-phone days, I was pleased to find that I was within easy walking distance of a gas station with a pay phone. The AAA tow-truck service was soon hauling me and my disabled vehicle into the nearest town. Not only that, we were deposited at an auto shop (open despite the holiday) that sat directly opposite the street from the bus station. The one daily bus up to Sacramento was due to arrive within the hour. Barely sixty minutes after my car's misadventure, I was on a Continental Trailways bus, traveling toward the state capital again. I had called ahead to notify a friend of my plight. He picked me up at the station and drove me home.

Of course, a couple of days later I had to take the bus back down to the auto shop to collect my repaired car—which was a bit of a nuisance—but it feels petty to complain about it. As mishaps go, it was pretty thoroughly mitigated.

Perhaps you're not impressed by those two trivial automotive examples, but I can cite other instances that do not involve vehicles.

Education of Hard Knocks

Consider my grave misfortune in not completing my Ph.D. in math when I was first enrolled in a doctoral program. The department chair had prevailed upon me to accept a teaching assignment despite my reluctance. I thought I should concentrate on my graduate studies, but he pointed out that teaching assistants were often assigned lecture responsibilities and that he had a calculus class that needed an instructor. I taught the class and loved the experience. I never turned down another teaching assignment. I also never graduated, running out the clock on my eligibility for grad school without ever doing any research and never advancing to candidacy. (I passed all my classes and all of the written qualifying exams, but a Ph.D. is a research degree and I was found wanting.)

Disaster, right?

But that experience placed me on the road to the job I have today, a full-time teaching job which is the best job I've ever had.

Sweet. I could have ended up as one of those California State University faculty members now suffering from reduced pay and furloughs (which are worse than the cutbacks at many community colleges).

And there was that time between teaching gigs when I worked for a state agency in Sacramento. Everything was fine until the musical chairs that characterize the top management level of state service brought a thoroughly unqualified political appointee into the agency's executive position. One might think it would be fun to work for a legislator's mistress—but not so much. (And, to be fair, the legislator's divorce had come through before his paramour became our boss, so she was married to him by then.) She turned the workplace into a snakepit, but she also helped give me the courage to accept the temporary faculty appointment that later turned into a tenured position at my college. (Thanks, bitch.)

So perhaps her arrival on the scene wasn't such bad luck after all. (She was fired the year after I left, too.)

Old Man Gut Pain

The incidents keep piling up. Just the other evening, lounging comfortably with a book in my recliner, I sat up and felt a sharp pain in my abdomen. Ouch! I moved about gingerly. Ouch!

No doubt I was about to die from acute appendicitis.

I'm not really a hypochondriac. The pain was not sharp enough or persistent enough to make me drive to the local emergency room. It certainly wasn't bad enough to call 9-1-1. A Google search reassured me a little. I calmly went to bed and managed to fall asleep before long.

In the morning I woke up feeling better. No pain. I started to get up. Ouch!

Damn.

As it happened, I had no early morning classes that day. (Wouldn't you know it?) I called my doctor's office. As it happened, he had had a cancellation and he could see me immediately as the first patient of the day.

See what I mean?

He checked me out and informed me that it was merely muscle pain. No intervention was indicated (except, perhaps, ibuprofen). The bad news, such as it was, was that the pain might linger for quite a while, but eventually it should go away. It's not an unusual condition in men my age.

So I guess I have “Old Man Gut Pain.”

I'd rather not have it, of course. But, come to think of it, I haven't felt it in a few days. Maybe it's gone away already.

My life is charmed—in a very peculiar way.

Read more...

Obama is building the base

The foundation firms us

Although I know better than to take polls too seriously, I'm as curious as any political junkie about the state of the presidential race. As a devoted Democrat, I smile when Obama opens up a solid lead and I cringe whenever it narrows—even though I know what the polls say today is not necessarily what the ballots will say in November. Still, competent pollsters know how to take a snapshot of voter sentiment and give us a sense of how things might be shaping up.

That's why I watch the numbers over at electoral-vote.com, where the Votemaster tracks several polls and aggregates the results. (I've even installed its vote-tally widget in my sidebar; just look to the right.) I wonder whether people have noticed an interesting trend in the numbers. The Votemaster provides a number of graphs to illustrate how the results have varied with time. The graph depicting the electoral vote for each candidate shows how McCain appears to have closed the gap with Obama and turned the presidential contest into a neck-and-neck horse race. This is enough to curdle the blood of any partisan Democrat, although it's certainly too early to panic:


But the Votemaster also provides a graph of “solid” electoral votes. He notes that “The electoral votes of a state only count in this graph if the candidate has a margin of 5% or more over his opponent.” The story in the “solid” graph is quite different. While the first graph showed how the gap has closed in terms of total electoral votes, including the closely fought states, the second graph demonstrates that it has widened in terms of the solid states. Obama has been grinding away at building a strong base—a “solid” foundation—of states where his margin over McCain is at least five percentage points. While a five-point margin isn't entirely beyond the typical pollster's error bounds, it's an extremely good bet. With minor variations, Obama's base of solid states has been growing steadily, until it now approaches the magic number of 270.


By contrast, McCain's tally of solid states has been very slowly eroding. This implies that his recent apparent success in closing the gap with his rival is based entirely on tiny margins in swing states. He must essentially run the table to prevent Obama from snagging the one or two marginal states needed for a Democratic victory. Any one of the states of Florida, Ohio, North Carolina, or Virginia would put it away for Obama. Colorado plus one of the Dakotas or Montana would also suffice.

Perhaps McCain should ask Cindy if she remembers where their homes are. She may need to buy houses in all of the swing states to give her husband that home-base advantage. He's going to need it.

Read more...

News flash: shocking revelation!

You read it here first!

The pundits have tossed their yarrow sticks, poked through their chicken guts, spied on the flight paths of migrating birds, scried their crystal orbs, laid out their Tarot cards, examined the dregs in their teacups, and cast a multitude of horoscopes. The portents are unmistakable: Barack Obama's running mate will be Sebelius, Biden, Kaine, Bayh, Gore, Clark, Clinton, or someone else entirely. This is the solid and irrefutable conclusion of the various mantic arts, and who are we to scoff at the occult sciences of political prognostication?

I, too, have been watching the harbingers, omens, and signs. The ineluctable conclusion is ... I haven't the faintest idea who Sen. Obama is going to choose. You got that? I don't know. And you don't either, unless you're in the innermost Obama circle (in which case you can leave the running mate's name in a comment—thanks!).

But if we wait for a while, he's sure to tell us. Anyone think of just waiting till then? Please resume normal rate of respiration.

Read more...

CPE1704TKS

Thermonuclear war

If you recognized the title of this post, congratulations. You are a true übernerd, a geek among geeks. It's the launch code from the movie WarGames, which Boing Boing reminds me was the greatest geek movie ever and was originally released twenty-five years ago. Did you miss the silver anniversary celebrations in May? So did I, but Wired magazine offers a nostalgic retrospective for all of us who miss the days of 300-baud dial-up modems and 8-inch diskettes.

WarGames was a cautionary tale about artificial intelligence and human stupidity. The sermon was a timely one, albeit delivered in a candy coating of teen angst, love, and adventure with lead roles played by Matthew Broderick and Ally Sheedy. In 1983 the president of the United States actually believed it was possible that Bible prophecy might require him to play a leading role in the battle of Armageddon. Certainly launching a nuclear war would be an excellent way to set off the Apocalypse—in accordance with God's divine plan (and love and mercy and all that). We tended to avoid thinking about it too much back then because it was difficult to function if you were shuddering all day.

I didn't own my own computer yet when WarGames came out, but I already knew about modems and punch cards (almost—but not quite—obsolete then) and computer terminals. The local university had a connection to the ARPAnet, the Internet precursor sponsored by the Defense Department, and my nerdiest friends were on it daily. Although I had my doubts about WOPR (War Operation Plan Response), the computer that could control the entire United States nuclear arsenal, the scenario seemed realistic enough. Yes, it was science fiction, but not beyond the limits of credulity. Suspension of disbelief was all too easy.

That is, until the grand finale. That's the scene in the command bunker where WOPR begins to crack the secret ten-character launch code so that it can follow a teenager's inadvertent command to play out a thermonuclear war. Fortunately for the dramatic impact of the movie, WOPR flashed its progress in code-breaking on the large screens in the command center. Ten-character alphanumeric strings flashed past the eyes as WOPR searched for the launch key. The audience in the movie theater was rapt.

I, however, got a sinking feeling in my stomach. Damn!

WOPR was being allowed to riffle through the ten-character strings without any limitations. There was no one-attempt-per-second rule. No three-tries-and-you're-out. WOPR was jamming through the ten-character strings without hindrance. With 26 characters in the alphabet (uppercase only it seemed) and 10 numerals, WOPR has 3610 possibilities to check. That's between three and four quadrillion. WOPR was presumably a state-of-the-art military supercomputer capable of sophisticated war game simulation. I imagine it would have had massively parallel computing architecture. If it could crunch billions of possible codes per second, WOPR would crack the launch security barrier within perhaps a year or so by simple brute force. If it could crunch trillions per second, then perhaps hours or minutes. Not very secure.

Even back in 1983 the IBM Personal Computer boasted a microprocessor clocked at 4.77 MHz. Sure, that was just a microchip, but it indicated the low end of the computing power of the day. Yes, I was mildly disgruntled at the ease with which WOPR would be able to crack the code. Not very reassuring or realistic.

But then things got worse. Dramatically worse. Suddenly the first character of the launch code was frozen on the display screen: C. WOPR had figured out the first character. People in the command room were horrified. Then: P. Oh, no! WOPR was getting closer!

Now I was really disgusted. If you were allowed to figure out the code one character at a time, then I could do it myself, in a couple of minutes, without any massively parallel computing power. It's boring, but it's easy. You do it like this, beginning with the first character:

“Is it an A?”
“Is it a B?”
“Is it a C?”

Bingo!

Then on to the second character:

“Is it an A?”
“Is it a B?”
“Is it a C?”

Yes, this one would take longer. If you make it all the way through the alphabet, then rattle off the ten numerals, one after the other.

In a few minutes you'd have the whole thing. Thermonuclear war. Boom!

No, it didn't actually ruin the movie for me, but I was rather disgruntled. To make matters worse, none of my friends cared. Sure, the nerdy ones merely agreed that it was a dumb mistake—but what did you expect from Hollywood, anyway? The less nerdy ones simply pointed out that it made the ending more exciting. Yeah, I got that.

It was probably only the math geeks like me that were really irritated. But we don't count.

Read more...

Sexy Nude Celebrity Hot Female Celebrity