Innovation Perspective

An amazing sentence:

…if the car from 1971 had improved at the same rate as computer chips, then by 2015 new models would have had top speeds of about 420 million miles per hour.

That comes from a recent Guardian article on the future of computer chip progress. There are many points of interest including this:

There have been roughly 22 ticks of Moore’s law since the launch of the 4004 in 1971 through to mid-2016. For the law to hold until 2050 means there will have to be 17 more, in which case those engineers would have to figure out how to build computers from components smaller than an atom of hydrogen, the smallest element there is. That, as far as anyone knows, is impossible.

Expected Value of a Generic Positive Random Variable

Here is a math problem:

Suppose we are told that P(X > 0) = 1 and are given that \lim_{n\to\infty} x\big[1-F(x)\big] = 0 . Show that \mathbb{E}[X] = \int_0^{\infty} P(X > x)dx .

Let’s start with the definition of expectation and use integration by parts.

\mathbb{E}[X] = \int_{-\infty}^{\infty}xf_X(x)dx = \int_0^{\infty}xf_X(x)dx since we are given x \in (0,\infty) .

Now using integration by parts, making the natural selection we have:

u=F_X(x) \quad \quad v=x
u'=f_X(x) \quad \quad v'=dx

Recall that \int u'v = uv-\int uv' and plugging in our selections we get:

\mathbb{E}[X] = \int_0^{\infty}xf_X(x)dx = xF_X(x)\bigm|_0^{\infty} - \int_0^{\infty} F_X(x)dx

Let’s rewrite \int_0^{\infty} F_X(x)dx as \int_0^{\infty} \big(1 - P(X > x)\big)dx . This simplifies to \int_0^{\infty} dx - \int_0^{\infty} P(X > x)dx . Let’s plug this back into our equation above:

\mathbb{E}[X] = \int_0^{\infty}xf_X(x)dx = xF_X(x)\bigm|_0^{\infty} - \bigg(\int_0^{\infty} dx - \int_0^{\infty} P(X > x)dx \bigg)

\mathbb{E}[X] = xF_X(x)\bigm|_0^{\infty} - x\bigm|_0^{\infty} + \int_0^{\infty} P(X > x)dx

\mathbb{E}[X] = \big[xF_X(x)- x\big]_0^{\infty} + \int_0^{\infty} P(X > x)dx

\mathbb{E}[X] = \big[x(F_X(x)- 1)\big]_0^{\infty} + \int_0^{\infty} P(X > x)dx

\mathbb{E}[X] = \big[-x(1-F_X(x))\big]^{x=\infty} + \int_0^{\infty} P(X > x)dx since plugging in 0 to the first half of our expression just yields 0 . We can’t actually evaluate x at infinity, instead we take the limit:

\mathbb{E}[X] = -\lim_{x\to\infty} x\big[1-F(x)\big] + \int_0^{\infty} P(X > x)dx , but recall that we are told \lim_{x\to\infty} x\big[1-F(x)\big] = 0 and so we are simply left with:

\mathbb{E}[X] = \int_0^{\infty} P(X > x)dx , our desired result.

Finding the Expected Value of the Maximum of n Random Variables

My friend Ryan, who is also a math tutor at UW, and I are working our way through several math resources including Larry Wasserman’s famous All of Statistics. Here is a math problem:

Suppose we have n random variables X_1, ...X_n all distributed uniformly, X_i \sim Uniform(0,1) . We want to find the expected value of \mathbb{E}[Y_n] where Y_n = \max\{X_1,..., X_n\} .

First, we need to find the Probability Density Function (PDF) f_Y(y) and we do so in the usual way, by first finding the Cumulative Distribution Function (CDF) and taking the derivative:

F_Y(y) = P(Y < y)
F_Y(y) = P(\max\{X_1, ..., X_n\} < y)
F_Y(y) = P(X_1,..., X_n < y)

We want to be able to get this step:
F_Y(y) = P(X_1 < y)P(X_2 < y) \cdots P(X_n < y)

But must show independence and we are not give that our X_i ‘s are in fact independent. Thanks to Ryan for helping me see that by definition:

