## Monday, December 31, 2012

### My Teacher, My Guru

Just found out an hour ago that my PhD adviser retires tonight. Operations Research was the least I learnt from Prof. HDS - despite the fact I used to be clueless enough to think that 'simplex' was probably some kind of vinyl plastic before I enrolled in his graduate program. If Prof. HDS was teaching archaeology  I'd be blogging about digging techniques now. He infused a magic into ORMS that has not gone missing yet. His brilliance is stunning and his research contributions, staggering; his students are moved by his compassion, his classes were masterpieces, and many of his colleagues across the university and the world are in respectful awe... Thankfully, it is much simpler for me. He is my teacher, my Guru. Happy retirement, sir. Go easy on the red ink now, maybe?

-----
Wishing readers of dualnoise from around the world a very happy, safe, and healthy new year! Thank you for taking the time to visit this small 'toolers' corner. Feel free to message dualnoise at gmail on topics you would like to read about in 2013.

## Friday, December 21, 2012

### The Scamster versus the Statesman (or why the Indian National Congress fancies its chances in 2014 and 2019)

A Scam Response Model
The loss due to government-blessed scams and failed populist schemes in India run in the order of Billions and Trillions of Indian Rupees in a country where the impoverished still form a sizable percentage and earning under or around the government designated poverty level of ₹20+ a day (50₹ ~ 1\$). To many Indians, such twelve-zero numbers seem fantastic. Thus a person caught stealing thousands in a small town may receive a sound thrashing because people more clearly recognize the utility of amounts that actually show up in their historical experience. However, as the size of the theft increases beyond imaginable sums, the magnitude of the public response does not appear to proportionally increase. The law of diminishing returns seems to kick in, resulting in a concave response function. We postulate that:
Change in Public Response (ΔR) ∝ Change in # of Zeros (ΔZ) in Scam amount S , i.e

R = k log S, where k is a constant to be estimated using historical data.

The assumption of a logarithmic response model turns to be quite useful in the Indian context. For example, if political party A pulls off a 12-zero scam, and party B a 6-zero scam (using a log-10 base):
response(A) = 12k, and response(B) = 6k.

The response is only a factor of 2 more for the scam that was a million times bigger. This makes it easier for party-A to equate itself to party-B in the eyes of the public. It can have its cake and perhaps eat it too. Most Indians would not find it hard to map A & B to their real-life representatives.

Statesman versus Scamster - Round 1
A subjugated, under-informed electorate may exhibit a strong concave response that is characterized by relatively high sensitivity to small thefts at one end, and a disregard for mega-scams at the other end.  We postulate that such a population's mental decision making model tends to be (1) myopic, (2) local optimality seeking, and (3) pessimistic (MYLOP). It accepts its terrible local living conditions provided the situation doesn't get perceptibly worse, and votes in polls based on this mental model. The immediate cause-and-effect tied to a local 100 theft represents a clear and present risk to current survival and is likely to elicit a swift and violent response, just like a populist cash-equivalent freebie elicits an equally enthusiastic response. However, a gigantic national scam that all but ensures that its future generations will see no improvement is shrugged off. MYLOP behavior is akin to a frog that allows itself to boiled alive because it does not register the gradual increase in water temperature until it is too late.

On the flip side, a government that is largely scam-free and claims to work on long-term growth, but is perceived to have marginally worsened the status quo can get booted out of power in the next election. Asking such a population to endure temporary 'hard choices' in order to be rewarded with medium-to-long term improvement ("no free lunch", "it will get worse before it gets better") implies a non-convex decision model - a hard sell since it clashes with the MYLOP attitude of the population. Scamsters + freebies trumps the Statesman here. Let's dig a little deeper into scams.

How to Hide a Scam?
Answer: A new scam that is an order of magnitude bigger. This can be explained via a mathematical model based on an interesting technical report by John Cook, M. D. Anderson Cancer Center (and author of the Endeavor blog):

The soft maximum of two variables is the function
g(x; y) = log(exp(x) + exp(y))

