Monday, January 19, 2015

Teaching the Love of Thinking and Discovery

This post is going to be different from what I've published here before. I'm not going explain something or attempt to be clever. Instead, I want to share an idea, an open ended kind of idea for which, at this point, I have no conclusions. First, let me share some background.

The other day I shared a TED Talk by Conrad Wolfram ("Teaching kids real math with computers") as an update on LinkedIn and on my personal Facebook. Please take the time to listen to this if you have not already. I think this is actually vitally important to the well being of our children and how they gain an education.

My friend and colleague, James Mitchell, made the following comment on the original update: "A great talk. My daughter's life would have been so much easier and better with this approach to teaching math. Wolfram talked about all her complaints." They were my complaints, too. A few of the comments made on my Facebook page included "Math is hard" and "I hate math. I never use it." Apparently, the same complaints are shared by more than just two people.

Curiosity photo by Rosemary Ratcliff, provided courtesy of FreeDigitalPhotos.net

I've been thinking about this TED Talk almost non-stop since I watched it, and I'm beginning to think that one way to achieve the idea here is to provide mathematics education outside of traditional school environments. By that, I don't mean that we should advocate that schools quit teaching math; rather, I think we need to start providing private forums in which kids who are interested in math can learn math in the same way they might learn and participate in extracurricular sports or arts activities that are not offered in a traditional school. I'm currently convinced the program must be private and free from policy driven curricula that "teaches to the test" and arbitrary performance criteria. This is for fun, but a special kind of fun.

What if there were mathematics/programming academies that taught math this way? Maybe it would be a private academy for self-motivated kids who want to learn math, maybe offered after their normal school day or on the weekends. It would follow the approaches advocated by Conrad Wolfram, Paul Lockhart, and Kevin Devlin. It would not confer a degree, diploma, or certificate of any sort other than a letter that describes the areas of inquiry and completion of certain milestone projects that were self-selected by the student and mentored by the "professors." For older students, these projects might include publishing papers in journals as well as serve as the submissions to more traditional math and science fair projects. This would not be an after school tutoring program for students who want to improve their grades to passing levels or gain extra points on their college admission tests.

In other words, the immediate purpose of the school would only be to satisfy the natural curiosity of self-motivated students. I believe such an academy would eventually provide economic benefits to its students because it would teach both creative and structured thinking that the market would eventually reward, but the near term benefit would serve to remediate the destruction of natural curiosity created in our current systems and just simply help our youngest achieve what they want to achieve. I envision this as a kind of math zendo where children learn the art driven by intrinsic motivation and encouragement from like-mined but more mature leaders.

Of course, as ideas take hold in our minds, so do the doubts. I think the difficult aspect of this idea would be financing the program. Currently, I see the finances being provided in part by student fees, some voluntary time offered by teachers, and private donations. I would want to structure the student fees such that an interested student could not participate because they could not afford the fees.

Much remains to be considered here. Maybe this has been done before or is being done right now. I don't know. Regardless, I welcome any feedback you might offer.

Wednesday, January 07, 2015

An Interesting Christmas Gift

Over the holidays, the New York Times delivered an unusual juxtaposition of headlines and content, and apparent lack of self-awareness, to illicit such a hearty chuckle from its readers as to make the cheerful Old Saint jealous.


[image originally provided by @ddmeyer on Twitter]

To those imbued with the skill of basic high school Algebra 1, the information in the article about Sony’s revenues for the first four days of release of “The Interview” were enough to solve a unit value problem. If we let R = the number of rentals, and S = the number of sales; then,
  • R + S = 2 million 
  • $6*R + $15*S = $15 million 
With a little quick symbolic manipulation, we see that S = 1/3 million in sales and R = 5/3 million in rentals. That exercise provided just enough mental stimulation and smug self-righteousness to prepare for the day’s sudoku and crossword puzzles. #smug #math

However, not too far into the sudoku puzzle we might realize that a deeper, more instructive problem exists here, a problem that actually permeates all of our daily lives. That problem is related to the precision of the information we have to deal with in planning exercises or, say, garnering market intelligence, etc. A second reading of the article reveals that the sales values, both the total transactions and the total value of them, were reported as approximations. In other words, if the sources at Sony followed some basic rules of rounding, the total number of transactions could range from 1.5 million to 2.4 million, and the total value might range from $14.5 million to $15.4 million. This might not seem like a problem at first consideration. After all, 2 million is in the middleish of its rounding range as is $15 million. Certainly the actual values determined by the simple algebra above point to a good enough approximate answer. Right? Right?

To see if this true, let’s reassign the formulas above in the following way.
  • R + S = T 
  • $6*R + $15*S = V 
where T = total transactions, and V = total value. Again, with some quick symbolic manipulation, we can get the exactly precise answers for R and T across a range of values for T and V.
  • S = 1/9 * V - 2/3 * T 
  • R = T - S 
Doing this we now notice something quite at odds with our intuition - the range of variation between the sales and rentals can be quite large as we see in this scatter plot:



[Fig. 1: The distribution of total transaction values for various combinations of rental and direct sales numbers.]

Here we see that the rental numbers could range from about 800 thousand to 2.4 million, while the direct sales could range from nearly 0 to 700 thousand! Maybe more instructive is to consider the range of the ratio of the rentals to direct sales:


