Showing posts with label Gambling and other useful applications of math. Show all posts
Showing posts with label Gambling and other useful applications of math. Show all posts

Thursday, May 19, 2011

Centroid of Population in Plato, MO


NOAA:
If you filled out the 2010 Census form from the U.S. Census Bureau, then you had a part in defining the centroidthe point where the center of the U.S. population falls. Every 10 years, after the Census Bureau crunches the numbers and figures out where the centroid is, NOAA’s National Geodetic Survey (NGS) places a geodetic survey disk (also called a survey marker, monument, or bench mark) in the incorporated community closest to its exact geographic location.
NOAA Chief Geodetic Surveyor Dave Doyle, who has helped place a survey marker at the centroid every 10 years since 1980, says first to think of a rectangular-shaped state like Colorado. “If you imagine Colorado as a perfectly flat plain without all the mountains and valleys, and you put it on a map, the place where this rectangular shape balances perfectly on a point is the centroid.”
“Then, think of the United States, including Alaska and the territories, as a flat plain and put it on a map. Imagine also that every individual in the population weighs exactly the same,” he continues. “The centroid is where the center of the population is located.”
The process that the Census Bureau uses to figure out the centroid for the U.S. population is more complicated, but that’s the basic idea.

Wednesday, May 18, 2011

Foreshadowing the Fall of Lenny Dykstra

Dead Spin reprints a profile of Lenny Dykstra from Philadelphia magazine in January 1993, it is a must-read (via Ritholtz):
"I love you, dude," he says to the bald gambler, who nods meekly in acknowledgment. Dykstra compulsively smooths out his slender spire of chips; he keeps adding to the stack like a child testing how high his building blocks will climb before gravity in­trudes.
"We're on a fucking roll, dude."
And so are we. Watching Lenny Dykstra gamble is like having an orchestra seat at a one-character David Mamet tragicomic psychodrama. You are appalled and delighted by the language and the largesse, the exposed and tortured soul. You enjoy the ride. You know it will end badly.
A dozen strangers are loitering at the entrance to the pit, watch­ing the littlest Phillie go through his off-season regimen: tossing cards to keep his arm in shape, honing hand-eye coordination by betting, smoking, stacking and drinking simultaneously. He never does nothing. After performing before tens of thousands of screaming-meemies, a handful of hushed spectators won't inhibit his hyper reverie; degenerate gamblers are in heaven when in ac­tion, and Dykstra has been known to wager on tennis and golf and dice and football and poker and the accuracy of his own expecto­rated tobacco juice.
It always struck me as odd that Lenny Dykstra was an investment advice columnist on TheStreet.com, who specialized in outside-the-money options.  It didn't seem like the right person for that strategy, especially because Lenny never came off as a brilliant guy to me.  It's sad to see a guy crash and burn, but I guess I'll take whatever lesson I can from it and try not to rubberneck too much at the smoking wreckage.

Update: I'll also excerpt the rules on baccarat, just because I didn't understand them:
The Banker is hot. The center fielder settles into a giddy super­stitious spree, talking to himself, taking short circular walks, con­tinually licking those luxurious lips like a nervous ingénue confronting a camera. Everyone knows the outcome of each hand the instant he does. No poker face, he is easier to read than a road­side billboard. In baccarat, it doesn't matter.
The rules of the game are simple. The gambler with the shoe deals two cards each to another participant (Player) and to himself (Banker). The closest to nine points wins. Tens and face cards count as zero, aces as one. A third card may be drawn, if needed. The gambler makes one decision: bet on Banker or Player. You win whatever you bet, dollar for dollar; the casino takes a five per­cent fee — vigorish — on Banker wins. In France, the game is called chemin de fer (railroad) because it moves at great speeds, money changing hands every minute, 60 or 70 times an hour. The game requires no talent at all. If you bat .400, you're a stone loser.

Saturday, May 14, 2011

The Wire, in Real Life