Given scams S1 and S2, the cumulative response from the public per our postulated model is log(S1 + S2). For example, the Commonwealth Games of India (CWG) plus a few other scams put together was a 9-zero scam, and this was followed by the 2G bandwidth sell-off, which was a thousand times bigger, i.e., a 12-zero scam. The cumulative response is:
log(10^12 + 10^9) = log(10.001 ^ 12) = 12.0005211273k,
a value that is barely more than the response to just the 2G scam itself (12k). In other words, the cumulative response to scams is approximately its soft maximum. The 2G scam simply eclipses the CWG scam in the mind of the public and the media. Even if there were 10 CWG-level scams, they'd be cumulatively eclipsed by a new 2G-level scam for all practical purposes and drop off the radar.

Scamster versus Scamster
Suppose a generally honest political party-B gets greedy seeing the muted public response and its forgiveness of prior scams. If it imitates party-A and pulls off a CWG-level scam, the public's anger would not be a 1000 times smaller. It would only be (12-9)/12 = 25% smaller. Having a clean prior record is not very helpful. Furthermore, if Party-B campaigned on a plank of 'transparent party that is different', it will be perceived as being not very different from party-A (75% alike) despite being 99.9% less corrupt compared to party-A, measured in terms of money siphoned off.

A MYLOP population that is forced to choose between two scamsters (even if their scam sizes are different) will pick the one that offers better freebies. If both provide equal freebies, the MYLOPs are likely to alternate between the two choices, every electoral cycle (e.g state of Tamil Nadu or Uttar Pradesh).

Statesman v/s Scamster - Round 2
Getting out a terrible locally-optimal situation may require a statesman to bring out and maintain a series of organic (sustainable and permanent) and highly visible improvements to first earn the trust of its MYLOP people over a sufficiently long period before unveiling any risky long-term development models. This means a lot of very hard infrastructure work: providing reliable 24x7 electricity, good roads, clean water, primary schools for girls, security for women, etc., to fundamentally alter the decision model of the population from MYLOP to a more optimistic and forward-looking model where people begin to see the possibilities within their grasp. An electorate that is moving along such a positive gradient is more likely to vote to continue along this path of incremental improvement without settling for "dont rock the old boat" and "here and now" populist freebies provided by the scamster.  So the statesman can win (e.g. State of Gujarat), but it takes a lot of heavy lifting to be done upfront.

The two seemingly contradictory outcomes from the two state elections that were announced yesterday (Gujarat and Himachal Pradesh), as well as many other Indian elections in the recent past can be plausibly explained using these simple models.

Update 1: 01/21/2013
Interesting quote from 'Steve Jobs' top 5 mistakes" that directly relates to the above idea of hiding scams using bigger scams:
"... The lesson that I take from these defunct products is that people will soon forget that you were wrong on a lot of smaller bets, so long as you nail big bets in a major way (in Jobs's case, the iPod, iPhone, iPad, etc) .."

## Monday, December 17, 2012

### Collection of Notes on Gun Control

Notes update 1: Dec 18.
Notes update 2: Dec 19.
Notes update 3: Jan 02.

Introduction: The US Outlier
This post is merely an extension of the discussion initiated by Professor Rubin on how not to debate gun control - a discussion that is well worth reading, and one that I have referred to multiple times to try and comprehend a situation that is unique to the US while also sharing certain tragic commonalities with other countries. Much of this post are 'note to self' type remarks for future reference and is a largely unstructured collection of pointers to various articles and personal inferences drawn, which may change as more data becomes available.

The country-independent issues are brought out well in the blog cited in Prof. Rubin's post. That the issue of gun-ownership & deaths also has a US-specific dimension is apparent in this picture presented by a comment on Dr. Rubin's blog.

Macro-Trends

Note however that Newtown was a specific incident (a 'sample of one', as Dr. Rubin notes), whereas this picture above captures macro-trends. Examine these six time-series based facts published by the Washington Post. Assuming this report is factual, the first graphic reconfirms the existence of a unique US situation shown in  the first scatter plot. We will focus our attention on just the first plot in this post. There are other interesting plots that show:

-  a correlation (not necessarily causality) between stricter gun-controlled US states and lower rates of gun-related deaths

