Listen to Robert Emmerich introduce The Big Apple, a hit song from 1937. Music written by Bob and performed by Tommy Dorsey's Clambake Seven with Bob on piano. Lyrics written by Buddy Bernier and sung by Edythe Wright. Audio provided by Dorothy Emmerich.

“Bill Gates walks into a bar and everyone inside becomes a millionaire...on average.”

The joke is really a math example of how “average” (or “mean") can be misleading. Bill Gates is one of the richest people in the world. If the median wealth of all bar patrons had been taken, the wealth result of bar patrons would have shown a vastly different result.

“Bill Gates walks into a bar...” has been cited in print since at least 2003. American economist and New York (NY) Times columnist Paul Krugman has often told the “joke” to illustrate statistics of income inequality.

Math Central
For example, consider the following data points: 1,1,2,3,4

The mean or average is (1+1+2+3+4)/5 = 2.2
The median is “2” (the central value).
The mode is “1” (it occurs most often).
The midrange is (4+1)/2 = 2.5

Wikipedia: Bill GatesWilliam Henry “Bill” Gates III (born October 28, 1955) is an American business magnate, investor, author and philanthropist. In 1975, Gates and Paul Allen co-founded Microsoft, which became the world’s largest PC software company. During his career at Microsoft, Gates held the positions of chairman, CEO and chief software architect, and was the largest individual shareholder until May 2014. Gates has authored and co-authored several books.

Starting in 1987, Gates was included in the Forbes list of the world’s wealthiest people and was the wealthiest from 1995 to 2007, again in 2009, and has been since 2014.

Google Groups: alt.music.mike-keneally
OT: The SUV Wars
Sadistics
Hagrinas Mivali
2/26/03
(...)
Bill Gates walks into a bar. Hey, we’re all rich, shouts a patron. The average person in this bar is worth a billion dollars. There are times when the median makes a lot more sense. This is especially true when you are talking about tax cuts.

Google Groups: rec.games.miniatures.historical
Predictions—Re: Gulf War - change the paradigm
Bazarov1
4/5/03
>>>600,000 to 900,000 Iraqis dead as a direct result of Saddam’s policies.
>>>Divided over 30 years of his rule, you get an average of 20-30,000 per
>year.
>>

On second glance that looks like a rather fishy method. Rather like the joke where Bill Gates walks into a bar and a Republican yells “Yippee! We’re all millionaires now!” After all, a 100,000 of the deaths would be Kurds, mostly killed in one year.

Google Groups: talk.politics.misc
NYT’s Paul Krugman on Bush’s Economic Record and the Media
Jeffrey Turner
9/1/04
(...)
Paul Krugman, speaking at New York University on August 30, 2004.

PAUL KRUGMAN: (...) The answer right at—it’s—the people don’t know what average means. If Bill Gates walks into a bar, the average net worth of the patrons is a couple of billion dollars.

New York (NY) TimesLetter To the Secretary
By PAUL KRUGMAN
Published: March 24, 2006
(...)
I find it helpful to illustrate what’s going on with a hypothetical example: say 10 middle-class guys are sitting in a bar. Then the richest guy leaves, and Bill Gates walks in.

Because the richest guy in the bar is now much richer than before, the average income in the bar soars. But the income of the nine men who aren’t Bill Gates hasn’t increased, and no amount of repeating ‘’But average income is up!’’ will convince them that they’re better off.

Google BooksEconometrics of Risk
Edited by Van-Nam Huynh, Vladik Kreinovich, Songsak Sriboonchitta and Komsan Suriya
New York, NY: Springer
2015
Pg. 64:
The fact that the mean has limitations can be illustrated by a known joke: “What happens when Bill Gates walks into a bar? On average, everyone becomes a millionaire.”

Reddit
Bill Gates walks into a bar and everyone inside becomes a millionaire…
submitted September 29, 2016 by Trysinux
on average.