Tuesday, June 21, 2011

Ones and Twos, Twos and Threes

Organized basketball has some different scoring rules from pickup basketball. In organized basketball, a regular shot is worth two points and a long shot is worth three. In pickup, a regular shot is worth one and a long shot is worth two. Also, in pickup half-court games, most people play that the team that made a shot gets the ball again ("winners"), while in full-court games (pickup and organized), the team that made a shot does not get the ball ("losers").

This has some strategic implications. To take an extreme case, suppose you're playing with 1's and 2's, and ignore offensive rebounding and turnovers. In losers, a 51% chance at a 2-pointer is better than a 100% chance at a 1-pointer. In winners though, if you can make a 1-pointer 100% of the time and you can get the ball, you always win.

Suppose you can make a regular shot 50% of the time, and again, assume no offensive rebounds or turnovers. What percentage do you need to shoot a long shot instead?

If you're playing with 1's and 2's, losers, it's 25%
With 1's and 2's, winners, it's 33%
With 2's and 3's, losers, its 33%

If you can make a regular shot 33% of the time:

If you're playing with 1's and 2's, losers, it's 16.7%
With 1's and 2's, winners, it's 20%
With 2's and 3's, losers, its 22%

As a side note, if you're in an NBA game, you should generally feel indifferent between a 3-pointer and a 2-pointer if you're 50% more likely to make the 2. But if you deciding between a 2 and a 3 at the very end of a game, making a 3 means that you definitely win, where making a 2 means that you're going to overtime. So assuming that you think you have a 50-50 shot in overtime, you need to be twice as likely to make the 2 as the 3.
Taxi Regulation

I am a Matthew Yglesias supporter but I don't agree with this post about taxi regulation: http://thinkprogress.org/yglesias/2011/06/20/248717/market-prices-can-match-supply-and-demand-of-taxis-and-taxi-drivers/ He argues that there is no reason for government to restrict the number of taxis and that the only reason for restrictions is to protect incumbent taxi drivers. To see why this is not necessarily correct, consider a very simplified version of the market for taxis:

Suppose there is a fixed number of taxi rides every day, riders don't care if they have to wait, and there is a fixed price for the rides. Also, a potential taxi driver is choosing between being unemployed and earning 0 and driving a cab, which will earn him (1000 / N - 50) dollars per day, where N is the total number of taxi drivers. That is, there is $1000 in daily revenue to be divided up by all of the cab drivers, and each driver pays $50 per day in costs of gas, etc.

In the free market there will be 20 cab drivers: each one earns $50 of revenue every day and pays $50 in gas, for a net of 0. No one wants to enter the cab driving market because they would be the 21st driver, and earn negative profits. No one wants to leave because they earn zero either way (assume that if they choose to work and earn 0 rather than be unemployed).

But this is actually a pretty terrible result for society. The world would be much better off if there was only one cab, who collected all of the revenue, and earned a profit of $950 per day. The government could enforce a medallion system where there was only one medallion, which cost $950 per day. Then everyone would earn a net of 0, just as in the free market system, but now the government has an extra $950 to use to give unemployment benefits or anything else. Note that in this system there would be people who tried to drive people around for money, and presumably Yglesias would say they should be allowed to do so. But they should not.

Of course, the taxi market is much more complicated than this. For one thing, consumers benefit when there are more cabs (because they do dislike waiting). But in any case, this effect - the reduction in productivity of all cabs caused by the entrant of one more cab - is real. It is possible that a number of different effects will perfectly offset and that the competitive equilibrium associated with free entry will give the perfect number of cabs, but that is a difficult claim to make and it is not sufficient to announce "Free markets!" and declare victory.

Friday, September 10, 2010

Food Trucks in Boston

This article has in the Globe has an interesting take on the reason that it can take months to get a permit to operate a food truck in Boston: because restaurant owners want to be protected from competition. It doesn't go into the history of these permits, but presumably existing restaurant-owners lobbied the government to create the permits, and the "potential food truck owner" lobby doesn't have clearly defined members (not to mention organization and money), so there wasn't strong opposition.