- Southern US has the highest gun-driven fatality rates, while the Northeast has the lowest,

- Gun ownership rates are declining, etc.

The above graphic reveals that overall gun-related fatality rates in the US have monotonically dropped over the last twenty years. Neither the economic boom of the 1990s or the relative economic decline in the last decade, or demographic shifts, etc. has managed to cause a significant inflection at the macro-level. Does that mean that the violence in the society has dropped overall (reduction in market size), and/or have people found alternatives to guns to express their violence (reduction in market-share)? We may need several other charts to answer that. However, purely based on this time-series, it appears that what we have in place has apparently worked relatively well at a macro-level so far. We may be tempted to think that by maintaining the status-quo we are on course to achieve parity with the rest of the pack with respect to this specific metric, but to predict the future is difficult, and requires some knowledge of causality (or at least correlations that can give us a tiny hint).

Significant Incremental Improvement
To motivate the next discussion, let us recall this very useful comment by Dr. Rubin:
"Many (including, I'm willing to bet, Mr. Cassingham) would consider a reduction in mass shootings, or even a reduction in the body counts, as a significant improvement (satisficing)."

From the point of view of the person who wants to act violently, they may well use the first (or most suitable) 'weaponizable' object they can first lay their hands on, and thus a gun or a knife may well represent alternative optimal solutions to a perpetrator. The time durations for:
a. formation of violent intent
b. searching for optimal method to express intent
c. translating intent into reality
seem to be quite important. These time durations may range from a few milliseconds to years. Mr. Cassingham's blog rightly notes in more than one place (and I paraphrase) 'if not guns, then people will always find something else' (in stage (b). True. Addressing the root cause of violence (that arises in a person's mind, and incubated over varying time durations in stage (a)) is very important to the discussion, so that we never get to see the realization of later stages. Perhaps addressing each of these stages (a-c) in some order of priority may help.

Addressing (a) is likely to reduce the probability of future incidents, and is something that may have to be addressed in from the short-term p.o.v (e.g. using medical science), and all the way to the long term where the world can move beyond mere tolerance for differences to mutual respect that celebrates difference. Addressing (b) can reduce the expected consequence of a violent incident, given that a tragic incident does occur (ideally to zero). Addressing (c) appears to be tied to 'last line of defense' mechanisms in place.

One of the key contributions of Operations Research is to recognize alternative optimal solutions.  Dr. Rubin's idea of 'optimality versus 'satisficing' seems pretty valuable. From the point of view of expected casualties | given an attempt to mass-injure, a smaller gun, a knife or a baseball bat will probabilistically have a lower casualty rate. An explosive device or a WMD-type gun (like that used in Newtown) is likely to kill more per unit time, on average. Thus from the perspective of a group of trapped victims, horrific as it may be, there may exist a reasonably well-defined ranking of what weapons we least prefer to face (obviously 'facing no weapons' would be ideal). It would beneficial if those who already in stage (b) are always forced to switch to a weapon that is far less deadlier than what was available before. We could think of the deadliness of the weapons permitted as a time-variable 'upper bound' on weapons control. There may be a variety of such bounds along each dimension of the weapon and ammunition, as well as lower bounds on re-training frequency, life-event triggers for re-evaluation of permits, etc. Doing so may provide a gradient along which this discussion can take constructive steps toward reaching the most satisfactory solution by iteratively adjusting these bounds. Again, there are likely to be multiple goals having different priorities as already mentioned in Prof. Rubin's post. The presence of constraints may result in 'satisficing' rather than achieving the desired 'global optimality'. One also wonders about the disruptive impact of 3D printing of weapons on such discussions.

What do we do when people have passed through stages (a)-(b), and ready to move to stage (c)? This is the stage, where their intent, as well as degree of planning starts to become visible to others, but the duration may be extremely limited...