F_Y(y) = \underset{A}{\idotsint} f_{X_1, \dots, X_n}(y) \,dx_1 \dots dx_n

However, note that in this case f_{X_1, \dots, X_n}(y) is a unit n-cube with area A equal to 1 . In other words f_{X_1, \dots, X_n}(y) = 1 . Our equation then simplifies:

F_Y(y) = \idotsint 1 dx_1 \dots dx_n
F_Y(y) = \int dx_1 \dots \int dx_n = [F_X(y)]^n where X here is a generic random variable, by symmetry (all X_i ‘s are identically distributed). This is the same answer we would’ve gotten if we made the iid assumption earlier and obtained F_Y(y) = P(X_1 < y)P(X_2 < y) \cdots P(X_n < y). Originally, I had made this assumption by way of wishful thinking — and a bit of intuition, it does seem that n uniformly distributed random variables would be independent — but Ryan corrected my mistake.

Now that we have F_Y(y) we can find f_Y(y) the PDF.

f_Y(y) = \frac{d}{dy}F_Y(y) = \frac{d}{dy}[F_X(y)]^n
f_Y(y) = n[F_X(y)]^{n-1}f_X(y) by the chain rule.

Recall that the PDF f_X(x) of a X \sim Uniform(0,1) is \frac{1}{b-a} = \frac{1}{1-0} = 1 for x \in [0,1] . And by extension the CDF  F_X(x) for a X \sim Uniform(0,1) is:
\int_a^x f(t)dt = \int_a^x \frac{1}{b-a}dt = t\frac{1}{b-a} \bigm|_a^x = \frac{x}{b-a} - \frac{a}{b-a} = \frac{x-a}{b-a} = \frac{x-0}{1-0} = x .

Plugging these values into our equation above (and noting we have F_X(y) not F_X(x) meaning we simply replace the x we just derived with y as we would in any normal function) we have:

f_Y(y) = ny^{n-1} \cdot 1

Finally, we are ready to take our expectation:

\mathbb{E}[Y] = \int_{y\in A}yf_Y(y)dy = \int_0^1 yny^{n-1}dy = n\int_0^1 y^{n}dy = n\bigg[\frac{1}{n+1}y^{n+1}\bigg]_0^1 = \frac{n}{n+1}

Let’s take a moment and make sure this answer seems reasonable. First, note that if we have the trival case of Y = \max\{X_1\} (which is simply Y = X_1 ; n = 1 in this case) we get \frac{1}{1+1} = \frac{1}{2} . This makes sense! If Y = X_1 then Y is just a uniform random variable on the interval 0 to 1 . And the expected value of that random variable is \frac{1}{2} which is exactly what we got.

Also notice that \lim_{n\to\infty} \frac{n}{n+1} = 1 . This also makes sense! If we take the maximum of 1 or 2 or 3 X_i ‘s each randomly drawn from the interval 0 to 1, we would expect the largest of them to be a bit above \frac{1}{2} , the expected value for a single uniform random variable, but we wouldn’t expect to get values that are extremely close to 1 like .9. However, if we took the maximum of, say, 100 X_i ‘s we would expect that at least one of them is going to be pretty close to 1 (and since we’re choosing the maximum that’s the one we would select). This doesn’t guarantee our math is correct (although it is), but it does give a gut check that what we derived is reasonable.

We can further verify our answer by simulation in R, for example by choosing n = 5 (thanks to the fantastic Markup.su syntax highlighter):

################################################################
# R Simulation
################################################################
X = 5
Y = replicate(100000, max(runif(X)))
empirical = mean(Y)
theoretical = (X/(X+1)) #5/6 = 8.33 in this case
percent_diff = abs((empirical-theoretical)/empirical)*100

# print to console
empirical
theoretical
percent_diff

We can see from our results that our theoretical and empirical results differ by just 0.05% after 100,000 runs of our simulation.

> empirical
[1] 0.8337853
> theoretical
[1] 0.8333333
> percent_diff
[1] 0.0542087

The Efficiency of the Human Brain