I'm sure that the stated reason (and legitimately part of the reason) is to protect people from unsafe food but I don't think it is the only reason. The same goes for the licensing requirements for barbers, nail technicians (and to some extent, public school teachers, given that evidence does not show any benefit from a master's in education).

Tuesday, June 08, 2010

A Couple More Econ Ideas

- Announcers talk all the time about "icing the kicker" - calling a time out just before the opposing team's kicker is going to kick a field goal at the end of the game. I'd be curious to look into whether it actually has any effect. It would be relatively straightforward if you could get your hands on a good dataset: look at situations where a coach did ice a kicker, ones where they could have but chose not to (I think this is rare), and ones where they did not have a time out and so could not. Compare "ice" vs "did not have a timeout to ice" and consider whether it affected performance.

- Along the same lines, basketball coaches very often call timeout when their team is doing badly over the last few minutes. The analysis is not as clear but you could look at something similar.

These are in the general category of "test out the conventional wisdom from some sport." I think this would be pretty interesting, and I think there would be decent interest from economists and the general public. Economists are going to be a lot more interested if the result is "teams are throwing millions of dollars (via winning fewer games) by making bad decisions" rather than "announcers are stupid."
Another Scotland Post

In most of the pubs I was in in Scotland there was no music being played (except maybe live music). In the US it's almost a guarantee that there will be music being played or possibly the sound from a TV. In a busier pub in Scotland, it's nice: there is a constant buzz of conversation around you so it doesn't feel that different from an American bar with music, but it is easier to talk to the people around you. In a quieter pub, it feels more like everyone is more in the same social space because it's very easy to talk to other people.

This can be good or bad, and in one bar that Amanda and I were in, it was simultaneously good and bad as a drunk Scottish guy talked quasi-coherently to us until we finished our drinks and left. I was actually thrilled to talk to an odd drunk Scottish guy, but if I lived in Scotland it would probably get pretty old.

Thursday, May 20, 2010

I need a word for this

Amanda wants to paint the bedroom a different color. I don't really want to do this, for a combination of three reasons: it costs money, it would be a boring use of a Saturday, and it's bad for the environment. I have the same objection to getting rid of our perfectly good double bed and getting a queen-sized bed. This comes up often enough that there should be one word that captures it all, like cheap-azy-ism.

Wednesday, May 19, 2010

Domestic Terror Attack

There was a domestic terror attack a week ago that got basically no press. I only heard about it today. It was a pipe bomb attack against a mosque in Florida. The bomb did explode, but fortunately no one was injured. It in completely logical that this got no press while the failed car bomb attack in New York got one million lines of press coverage (?!!?!!).

Monday, May 17, 2010

Some Economics Research Ideas

I'm going to start a PhD program in economics at BU. I've been kicking around some ideas in my head for research topics.

- Names. I'd like to do some research into people with various names. Names vary a lot in popularity from year to year and decade to decade. For example, Amanda was an extremely popular name for girls in the early 80s, but less popular before and after. I'd be interested to look at the life outcomes for Amandas born while it was rising in popularity and while it was falling. My guess would be that parents who are in the leading portion tend to be better educated and wealthier than those in the trailing portion, but I'm really just guessing.

One reason I'm interested is a psych study I saw in college. Two groups were given identical stories, except the main character had different names in the different versions. For one group, it was an "old" name that was no longer popular, like Harry, while the main character for the other group had a more modern name. Participants in the study were asked how they felt about the main character and they liked him better if he had a more modern name.

It might be possible to slightly improve your child's quality of life by giving him/her a name that is on the rise in popularity. If you met a woman named Amanda who was born in 1970 without knowing her age, I would bet you would naturally assume that she was probably closer to the peak of Amandas, around 1980, than you would otherwise. This would be an extremely easy psych study - I don't know if anyone has done it.

You could also look at all of the various tricks that psych studies use to separate out the impacts of the nature and nurture: children who were named by their birth parents but did not live with them, twins where one had an "old" name and one had a "young" one, etc.

- Poker with 20 big blinds. I don't know if someone has calculated this, or even how computationally difficult it would be, but I would be curious to see an optimal strategy for 20 big blind HU NLHE with the following restrictions: the SB can min raise or fold, then the BB can 3bet all-in or fold, then the SB can call or fold. I recently read the optimal strategies for push/fold preflop HU situations in The Mathematics of Poker, and their description of how to calculate it. I have made some progress in calculating it for the 20 bb scenario I described - I wrote a program to calculate all-in equity of two hold 'em hands. I'm not sure if I'll try to follow through and figure it out.

I guess I should follow up with what happened with mapIncluded.com. Basically I paid a guy to do some work on it, and then I did a bunch more work on it to make it better (and learn some PHP in the process). But I hit a snag caused by craigslist's restrictions on what you can post that meant I could only do a much less snazzy version of what I wanted to do and I decided to drop it. I have no regrets though, I learned a lot and it was a fun hobby for a while.
I'm Engaged!

Hooray for me (and Amanda)! Sadly, someone bought our preferred wedding site domain name, amandan.com. I think we're going to get amandanwedding.com, which I argued is better than amandan.net or something similar.

We got engaged in Edinburgh, which is where she studied abroad in college and where we went together early in our relationship. The trip was lots of fun. But now for what this blog is really about: nerdy stuff.

I noticed while I was there that prices were listed including VAT, which is roughly the same as a sales tax, at least from a consumer's point of view. This strikes me as a big improvement over the typical American method, where prices are listed pre-tax, so the consumer actually pays a little over a dollar for something listed as 99 cents. In the European method, the price on the menu tells you what you would have to pay for something. In the American method, the menu tells how much money the company receives. I obviously care much about the former.

Also, most American businesses set their prices so that the pre-tax amount is a round number, something like either $2.99 or $3.00, but then with the tax the consumer winds up with a bunch of coins in change. It slows down the process at the cash register and I find it annoying to have a bunch of coins in my pocket. In Scotland, prices are usually set to be round numbers including tax. In the US, there are some places that generally include the tax in their prices and then make round number prices including tax: movie theaters, sports stadiums, and bars. You would get a reputation as a pretty terrible bar if your drinks cost $4 but came out to $4.23 with tax.

I was in a Kentucky Fried Chicken once that had an interesting/terrifying solution to the annoyance of coins. After you ordered your food, say it came out to $5.18. A screen would offer you the chance to throw in another drumstick to make the total price $6. Since most Americans, especially those at KFC, are dangerously underweight, I'm sure that public health experts are thrilled at this innovation and praying it catches on.

I would be psyched if some business started something doing a fair odds gambling game to get rid of coins in change. Your total is $3.82 and you pay with a $5. If you don't want to gamble, you get $1.12 in change. If you do, you get $2 12% of the time and $1 88% of the time. Of course, I think getting rid of pennies altogether is a no brainer.

Alright, my engagement post was 90% whining about coins. Nice.

Saturday, March 07, 2009

mapIncluded.com

I'm working on a web-based project called mapIncluded. The gist is to help real estate agents and landlords insert a map into a rental apartment listing on craigslist (longer description below). I've outlined what the program should do, but I don't know how to program well enough to do it myself. I've posted it on rentacoder.com and a few other sites, but I'd obviously rather work with someone I know rather than a stranger in a foreign country. So far the best/only bid I've gotten was to do the whole thing for $500.

(I'm also working on a group project with Rob, Jeremy, Krishna, and Chris - mapIncluded was an idea that I was pushing for but did not get choosen as our project. You'll hear more about us later.)

OVERVIEW

This is a service to help real estate agents and landlords create a listing for a rental apartment at craigslist.org. It does so by allowing listers to easily include a map of the apartment, and if the lister is renting out other apartments, those apartments can be on the map as well. An apartment-hunter can click on this map and be taken to mapIncluded.com (which you will create) and see a map of those apartments. Clicking on an apartment will take the user to the appropriate craigslist listing.

THE LISTER

Say there is a real estate agent who has three apartments to rent out. They are at the following intersections in Cambridge, MA: Jones St and Lee St, Elm Ave and Bee St, and Oak St and Bay Rd. In their listing for the apartment for the apartment at Jones and Lee, they can type the following into their craigslist post: *img* *src*="http://www.mapIncluded.com/Jones-St-and-Lee-St-in-Cambridge-MA-and-Elm-Ave-and-Bee-St-in-Cambridge-MA-and-Oak-St-and-Bay-Rd-in-Cambridge-MA.jpg

(Without the *'s. Here is the link for info about putting images into craigslist ads: http://www.craigslist.org/about/help/faq#pictures.)

When the lister enters the post into craigslist, there is a google map visible. On that map, there are three markers visible, one for each of the three apartments. Since this is the map on the page for the Jones St and Lee St apartment, that intersection is at the center of the map (say that marker is red and the others are gray).

There is text below that says "The gray pin points on the map are other apartments listed by the same real estate agent. Click on the map to learn more." It is not possible to insert a fully functioning google map into a craigslist post, just an image that serves as a link.

THE APARTMENT-HUNTER

When the apartment-hunter clicks on the map on the Jones/Elm apartment, they are taken to mapIncluded.com. They see the same google map that was on the post, but this time the user can zoom, move the map, and click on individual apartments. Now if they hover over one of the apartments, they see a preview of the appropriate craiglist post. If they click, a new window is opened up with that craigslist post.

IMPLEMENTATION

I would like to avoid searching the craiglist site, which makes the feature of clicking on an apartment on mapIncluded.com a little tricky to implement. Here's the solution I was thinking of, but I am open to suggestions: When the lister enters the information for the map, they include the intersections as I described above, but also the urls for each apartment. So using the three-apartment example, that would be: *img* *src*="*http://www*.mapIncluded.com/Jones-St-and-Lee-St-in-Cambridge-MA-at-www-craigslist-org-listing123-and-Elm-Ave-and-Bee-St-in-Cambridge-MA-at-www-craigslist-org-listing345-and-Oak-St-and-Bay-Rd-in-Cambridge-MA-at-craigslist-org-listing567.jpg

I just want the map to include the apartments supplied by the real estate agent, not everything that's on craigslist.