Average versus Distribution
The next discussion borrows from a very recent post of another ORMS professor.  Dr. Trick wrote about the tricky issue of averages recently in his post "which average do you want?".  In addition to the amazing and heroic teachers and staff of Sandy Hook Elementary School, Newton, we just lost eighteen of our most precious and littlest citizens in a matter of minutes after near-complete peace and quiet in that area during the previous 364 days. Such sudden, scarcely comprehensible mass murders (low-probability, catastrophic consequence events) suck the oxygen out of a nation's morale compared to an alternative and equal cumulative tragedy that is well spread out over time and space. Dr. John Cook's blog today talks about the nonlinear effect of 'batch size'. In either of these equally tragic scenarios, from every individual victim's family p.o.v, the anguish and price paid over time is likely to be the same - too high to imagine.  Picture 1 of the WaPo article only reveals a reduction in the overall rate, but not the changes in the distribution (victim's age, motive, ..). The nation's response last week leaves little doubt that the distribution of this statistic is just as much if not more important.

Sam Harris notes in his "The Riddle of the gun" :
"... As my friend Steven Pinker demonstrates in his monumental study of human violence, The Better Angels of Our Nature, our perception of danger is easily distorted by rare events. Is gun violence increasing in the United States? No. But it certainly seems to be when one recalls recent atrocities in Newtown and Aurora. In fact, the overall rate of violent crime has fallen by 22 percent in the past decade (and 18 percent in the past five years).
We still have more guns and more gun violence than any other developed country, but the correlation between guns and violence in the United States is far from straightforward...

..... Seventy mass shootings have occurred in the U.S. since 1982, leaving 543 dead. These crimes were horrific, but 564,452 other homicides took place in the U.S. during the same period. Mass shootings scarcely represent 0.1 percent of all murders. When talking about the problem of guns in our society, it is easy to lose sight of the worst violence and to become fixated on symbols of violence ...  "

LPHC Events in the Life cycle of a Gun
Finally, to the gun itself. Like a pair of scissors, a kitchen knife, or a car, a gun is a tool that has associated with it a probability for helping and hurting simultaneously whenever it is is handled. Associated with each of these tools is an expected frequency of usage and a risk profile that is context dependent (such as geographical location). The intended target of the primary benefit is largely limited to self and family (who bear the cost of maintenance), whereas the cascading and probabilistic liability is necessarily borne by self, family, and others. Every additional gun, its type, and associated inventory of ammunition, increases this probabilistic liability to the owner, his/her family, and public in a certain way, while altering the expected probabilistic benefit to self in another way. In many instances, both the benefit as well as the liability of acquiring guns appear to be tied to Low-Probability, High-consequence events. In extremely peaceful places, the expected liability may exceed the expected benefit over the lifetime of the weapon, whereas in lawless places, the opposite may hold true.

Ahimsa: Notes from Books

Louis L'Amour noted:  "When guns are outlawed, only the outlaws have guns". One of his best books, where violence is almost a living character is 'The Daybreakers" that ultimately ends with a note on the self-realization of the main protagonist leading to his rejection of senseless violence: "We found our home, and we graze and work our acres, and since that day in the street of Mora when I killed Tom Sunday, I have never drawn a gun on any man. Nor will I ...".  King Asoka of India fought and won the bloody battle of Kalinga, but was so shocked by the carnage that he gave up further violent conquests and turned toward meditation and the Dharmic way of life. The multi-millennium old Sanskrit Shloka on Ahimsa (non-harming) in Hindu Philosophy says (ref: Hindupedia):

अहिंसा परमो धर्मः
धर्म हिंसा तथीव च