[Fig. 2: The distribution of the ratio of rentals to direct sales for various combinations of rental and direct sales numbers.]

If we blithely assume that the reported values of sales were precise enough to support believing that the actual value of rentals and unit sales were close to our initial result, we could be astoundingly wrong. The range of this ratio could run from about 1.11 (for 1.5 million in total transactions; 15.4 million in sales) to 215 (for 2.4 million in total transactions; 14.5 million in sales). If we were trying to glean market intelligence from these numbers on which to base our own operational or marketing activities, we would face quite a conundrum. What’s the best estimate to use?
Fortunately, we can turn to probabilisitic reasoning to help us out. Let’s say we consult a subject matter expert (SME) who gives us a calibrated range and distribution for the sales assumptions such that the range of each distribution stays mostly within the rounding range we specify.

[Fig. 2a, b: The hypothetical distribution of the (a) total sales transactions and (b) total value assessed by our SME.]

Using the sample values underlying these distributions in our last set of formulas, we observe that in all likelihood - an 80th percentile likelihood – the actual ratio of the rentals to sales falls in a much narrower range – the range of 3 to 9, not 1.11 to 215.

[Fig. 3: The 80th percentile prediction interval for the ratio of the rentals to sales falls in the range of 3 to 9.]

Our manager may push back on this by saying that our SME doesn’t really have the credibility to use the distributions assessed above. She asks, "What if we stick with maximal uncertainty within the range?” In other words, what if, instead of assessing a central tendency around the reported values with declining tails on each side, we assume there is a uniform distribution along the range of sales values (i.e., each value is equally probable to all values in the range)?



[Fig. 4a, b: We replace our SME supplied distribution for (a) total sales transactions and (b) total value with one that admits an insufficient reason to suspect that any value in our range is more likely than any other.]

What is the result? Well, we see that even with the assumption of maximal uncertainty, while the most likely range expands by a factor of 2.7 (i.e., the range expanded from 3-9 to 1.7-18), it still remains within a manageable range as the extreme edge cases are ruled out, not as impossible but as fairly unlikely.

[Fig. 5: Replacing our original SME distributions that had peaks with uniform distributions flattens out the distribution of our ratio of rentals to sales, causing the 80th percentile prediction interval to widen. The new range runs from about 1.7 to 18.]

The following graph displays the full range of sales and rental variation that is possible depending on our degrees of belief (as represented by our choice of distribution) about the range of total transactions and total value.

[Fig. 6: A scatter plot that demonstrates the distribution of direct sales and rental combinations as conditioned by our choice of distribution type.]

By focusing on the 80th percentile range of outcomes in the ratio of rentals to sales, we can significantly improve the credible range to estimate the rentals and direct sales from the approximate information we were given.

[Fig. 7: A scatter plot that demonstrates the distribution of direct sales and rental combinations as conditioned by our choice of distribution type, constrained only to those values in the 80th percentile prediction interval.]

Precise? Not within a hair’s breadth, no, but the degree of precision we obtain by employing probabilities (as opposed to relying on just a best guess with no understanding of the implications of the range of the assumptions) into our analysis improves by a factor of 13.1 (assuming maximum uncertainty) to 35.2 (trusting our SME). If our own planning depends on an understanding of this sales ratio, we can exercise more prudence in the effective allocation of the resources required to address it. Now, when our manager asks, “How do you know the actual values aren’t near the edge cases?”, we can respond by saying that we don’t know precisely, but using simple algebra combined with probabilities dictates that the actual values most likely are not.

The Zen of Decision Making

I copied the following nineteen zen-like koans from the website devoted to the Python programming language (don't leave yet...this isn't really going to be about programming!).
  • Beautiful is better than ugly.
  • Explicit is better than implicit.
  • Simple is better than complex.
  • Complex is better than complicated.
  • Flat is better than nested.
  • Sparse is better than dense.
  • Readability counts.
  • Special cases aren't special enough to break the rules.
  • Although practicality beats purity.
  • Errors should never pass silently.
  • Unless explicitly silenced.
  • In the face of ambiguity, refuse the temptation to guess.
  • There should be one-- and preferably only one --obvious way to do it.
  • Although that way may not be obvious at first unless you're Dutch.
  • Now is better than never.
  • Although never is often better than *right* now.
  • If the implementation is hard to explain, it's a bad idea.
  • If the implementation is easy to explain, it may be a good idea.
  • Namespaces are one honking great idea -- let's do more of those!

The koans are supposed to communicate the essence of the guiding principles of programming. Their zen-like fashion is intended to motivate reflection and discussion more so than state explicit rules. In fact, there is a twentieth unstated (Or is it? How's that for zen-like clarity?) principle that you must discover for yourself.



Good aphorisms often find meaning beyond their initial intent. That's the way general, somewhat ambiguous guidance works and why some aphorisms last for so long in common parlance. They're malleable to one's circumstances and provide a kind of structure on which to hinge one's thoughts, concerns, and aspirations (I'm pretty sure horoscopes and Myers Briggs work this way). Some of these aphorisms, maybe all of them, struck me as not only useful as guiding principles for programming but also for decision management in general. Seriously. Go back and consider them again, Grasshopper.

So, let me ask you:
  • In what way is decision management like programming?
  • How would you interpret these principles, if at all, for use in the role of decision making?
  • What do you think is the missing principle?