Brendan Kiley covers a two-year sting operation on the attendees of an afterhours party spot by the Seattle Police and FBI( h/t The Dish):
Around 8:40 a.m. on March 30, 2011, four years after the investigation began, four men show up at the King County Courthouse to face charges for violating RCW 9.46.220, the state law regulating "professional gambling in the first degree." A few reporters are taking notes and tweeting the proceedings. They are here to see the "speakeasy defendants" who've been all over the local papers and blogs, guys arrested for throwing parties where people drank after-hours and played cards. In the past 10 years, according to the prosecutor's office, King County has pressed charges against only one other person for violating RCW 9.46.220. It's a law that the government doesn't seem to care that much about. After all, from Seattle you can drive 20 miles south to Tukwila or 10 miles north to the Drift On Inn Roadhouse Casino on Aurora Avenue and gamble legally.
But these four men (all of them, I later learn, poor—if they really were "professional gamblers," they were lousy at it) are being prosecuted for the crime of playing poker somewhere between Tukwila and Shoreline with the wrong guy, an undercover cop.
The defendants are quiet, well dressed, and bewildered by the charges. One of them told me that the poker stakes were so low, he would lose or win $100 at most in the course of a night. ("All those guys were broke, broke as a joke," Mia Brown agrees. "They'd borrow five dollars from someone to go put on the card table. It was small and it was stupid.")
The defense lawyers will be bewildered by what they find in the discovery process—all the paperwork and evidence and audio and video surveillance accumulated by the two-year investigation that involved the FBI, SPD, SWAT teams, and federal firearms and immigration and customs agents. One defendant's discovery request turned up nearly 2,000 pages of documentation and over 100 CDs and DVDs, and even that defendant's attorney had to file extra requests because he said there were big gaps of time missing.
Why did law enforcement dedicate such massive resources to bust some penny-ante card players for charges that only one person has faced in the past 10 years?
One of the defendants, Brady McGarry, had a simple explanation: "If you spend that much time and money, you have to put somebody up on that cross."
This investigation shows how much more thoughtful and professional fictional detectives on The Wire were in comparison to actual police.  It is amazing that a police officer would spend so much time getting to know so many people who were so insignificant.  Too bad actual police won't spend so much time busting crooks on Wall Street or big money guys who use campaign contributions to get policy changes which make them tons of money.

Monday, May 9, 2011

Making Money in Microseconds

Via Ritholtz, Donald McKenzie looks at computerized trading and high frequency trading algorithms:
Little of this has to do directly with human action. None of us can react to an event in a millisecond: the fastest we can achieve is around 140 milliseconds, and that’s only for the simplest stimulus, a sudden sound. The periodicities and spasms found by Hasbrouck and Saar are the traces of an epochal shift. As recently as 20 years ago, the heart of most financial markets was a trading floor on which human beings did deals with each other face to face. The ‘open outcry’ trading pits at the Chicago Mercantile Exchange, for example, were often a mêlée of hundreds of sweating, shouting, gesticulating bodies. Now, the heart of many markets (at least in standard products such as shares) is an air-conditioned warehouse full of computers supervised by only a handful of maintenance staff.
The deals that used to be struck on trading floors now take place via ‘matching engines’, computer systems that process buy and sell orders and execute a trade if they find a buy order and a sell order that match. The matching engines of the New York Stock Exchange, for example, aren’t in the exchange’s century-old Broad Street headquarters with its Corinthian columns and sculptures, but in a giant new 400,000-square-foot plain-brick data centre in Mahwah, New Jersey, 30 miles from downtown Manhattan. Nobody minds you taking photos of the Broad Street building’s striking neoclassical façade, but try photographing the Mahwah data centre and you’ll find the police quickly taking an interest: it’s classed as part of the critical infrastructure of the United States.
Human beings can, and still do, send orders from their computers to the matching engines, but this accounts for less than half of all US share trading. The remainder is algorithmic: it results from share-trading computer programs. Some of these programs are used by big institutions such as mutual funds, pension funds and insurance companies, or by brokers acting on their behalf. The drawback of being big is that when you try to buy or sell a large block of shares, the order typically can’t be executed straightaway (if it’s a large order to buy, for example, it will usually exceed the number of sell orders in the matching engine that are close to the current market price), and if traders spot a large order that has been only partly executed they will change their own orders and their price quotes in order to exploit the knowledge. The result is what market participants call ‘slippage’: prices rise as you try to buy, and fall as you try to sell.
It is legalized looting to allow market makers to take advantage of the data to take little amounts of money on vast numbers of shares, but try getting that practice banned.  It seems detrimental to this country that our brightest minds are being used to come up with trading algorithms to shave tiny amounts of money from retail traders and pension funds and deposit that in investment banker bonuses.