Translation: Non-harming is the ultimate Dharma (very loosely translated as 'righteous way of life'). Harming in service of Dharma (only) is equally virtuous. Consequently, enduring or ignoring, rather than opposing tyranny is not a virtue. The spirit of the second amendment (arguably) and Asimov's three (plus zeroth) laws of robotics come across as examples of the application of this profound Shloka. Some of Gandhi's more head-scratching ideas are apparently due to his ambivalent treatment of the second line of the Shloka, although the Mahatma did say (ref: http://www.mkgandhi.org)
"I do believe that, where there is only a choice between cowardice and violence, I would advise violence... I would rather have India resort to arms in order to defend her honour than that she should, in a cowardly manner, become or remain a helpless witness to her own dishonor. But I believe that nonviolence is infinitely superior to violence, forgiveness is more manly than punishment"

In Remembrance: Dr.L (2007) and Little Maddy (2012). Om Shanti.

## Thursday, December 13, 2012

### The King and the Vampire - 2: Cricketing Conundrum

This is the second episode in our 'King Vikram and the Vetaal' (Vampire) series, based on the simple but nice Indian story-telling format. Read the first K&V story here.

Dark was the night and weird the atmosphere. It rained from time to time. Eerie laughter of ghosts rose above the moaning of jackals. Flashes of lightning revealed fearful faces. But King Vikram did not swerve. He climbed the ancient tree once again and brought the corpse down. With the corpse lying astride on his shoulder, he began crossing the desolate cremation ground. "O King, it seems that you are generous in your appreciation for the analytics-based Duckworth-Lewis method used in weather-interrupted cricket matches. But it is better for you to know that there are situations where the D/L method invariably results in complaints, especially in T20 cricket. Let me cite an instance. Pay your attention to my narration. That might bring you some relief as you trudge along," said the vampire that possessed the corpse

The cricketing vampire went on:
In a recent Australian T20 match, the D/L method did not just perform badly, it actually failed. Here's why:
Team-A batted first, played terribly and made just 69 runs.
Team-B chasing 70 for a win, got off to a flyer and scored 29 of 2 overs before rain interrupted the match. However, the D/L  revised target for Team-B only comes into play when at least 5 overs have been completed by both teams... Anyway,  here's what transpired, per cricinfo:
".. Under the Duckworth/Lewis method the target for the Stars (Team-B) was recalculated. The calculation, which itself has been disputed, ensured that the Stars required just six runs from five overs. Even though the Stars had already reached and exceeded the target, given the D/L target had changed when overs were lost play needed to resume to set the revised target. Play resumed at 7.52pm after a minor delay. Hilton Cartwright bowled one ball to Rob Quiney, who allowed it to pass through to the keeper, and the match was over as the Stars had reached their revised target after 2.1 overs."

So tell me King Vikram, What is the correct result? Did the Stars win because they achieved the revised target, or should the points be shared because the required five overs were not completed?  Answer me if you can. Should you keep mum though you may know the answers, your head would roll off your shoulders!"

King Vikram was silent for a while, and then spoke: "Vetaal, unlike the last time, this is a tough one, so first consider this counter-factual:

The Stars continue to play for another 1.4 overs, and are bowled out for 29. If the revised target when they were 29/9 was 30, then Team-A (Scorchers) would have won the match. Therefore, even though the Stars were temporarily ahead of the revised target, that target is not static since the minimum overs were not completed. The D/L based revised target is computed based on two resource constraints, taking into account the runs to be scored and wickets lost. It can change over time and the Scorchers still had a theoretical chance, however small, of winning the match by taking wickets.
However, here's another situation. Suppose Team-B was 29/9 after 2 overs, and the revised 5-over D/L target was 52. Team-B gets to 57/9 in 4.5 overs, hitting the last ball for a six before rains come down and and stop the game permanently. In this case, the D/L target cannot increase further, given that Team-B is already 9-down. In this case, Team-A has zero chance of winning the match. Team-B should be declared the winner even though the minimum overs have not been bowled.

1. For the current game, the points have to shared. This answers your specific question.

2. If a match ends before the minimum overs are completed, the chasing team can be declared the winner only if they have achieved a score that equals or exceeds the highest of all possible revised D/L targets that can occur for the fixed number of overs possible. In this example, Team-B would have been declared the winner if they scored at least 52.

3. However, I suspect that the cricket council will simply enforce the minimum-over rule as a hard-constraint that must be satisfied before the match can be decided in favor of one team over the other.

No sooner had King Vikram concluded his answer than the vampire, along with the corpse, gave him the slip.

The Vetaal apparently agreed with Vikram's answer, but do you? If not, explain why. There's no penalty for trying!

### Analytics and Cricket - X : Reader's Response to DRS Debate

It's getting increasingly difficult to post on cricket given that the Indian cricket team is getting ripped to shreds by half-decent opposition despite home-ground advantage. Of course, as noted in an earlier post, home courts can significantly increase the chance of a choke, and this may well be happening. Mahendra Singh Dhoni (if by some chance, still remains the captain of the Indian team after the current cricket series) can win a few more tosses if he can exploit this idea. Desperate times call for analytical measures!

Meanwhile, an astute reader emailed a detailed response to the Bayes-theorem based analysis of the Decision Review System (DRS) used in cricket, which was posted on this blog a few months ago. He made some very pertinent points along with some brilliant comments on the game, which led to an informative exchange that will be carried in the next couple of cricket-related posts. Here is our the 2x2 color coded DRS matrix again for reference.

Raghavan notes:

".... I must question some of the steps in your analysis:

1. In your derivation you use  P(RED|OUT) = 0.95.  I think this is true
only if all decisions are left to DRS.  You have considered only those decisions that are deemed not out by the umpire and referred.  The 95% number does not hold for these selected cases.  It would be lower.  Here's the rationale:
There is a high degree of correlation between DRS and umpires decisions; understandably so, since all those "plumb" decisions are easy for both, the umpire and DRS.  Bowlers would rarely review these decisions.  For the 10% or so cases when the umpire rules the batsman not out incorrectly, the DRS would very likely have a lower accuracy than its overall 95%.

2. If you assume the "red zone" in the picture is sufficiently small compared to 10%, you would get the accuracy of DRS being about 50% for the cases when the umpire incorrectly rules not out.  Now, this needs a bit of explanation.

Let's assume that whenever the umpire rules out correctly, the DRS also rules correctly (well, at least close to 100% of the time).  Note that this does not include just the referrals, but also all the "easy and obvious" decisions that are not referred.  Since the overall accuracy of DRS is 95%, of the 10% that the umpire incorrectly rules not out, DRS also gets it wrong for half of those 10% cases giving an overall 95% accuracy.  In case the "red zone" corresponding to incorrect OUT decisions of the DRS is not close to zero, but say 2% (which is large in my opinion), the DRS accuracy in the bowler referred cases we are talking of would by 70% rather than 50%.  Still way lower than the 95% overall accuracy. [I have made some approximations here, but the overall logic hold]

3. Now, if you plug 70% instead of 95% in your next steps, you get P(OUT|RED) = 88.6%.  Nothing wrong with this number, except when you compare it with the 90% accuracy of umpires.  It's not apples to apples.  P(OUT|Umpire says OUT) is not 90% if you only considered referred cases.  It's actually a conditional probability:
P(OUT|Umpire says OUT, BOWLER REFERS).  I don't have enough information to estimate this, but I'm sure you'll agree it's lower than 90% since bowlers don't refer randomly.

4. I think the right comparison is between the what the final decision would be with and without DRS.
There is no doubt that umpire + DRS referrals improve overall accuracy of decisions.  I admit that false positives would increase marginally, which affects batsmen more than bowlers because of the nature of the game (a batsman has no chance of a comeback after a bad decision, while a bowler does).  But I think it is because of the way Hawk-eye is used today.

5. In my opinion, the
main problem with DRS is that its decision are made to be black and white.  There should be a reliability measure used.  A very rudimentary form of this currently used in LBW decisions.  For example, if the umpire has ruled out, to be ruled not out by DRS the predicted ball path has to completely miss the stumps.  But if the umpire has ruled not out, the predicted path should show that at least half the ball is within the stumps for the decision to be over-turned.  Eventually, I feel Hawk eye would be able to estimate the accuracy of it's decision.  I'm sure Hawk eye has statistics on it's estimates.  The standard deviation of the estimate would depend on several factors - (1) how far in from of the stumps has the ball struck the pads (2) How close to the pads has the ball pitched (hawk-eye needs at least a couple of feet after the bounce to track the changed trajectory), (3) Amount of turn, swing or seam movement observed.

If a standard deviation (sigma) can be estimated, then a window of say +/- 3*sigma could be used as the "region of uncertainty". If the ball is predicted to hit the stumps within this region of uncertainty then the decision should be out. Of course the more complicated it gets to explain to the viewer, the more resistance there would be to be accepted.  But if it is the right way, it will eventually get accepted.  Take DL method for example.  A vast majority of viewers don't understand it fully, but most of them know that it is fair.

6. There's another aspect that needs to be investigated.  It's about how the decision of the on-field umpire is affected by the knowledge that DRS is available.
"

Followups will be carried in a subsequent post. Blog-related emails can be sent to: dual[no space or dot here]noise AT gmail dot com, or simply send a tweet.

## Friday, December 7, 2012

### The Rose and The Chrysanthemum

An extended tweet triggered by recalling an old joke.

(pic: Wikipedia)
Girl: look! a rose!
Boy: No, that's a Chrysanthemum.
Girl: Ok, then spell it
Boy: Kri--, no. Ch-ri-san... you're right, that's a rose.

This is an example of user-optimality.

## Wednesday, December 5, 2012

### Entropic Decision Optimization using Amazon's Add-on Item Constraint

When we shop at Amazon, we often end up with about 23-24\$ worth of stuff in our cart, short of the 25\$ threshold that gives us free shipping. As far as I could remember, we could always add small items (like a box of paper-clips) to satisfy this knapsack constraint. In other words, we could reasonably approximate this discrete threshold satisfaction problem as a continuous knapsack constraint, which is amenable to "greedy" approaches.

A Tougher Knapsack Problem
Amazon has now designated many items whose values are roughly \$5 or less, to be "add on" items, and is marketed as follows:
"The new Add-on program allows Amazon to offer thousands of items at a low price point that would be cost-prohibitive to ship on their own... Add-on Items ship with orders that include \$25 or more of items shipped by Amazon, and you can get them delivered to your doorstep with free shipping ....Previously it was only possible for us to offer many of the items like these in large multi-pack sizes... "

Speaking purely from a personal point of view, it feels like this "benefit" actually hurts customers by placing additional restrictions (on the other hand, there may well be an incremental benefit to a section of customers) since such low-priced items cannot be used to satisfy our knapsack constraint, and we may end up purchasing a bit more than the 25-26\$ we achieved before, or pay for shipping. This new 'add on item' constraint requires us to solve a discrete knapsack problem to best satisfy the free-shipping threshold. Although NP-Hard in theory, it is well-known that we can find optimal or near-optimal solutions to practical integer knapsack problems in quick time using specialized algorithms.

Entropic Decision Optimization (EDO)
This add-on constraint can be used to illustrate the EDO approach that we discussed just a couple of days ago. Consider the following heuristic algorithm:

Start with a super-set of items (wish list) we intend to purchase over the next few weeks/months. This list is constantly updated over time. Any time we want to make a purchase, assign a priority score to each item that is positively correlated with the time-sensitivity of its purchase (an item that we 'must' purchase right away goes directly into the cart). Then solve the following integer knapsack problem:

Maximize (sum of scores of chosen items)
subject to:
1) sum(\$ value of chosen items) 30
2) Bounds on the quantity of purchase of each item.

