log.nikhil.io

Posts tagged “math” 4

A Vickrey Auction

When you end up paying the price you bid (“first price”), you have a strong incentive to lie about how much you’re willing to pay. Suppose there’s an item for sale that you’d be happy paying up to $1,000 for if necessary, but of course you’d rather pay less. In a first-price auction, if you bid $1,000 and you lose. Well, someone else was willing to pay more than you were willing to, so that’s OK, but if you win, you know that nobody else offered that price and you’d be slapping yourself for not going for $950 and saving a little. Or, who knows, maybe there are really few buyers and you later discover that the second person was only valuing the item at $600? Damn, you could have walked away with it for $610!

[. . .]

In a second-price auction, there’s no reason for you to do that. You can simply say exactly the maximum price you are willing to pay, and there’s never any advantage for you in saying anything else:

  • You don’t want to post a higher bid since you might be forced to pay it, and you don’t want to do that.
  • You don’t want to post a lower bid since you might lose the item for no good reason at all.
  • You’ll end up paying exactly what it takes to win the item: one dollar or one cent more than the next person’s maximum bid.

So, a second-price mechanism encourages everyone to bid truthfully, and the item ships to the person who really values it at the highest price. It’s the best outcome for the seller and as good an outcome for everyone else as they could wish for.

Incidentally, note that this is exactly what happens in ordinary public auctions (“going once, going twice… sold!!”) Everyone walks in with an idea of how much they’re willing to pay, and they keep bidding one dollar more than the current price until they hit their max—but they’re never forced to reveal their max and what they end up paying is just one dollar (or penny, or whatever) more than the second-highest bidder.

– Alon Amit on Quora (emphasis mine.)

Quite a bit of Game Theory stuff on Wikipedia as well.

Correlation and Causation

Tyler Vigen maintains around 30,000 examples of “spurious correlations” (also available in book form). For instance:

You can also “discover” your own. Like this one

Numbering from Zero

Dijkstra on why numbering should start from zero.

Numbering is done with natural numbers. Let’s take zero to be the smallest natural number1. For the sequence (2, 3, 4, … ,12), using the convention (2 ≤ n < 13) is appropriate because

  • For a sequence starting with zero, like (0, 1, 2, 3), the left hand condition leaks into unnatural numbers if you use “less than”: (-1 < n).
  • For an empty sequence, the right hand also leaks into the unnatural if you use “less than or equal to”: (n ≤ 0)

And minorly, because these are the true of another convention (1 < n ≤ 12)

  • Difference between bounds (13 - 2 = 11) is the length of the sequence
  • I know that these two sequences are adjacent: (2 ≤ n < 13) and (13 ≤ n < 24)

All that’s prep for:

When dealing with a sequence of length N, the elements of which we wish to distinguish by subscript, the next vexing question is what subscript value to assign to its starting element. Adhering to convention a) yields, when starting with subscript 1, the subscript range 1 ≤ i < N+1; starting with 0, however, gives the nicer range 0 ≤ i < N. So let us let our ordinals start at zero: an element’s ordinal (subscript) equals the number of elements preceding it in the sequence. And the moral of the story is that we had better regard – after all those centuries!2 – zero as a most natural number.

There’s also this little nugget

I think Antony Jay is right when he states: “In corporate religions as in others, the heretic must be cast out not because of the probability that he is wrong but because of the possibility that he is right.”

  1. TIL that this can be so. 

  2. Don’t know what he means here… 

Essence of Linear Algebra

I wish I had 3blue1Brown’s excellent series on gaining an intuitive, visual understanding and appreciation of Linear Algebra when I was in college.