May 9, 1941, British Capture Enigma Machine

Brad DeLong, quoting Wired:
May 9, 1941: German Sub Caught With the Goods: 1941: British destroyers capture a German submarine, U-110, south of Iceland. The British remove a naval version of the highly secret cipher machine known to the Allies as Enigma, and then they let the boat sink -- to keep the fact of their boarding secret. The Enigma machine, used by the Kriegsmarine to encode and decode messages passing between shore command and ships at sea, was taken to Bletchley Park in England, where cryptographers including computer pioneer Alan Turing succeeded in breaking the naval code. The Germans, assuming U-110 had foundered with her secrets intact, failed to realize that their code was broken. The subsequent information passing before British eyes helped the Allies enormously in the Battle of the Atlantic.
Several versions of the Enigma machine existed, but the working principle -- a rotor system activated using a keyboard -- was the same. The machine itself had been around since the early 1920s and was used by other nations, too, although it is most closely associated with Nazi Germany. The Enigma used by the German army was decrypted as early as 1932 by Polish cryptographers, who later passed their methodology along to the British and French. In light of subsequent events (the Germans drove a Franco-British expeditionary force out of Norway and then crushed the French in a six-week campaign in 1940), the military value of this early intelligence is debatable.

Saturday, May 7, 2011

Democracy in Nevada

LA Times:
The problem: two women were tied for second — each with 328 votes — and state law said the victor would be decided "by lot."

Card draws have determined a winner in at least five Nevada races, said Christopher Driggs, a state archivist, all in rural counties whose electorates could probably fit into North Las Vegas City Hall.