We picked 30\$ as the RHS assuming that we can easily find a 30\$ or higher-valued basket using our old "continuous" approximation. If we use a dynamic programming approach, we also get as a by-product, the solutions for a range of RHS values less than \$30. Pick the solution corresponding to the smallest capacity at or exceeding \$25. If we have very few choices, we can simply enumerate the possibilities.

We chose as a measure of "entropy" in our super set, the total time-sensitivity of super set, and selecting relatively time-critical items reduces entropy. Our EDO algorithm will usually do a good job of limiting the entropy in our wish list, but over time we may end up with quite a few "hot" items that never seem to fit the knapsack well and kept getting rejected, indicating that our list has reached a state of high entropy. We are forced to make suboptimal choices and stray far away from the optimal \$25 target. It does feel like we are playing Tetris.

## Sunday, December 2, 2012

### Managing Black Swans using Operations Research

LPHC Events
The importance of modeling Low-Probability High Consequence (LPHC) events, popularized in recent times by Nassim Taleb as "Black Swans" has been recognized by Operations Researchers for quite some time. As this recent article (via Reddit) implies, it is both demystifying and useful to talk of consequential rare events in terms of a range of probabilities rather than a potentially misleading binary classification of B/W Swans. For example, LPHC modeling is critical to identifying min-risk Hazmat routes, a popular research area within OR. In addition to standard risk measures such as the expected probability of an accident occurring on a given route, or the total expected cost of a chosen route, planners also explicitly limit the conditional expected cost associated with a catastrophic event along a prescribed route if in fact such an event were to occur along any link in the route. Practical OR models aim for robustness by never focusing on just one objective given that extremal solutions tend to faithfully follow the no-free-lunch rule. OR Planners typically  track a variety of risk objectives and seek alternative optimal solutions that adequately address the multiple modes of failure that can be triggered over time.