Last March, AlphaGo, a program created by Google DeepMind, was able to beat a world-champion human player of Go, but only after it had trained on a database of thirty million moves, running on approximately a million watts. (Its opponent’s brain, by contrast, would have been about fifty thousand times more energy-thrifty, consuming twenty watts.)

But computer chips are using the architecture of the human brain to become more efficient.

Building on decades of work by Mead and others, engineers have been racing to roll out the first so-called neuromorphic chips for consumer use. Kwabena Boahen’s research group at Stanford unveiled its low-power Neurogrid chip in 2014, and Qualcomm has announced that its brain-inspired Zeroth processor will reach the market in 2018. Another model, I.B.M.’s TrueNorth, only recently moved from digital prototype to usable product. It consists of a million silicon neurons, tiny cores that communicate directly with one another using synapse-like connections. Here, the medium is the message; each neuron is both program and processing unit. The sensory data that the chip receives, rather than marching along single file, fan out through its synaptic networks. TrueNorth ultimately arrives at a decision—say, classifying the emotional timbre of its user’s voice—by group vote, as a choir of individual singers might strike on a harmony. I.B.M. claims the chip is useful in real-time pattern recognition, as for speech processing or image classification. But the biggest advance is its energy efficiency: it uses twenty milliwatts per square centimetre, more than a thousand times less than a traditional chip.

That is from a fascinating New Yorker article by Kelly Clancy.

Will Coding be the Next Blue Collar Job?

That is the question asked by a new and fantastic (and very short) Wired article. The whole article is quotable. Here is one bit:

These sorts of coders won’t have the deep knowledge to craft wild new algorithms for flash trading or neural networks. Why would they need to? That level of expertise is rarely necessary at a job. But any blue-collar coder will be plenty qualified to sling Java­Script for their local bank. That’s a solidly middle-class job…“We need to get more employers saying, ‘Yeah, we just need someone to manage the login page,’” he says. “You don’t have to be a superstar.”

Very Good Sentences

The problem is not that overworked professionals are all miserable. The problem is that they are not…

It is a cognitive and emotional relief to immerse oneself in something all-consuming while other difficulties float by. The complexities of intellectual puzzles are nothing to those of emotional ones. Work is a wonderful refuge.

That is from Ryan Avent piece in the Economist 1843 Magazine titled Why Do We Work So Hard?

When to Debate With Your Opponents

Your opponent has answered “Yes” to the question “Can I change your mind?” (and means it). Most of us can’t. Many more of us say we can if only so-and-so could prove XYZ. Once we’re shown XYZ is proven we immediately bring up esoteric notions about what actually constitutes evidence and proof, want to know who funded the study that proved XYZ, and generally do anything we can to not actually change our mind.

You’re willing to accept the same evidence from your opponent that you require. Number 1 above is more or less fine if we also let our opponent get away with the same sloppiness. The left admonishes the right for not believing in climate change, but continues to be suspicious of GMOs despite similar universal evidence (all the same national and international organizations with white papers on the negative consequences of climate change have position papers that are pro-GMO). My position is that we are human and thus all inconsistent and so we should not be so hard on others for being so. Admitting our inconsistency and emotional nature can let us have a more honest conversation about our beliefs that are not masked in “facts” and “evidence.”

You can answer a series of the next obvious questions about your position. For example, if you believe the rich should pay more in taxes you should know how much they currently pay in taxes. If you believe we should have fewer refugees you should know how many we currently have. Many people think they know the answers to these questions and actually don’t. If “Warren Buffet’s secretary pays more in taxes than he does” is the mental model you have for high earners under the U.S. tax system please humbly have a seat.

You can pass an Ideological Turing Test. Meaning that if we put you behind a curtain you could fairly and accurately represent the views of your opponent. You should not, for example, say, “The rich believe they shouldn’t be taxed much because everything trickles down to the rest of us and there’s nothing wrong with the masses fighting ever harder for the few remaining scraps” or “Liberals believe most immigrants should be let into the country with very little screening, live off of welfare until they get a job, all so they can have more fake pseudo-intellectual conversations with foreigners at their bohemian dinner parties.” Or anything approaching those two positions. Almost every position has a very reasonable line of argumentation based on experiences and ethics of those that believe it.