At least one election has been settled by flipping a coin, and a tie in a district attorney primary was broken by tossing a die. (The winner rolled a six to trump his rival's five, but his good fortune petered out in the general election, which he lost.)
One of the candidates drew a 5, the other drew a king.

Thursday, May 5, 2011

Why 5, 8 and 24 Are The Most Interesting Numbers

Warning, this is beyond me, but interesting none the less (via Mark Thoma):
In the May 2011 issue of Scientific American mathematician John Baez co-authors "The Strangest Numbers in String Theory," an article about the octonions, an eight-dimensional number system that was discovered in the mid–19th century but that has been largely ignored until quite recently. As the name of the article implies, interest in the octonions has been rekindled by their surprising relationship to recent developments in theoretical physics, including supersymmetry, string theory and M-theory. Baez and his co-author John Huerta wrote, "If string theory is right, the octonions are not a useless curiosity; on the contrary, they provide the deep reason why the universe must have 10 dimensions: in 10 dimensions, matter and force particles are embodied in the same type of numbers—the octonions."
There's more there, including references to sphere stacking and the golden ratio.  I'm sure I can't understand much any of this, but when I get a spare hour, I'll try to watch the lecture.

Tuesday, May 3, 2011

Poker in the Old West

The History of Poker in the Old West:
 
Whether on a riverboat atop the Mighty Mississippi, or in the smoky dimness of a mining camp saloon, a lucky draw could turn a broken man into a winner. In the days of the frontier west, poker was king with the mustachioed likes of Wild Bill Hickok, Doc Holliday, "Canada” Bill Jones, Wyatt Earp, Bat Masterson, and hundreds of others.
In the old west towns of Deadwood, Dodge City, Tombstone, and Virginia City, gamblers played with their back to the wall and their guns at their sides, as dealers dealt games with names such as Chuck-A-Luck, Three Card Monte, High Dice, and Faro, by far the favorite in the wild west saloons.
The exact origin of poker is unknown but many have speculated that it originated from a 16th century Persian card game called As Nas. Played with a 25 card deck containing five suits, the rules were similar to today’s Five Card Stud. Others are of the opinion that it was invented by the Chinese in 900 A.D. In all likelihood, the game derived from elements of various gambling diversions that have been around from the beginning of time.
Poker in the United States was first widely played in New Orleans by French settlers playing a card game that involved bluffing and betting called Poque in the early 1800's. This old poker game was similar to the "draw poker” game we play today. New Orleans evolved as America’s first gambling city as riverboat men, plantation owners and farmers avidly pursued the betting sport.
There is a lot more there.  It is interesting what the roots of gambling are.  I find games of chance interesting, because they often are an entertainment which is similar to the game of life.  When the cards fall right, a guy looks like a genius, when they don't, people think he's a damn fool.  It is always fun to watch the poker tournaments on TV, because almost every show you see a guy just once get dealt the one card he needs when the odds are 92% to 8% against him.

I was thinking about Amarillo Slim and Billy Walters.  Both grew up in the south and started out as pool hustlers.  Listening to Slim, when he wasn't playing poker, he tried to trick guys to get the odds in his favor.  Billy Walters is trying to take as much knowledge as possible to take advantage of arbitrage opportunities.  Neither trusts Wall Street, which is just another casino where the house has the odds in their favor. 

And yet none of those guys, not Slim, not Walters, nor the guys on Wall Street (when they aren't leveraged 30 times) takes as big of a blind risk as farmers do.  Sometimes I don't think farmers can actually understand the risks they are taking, but yet they manage to make a living, and one they love, doing it.  I think it is often like other small businessmen.  They willing take huge risks they don't understand very well, just so they can answer to nobody, and sometimes it just works out.  A lot of the time, it works out because bigger companies don't want to take on those same risks.  Life is funny like that.

Canadian Election Results vs. Projections

ThreeHundredEight:
Well, at least I got the order of the parties right.

Clearly, the final projection was wrong. It under-estimated both the Conservatives and the New Democrats and over-estimated the Liberals and the Bloc Québécois. While I was not alone in making this error, I humbly recognize that of all the projections mine was among the worst.

Of the 308 ridings in the country, ThreeHundredEight.com correctly called 235 of them. That's an accuracy rate of 76.3%, which is absolutely unacceptable. (Note: I had incorrectly calculated the accuracy rating at 71.8% earlier this morning).

However, it was not the seat projection model that failed. The seat projection model actually performed very well - or would have had the popular vote projection model not missed the mark so completely.

That is a very tough gig.  Nate Silver looked really good in 2008, but trying to match polling and anticipate how much to weigh each poll by each pollster seems like a really thankless job.  Posting it for everyone to see makes it even tougher.

Sunday, May 1, 2011

The Legend of Amarillo Slim

This is from 2003 on Weekend Edition Saturday:
Amarillo Slim Preston has been called the greatest gambler who ever lived. He's won bets not only in pool halls and poker games, but golf courses, rivers and jail cells. But Preston, who first rose to national prominence when he won the World Series of Poker in 1972, insists that he's not a compulsive gambler. He's a professional.
"In my humble opinion, I'm no ordinary hustler," he writes in the introduction to his newly published memoirs. "You see, neighbor, I never go looking for a sucker. I look for a champion and make a sucker out of him."
In Amarillo Slim in a World Full of Fat People, the consummate gambler relives some of his greatest exploits. Among his famous victims are country music legend Willie Nelson ($300,000 playing dominoes) and adult magazine publisher Larry Flynt ($2 million in a poker game). In a recent interview for Weekend Edition Saturday, Preston tells NPR's Scott Simon that the trick to winning lies in knowing the odds.
"When you put down a sports wager," he says, "it helps to know something other people don't know."
It's a principle he's put to use in creative ways. In the 1970s, for example, Preston challenged former Wimbledon champion Bobby Riggs to a high stakes game of pingpong, insisting only that he be allowed to choose the paddles. Riggs agreed — and was soundly beaten when Preston showed up with two cooking skillets (which the gambler had been secretly practicing with for months).
Now in his mid-70s, Preston is still active in his trade. He's spent the last few weeks playing in the World Series of Poker in Las Vegas — and he's still a winner. Recently, Preston bet that golf star Annika Sorenstam, the first woman to play in a PGA Tour event in 58 years, would not make the cut at the Colonial tournament. Once again, he was right.
It is worth listening to the piece.  It is really funny.

Wednesday, April 27, 2011

Obama Releases Certificate of Live Birth

Maybe that will satisfy Luke Scott.  Anybody want to bet?  I love how these Republican morons say that a Certificate of Live Birth isn't an official Birth Certificate.  I'm not sure, but I think that's what mine says too.  I'll have to check, and I know I can't trust that my mother didn't actually give birth to me in Africa, so I'm possibly ineligible for the Presidency.  I'm sure all the people who have come across this blog are sorely disappointed with that news.

Update: I would probably be nearly as entertaining as Joe Biden, if I was eligible.

Further update: I too "only" have a certificate of live birth, so either there is no reliable proof that I or Barack Obama were born in this country, or it is further proof that there are some stupid people serving in state legislatures (I'm looking at you, Texas, at least on this issue).  I'll go with the latter.

Friday, April 22, 2011

Going with What's Hot

VoxEU on the gambler's fallacy and the hot hand fallacy, via Mark Thoma:
There are two plausible but apparently contradicting intuitions about how people over-infer from observing recent events.
  • The “gamblers fallacy” claims that people expect rapid reversion to the mean.
For example, upon observing three outcomes of “red” in roulette, gamblers tend to think that “black” is now due and tend to bet more on “black” (Croson and Sundali 2005).
  • The “hot hand fallacy” claims that upon observing an unusual streak of events, people tend to predict that the streak will continue.
The “hot hand” fallacy term originates from basketball where players who scored several times in row are believed to have a “hot hand”, i.e. are more likely to score at their next attempt (e.g. Camerer 1989).
Recent behavioural theory has proposed a foundation to reconcile the apparent contradiction between the two types of over-inference (Rabin and Vayanos 2010). The intuition behind the theory can be explained with reference to the example of roulette play.
A person believing in the “law of small numbers” thinks that small samples should “look like” the parent distribution, i.e. that the sample should be representative of the parent distribution. Thus, the person believes that out of, say, 6 spins 3 should be red and 3 should be black (ignoring green). If observed outcomes in the small sample differ from the 50:50 ratio, immediate reversal is expected. Thus, somebody observing 2 times red in 6 consecutive spins believes that black is “due” on the 3rd spin to restore the 50:50 ratio.
Now suppose such person is uncertain about the fairness of the roulette wheel. Upon observing an improbable event (6 times red in 6 spins, say), the person starts to doubt about the fairness of the roulette wheel because a long streak does not correspond to what he believes a random sequence should look like. The person then revises his model of the data generating process and starts to believe the event on streak is more likely. The upshot of the theory is that the same person may at first (when the streak is short) believe in reversion of the trend (the gambler’s fallacy) and later – when the streak is long – in continuation of the trend (the hot hand fallacy).

Wednesday, April 20, 2011

After FBI Busts, Online Poker Players Head to the Casino

LA Times:
Though it was a Monday night and tax day to boot, finding a parking spot at Hustler Casino in Gardena was no easy feat.
It may have been the ongoing poker tournament that helped the crowd swell above normal size. But over the weekend, a breed of player not usually found in clubs had also swarmed the casino. Wearing sunglasses under their hoodies and hats, they stood out "like a zebra around a bunch of cows," manager Craig Kaufman said.
They were online poker players, who usually disdained Hustler's plush velvet detailing and soft jazz background music in favor of a dozen simultaneous poker games sprawled across home computer screens.
But after the FBI last week shut down the three biggest Internet poker sites — and accused their three founders and eight other executives of bank fraud, money laundering and violating gambling laws — millions of online players suddenly found themselves with few alternatives except to play in person. In the real world.
This makes me think of this story, which I heard last week about how poker playing robots are winning big in online poker sites.  I always was concerned that somebody could be rigging the game in online poker. 

Trying to limit online gambling is a sucker's game, somebody is always a step ahead.  Apparently, I;m not the only one who thinks that.  From the LA Times story:
This is a battle the U.S. might win in the short run, but they're not going to stamp out online poker playing," Kelly said.
But they'll still try.

Sunday, April 17, 2011

Kasich Hires Consultants on Gambling

DDN:
Gov. John Kasich’s administration on Thursday announced that two companies have been selected as consultants to “advise the state on how best to harmonize Ohio’s gaming policies and optimize gaming’s benefits to Ohio.”
The companies, who will be paid about $400 per hour, are Spectrum Gaming Group of Lindwood, N.J., and Moelis & Company of Los Angeles, Calif., an investment bank, a press release said.
The total cost has not been projected because the scope of the contract with each firm still is being worked out, said Molly O’Reilly, spokeswoman for the Department of Administrative Services.
$400 an hour sounds like a good chunk of money to this farmer.  The consultants will work with the state to write rules and regulations.  If the Republicans in the Legislature weren't religious nuts, they could have done all of this in an open process 10 years ago and allowed bidders to bid for licenses instead of letting potential casino owners write them in a Constitutional Amendment which gives them a monopoly on casinos.  Instead they didn't, and Ohioans have been going to other states to gamble since.

Friday, April 8, 2011

Rational Inattention

Mark Thoma highlights a report  from the Federal Reserve Board in Dallas:
One macroeconomic school of thought—known as rational expectations—assumes that people fully and quickly process all freely available information. By comparison, under rational inattention theory, information is also fully and freely available, but people lack the capability to quickly absorb it all and translate it into decisions. Rational inattention is based on a simple observation: Attention is a scarce resource and, as such, it must be budgeted wisely.[1]
A world with overwhelming amounts of facts and data means prioritizing activities, recognizing individual processing limitations and accepting the consequences when acting, even if all information isn’t fully analyzed. Given a physical constraint on the rate at which people can process information—referred to as Shannon’s channel, after Claude Shannon, a Bell Labs researcher who pioneered information theory in the 1940s—people choose how much attention to devote to different subjects so they can maximize their productivity.
This seemingly abstract concept has a familiar resonance with day-to-day experience. For instance, the maximum amount of information that somebody can download from a computer at any one moment cannot exceed a number—the transmission rate—provided by the manufacturer. Likewise, a person cannot instantaneously respond to a given email. The amount of time it takes to answer email depends on its content and how much information that person wants to process to produce a sensible reply. The brain, which has limits on its processing abilities, is the channel through which an individual directs information, from the original email to the reply.
As Thoma mentions, the theories are interesting, but the mathematics underlying it is difficult.  I would guess so.  Really, this is just a way to try to fit real-life to the theory of rational expectations.  Even with the help of behavioral economics, I don't think you will be able to accurately predict what people are going to do in the future.  I know that my decision-making process is pretty harried, involves quick mistakes and built-in biases, and a whole lot of chance.  If someone observed me for a long time and tried to predict what decision I would reach, I bet they wouldn't be too successful.  Trying to do that for the whole world is pointless, especially when misinformation and propaganda is so prevalent. 

Fibonacci Sequence in Lateralus

Via Ritholtz:
Whether you are an investment trader, a music fan, a mathematician, a curious observer wishing to learn more about human nature, or any combination thereof, you will appreciate this lesson on the Fibonacci Sequence (more on this after the YouTube link):
The video, created by a college student to help explain the Fibonacci sequence, features images of space from the Hubble Telescope and music from the cerebral and progressive hard rock band Tool.  What makes the video and song incredibly compelling is the lyrics, which teach a lesson on pattern recognition.
For those non-traders and non-mathematicians out there, a Fibonacci sequence is a series of numbers where, after two starting values, each number is the sum of the two preceding numbers.  For example, the number sequence 2, 3, 5, 8 and 13 are a Fibonacci sequence (2+3=5, 3+5=8, 5+8=13, and so on).
Making the video and song more interesting is that the cadence of the lyrics (number of syllables of succeeding verses) follows a Fibonacci sequence.  What’s more, the meaning and lesson of the lyrics implies that humans are hopelessly addicted to looking for patterns everywhere they turn:  The “over-thinking” and “over-analyzing,” as the lyrics suggest, have an effect of dulling intuitive thought and often results in missed opportunities.
There is more in the post about pattern recognition, pro and con.  Here's the video:

Friday, March 25, 2011

The Danger of Nuclear Power

From Seth Godin via the Dish:

He says:
For every person killed by nuclear power generation, 4,000 die due to coal, adjusted for the same amount of power produced...
Radiation is still a scary unknown, but mainly if you live near the reactor.  I wouldn't want the farm poisoned for generations from radiation (although you might be able to grow giant crops).  Luckily, accidents like this are extremely rare.