Narrative-Rational, Time-Dependent World
Until recently, I thought that coin tosses were 50-50 events. In an unbiased, narrative-free world they are, but as Venkatesh Rao argues in his book 'Tempo' (and this understanding is subject to my limited ability to grasp and interpret the dense writing style employed in this book) that there is no absolutely narrative-independent useful model of rational decision-making: "... there is no meaningful way to talk about specific decisions outside of a narrative frame and a concrete context, any more than it is possible to talk about physics without reference to a specific, physical coordinate frame ..."
Rao agrees with Taleb's 'Black Swan' book claim that introducing a narrative injects bias, but is disinclined to adopt the approach of severing the narrative from the decision making process. Instead, Rao chooses to embrace narrative and his book examines elegant and sound decision-making within a given enactment over the narrative clock. On the other hand, Venkatesh Rao feels that the narrative-independent "Calculative rational decision-making finesses situatedness by working only with highly controlled clocks. When you start this way, seductive general theories of decision-making take center stage, and local conditions are forgotten, minimized or dismissed as “details.”. Perhaps, by zooming in on the narrative of a guy who makes decisions based on the outcome of 'vigorously tossing and catch a coin', researchers were able to recognize these subtle 'local conditions' that allowed them to predict the bias in real-life coin tosses.

Risk and Analytics
How do we deal with risk associated with decisions prescribed by today's predictive analytical models embedded within decision support systems? This is an important issue since our underlying predictive analytical models are calibrated using noisy data generated from past decisions. As long as our recommendations lie within the historical range, its consequences can be expected to be reasonably bounded. However, once we create new history (e.g. pricing a product at a value never ever done before), our predictive model is forced to extrapolate. Per 'Tempo', we now exit a closed world and enter an open one, where "The open world is a world that includes what Donald Rumsfeld called “unknown unknowns” and Nicholas Nassim Taleb calls “black swans” (rare, highly consequential events)." In such instances, history is of limited use as a guide, and statistically driven analytics can fail. Rao says that such calculative rational [analytical models]: "... can be viewed as a way of systematically leveraging or amplifying intuition. But intuition amplified through calculative-rational models, while necessary, is not sufficient for true risk management.".

Welcome to Entropic Decision Optimization
One option to survive the open world is to have in place a theoretical model that anticipates the consequences of such unforeseen events.  'Tempo' suggests that "Informal human mental models can comprehend open worlds because they can contain things that haven’t been understood: a high entropy state." Although Rao rightly suggests that analytical methods for such weakly understood "high entropy" situations are in its infancy, having even a simple and reasonable model helps. For example, in a recently patented pricing optimization method, we attempt to reduce a user-specified measure of 'entropy' (in the form of business disruption) associated with recommendations, which has worked reasonably well within a retail narrative so far. However, in the narrative-rational world of 'Tempo', the laws of thermodynamics dictate that all good things must come to an end regardless of whether we encounter a black swan or not. A simple "Frankenstein design principle" that we discussed a couple of years ago suggests that the design of particularly complex systems should explicitly assume a failure at some point in time. 'Tempo' chooses the example of 'Tetris' (rather than Blackjack/Poker, that analytics folks more commonly use) to illustrate that we can maximally delay the inevitable by chalking up elegant but temporary wins via better entropic decision making. A time-knapsack, if you will.