You know what it would mean if you were wrong. What if the minimum wage was genuinely bad for poor people? What would that mean for your identity and life experience and the friends you have and the things you do? What if gay people really were born that way? Or what if sexuality was actually all a choice? What if climate change was real and a serious threat to future human survival? What if taking steroids didn’t really help Barry Bonds that much? If you can’t honestly imagine all the ways your life and identity are tied up in believing what you believe you’ll never be able to have an honest conversation.

You know why you need other people to believe the same thing you believe. You want to say that it’s because people’s lives are at stake. And sometimes that’s true. I’m not arguing there is never a time to fight. But many people’s beliefs seem devoted to signaling as much as to helping people. Not everyone has to agree with you. You might be wrong, remember. Often, time spent convincing people to believe what you believe is not only fruitless, but takes away time you could be spending addressing the problem. Let people disagree with you and love them anyway, admit you might be wrong, and push ahead humbly.

If you failed any one of these tests, and especially if you passed all of them, perhaps you should listen to, and empathize with, your opponent; not actually call them your “opponent” to begin with; and spend as much time questioning your own views as those you disagree with. This not simply so you can feel warm and fuzzy, although you will, but because it’s probably a much better approach for being persuasive out in the wild.

 

Kelsey Plum’s Chase for #1

Thanks to Graham for this question on Whale. Graham asked about Kelsey Plum and whether she will break the record?

“What record?” you might ask. Plum is very close to becoming the all-time NCAA women’s basketball scoring leader. That’s a really big deal and probably one of the under reported stories in basketball right now. NCAA Women’s Basketball started in 1981, that’s 35 years worth of basketball. Plum will have scored more points than greats like Brittney Griner, Chamique Holdsclaw, and Cheryl Miller.

In December of last year Plum became the all-time Pac-12 scoring leader with 44 points in a win against Boise State. She had 44 points again on Sunday in a 72-68 loss to Stanford.

Plum is now averaging 31.4 points per game (to go along with 5 rebounds and 5 assists) and now sits third all time, just 255 points away from Jackie Stiles who set the record 15 years ago with 3,393. The UW Women have 8 games to go in the regular season and if Plum keeps up her average she’ll fall just shy of the record by season’s end with 3,388 points. Luckily, the UW Women are all but guaranteed at least two post-season games, one in the Pac-12 tournament and another in the NCAA tournament, which they’ll likely make even if they fall in the first round of the Pac-12. They could play up to nine games if they make it to the final in both, but will likely end up playing somewhere around six or seven games. Still, this gives Plum plenty of time to break the record and I predict she’ll surpass it by 100 or 150 points.

I plotted the graph below using R to show Plum’s chase for the record.

kelsey_plum_prediction

The State of Basketball in Seattle

Thanks to Graham for this question on Whale.

First, we have to start with Nathan Hale High School which has the number one boys basketball team in the nation. Last year they were 3-18, but that was before former NBA start Brandon Roy joined as the team’s head coach and they received seven out-of-district transfers including Michael Porter Jr., the nation’s No. 1-ranked recruit in the 2017 class. Michael has signed a letter of intent to play for the University of Washington next year. His brother Jontay also plays for the team and is currently ranked as the 26th best player in the 2018 class.

Seattle’s Garfield High School is ranked 79th in the nation. Not bad considering the US has 37,000 public and private high schools.

The University of Washington men aren’t doing well as a team and have just a 9-11 record. They do, however, have Markelle Fultz who is a potential number one pick in next year’s NBA Draft. And there are currently eight former UW players in the NBA.

The UW women, however, are currently 19-2 and ranked 7th in the nation. Kelsey Plum is the all-time Pac-12 scoring leader. As I write this she’s just 323 points shy of being the NCAA all-time women’s leader in points scored.

There is also the Seattle Pro Am, which last year featured a number of current NBA Players.

And who can forget that the outdoor court at Greenlake, popular for pick-up games during the summer (when it’s not raining) was once featured in NBA Street Vol. 2. Greenlake is occasional host to amateur slam dunk contests, including one hosted by Shawn Kemp.

Which reminds me, in Seattle we never talk about the Sonics.