The Jodi Arias trial and the mathematics of death

Jodi Arias trial

Jodi Arias trial

I do not follow the Jodi Arias case. It strikes me as one of these cases, like Natalee Holloway, that exist only on CNN and whose coverage is often more proportionate to the attractiveness of key players in the trial than to any importance of the facts or issues. Nonetheless, the publicity surrounding such cases can bring interesting features of the criminal justice system to light.  One of these is Arizona’s procedure in death penalty cases whereby, if the first jury hangs, a second jury is convened.  And this got me thinking, how does this procedure affect the probability that the death penalty will be imposed in a given case? Turns out, as shown below, thought of one way, it can increase the probability from 50% to 75%, pretty substantial.  Thought of another way, however, the effect is more moderate, increasing it from 90% to 94%. To see why this is, take a look at the CDF file below.  To do so, you’ll need to install the CDF plug in available here. It will let you see not just the results but the computer code that generated them.

For those who don’t want to install the plugin, however, here’s the key picture.

Jodi Arias graph

Jodi Arias graph: the difference between one bite and two bites

[WolframCDF source=”” CDFwidth=”768″ CDFheight=”2024″ altimage=”file”]

A Picture of Adverse Selection Derived From the Federal Register

Adverse selection in health insurance is the proclivity of insureds who accurately perceive themselves to be of higher than average risk to purchase insurance with greater frequency and, where possible, with higher benefits, than those who accurately perceive themselves to be of lower than average risk. Unchecked adverse selection can greatly restrict the amount of risk that can be transferred through an insurance market and cause a true loss to society. Insurers normally attempt to reduce adverse selection by “underwriting,” i.e. offering different contract terms based upon the insurer’s hopefully unbiased assessment of risk.  Settings in which such underwriting is impracticable or unlawful create a serious impediment to optimal risk transfer.

The Affordable Care Act (a/k/a Obamacare) creates a risk of severe adverse selection by prohibiting medical underwriting in the sale of health insurance.  One of the ways it attempts to palliate the contraction of the market that would otherwise occur is by subsidizing insurers in rough proportion to the riskiness of their insurance pool. Thus, although the high risk insured does not pay the insurer more for insurance than the low risk insured (except in limited ways for age, tobacco use and geographic location), the insurer ends up getting more for enrolling high risk insureds due to transfer payments made under the Risk Adjustment provisions codified in 18 U.S.C. § 18063. To establish this system, the government, among other things had to estimate the true “demographic risk” of individuals.  By demographic risk, one means risk of medical claims independent of “ICD-9 diagnosable” medical conditions that the individual may have. This demographic risk is revealed in part by the age and gender of the insured but also by their selection from amongst four (or five) levels of expected benefits known as “actuarial value.”  Persons purchasing policies with high actuarial value and thus having lower deductible and copay requirements, tend to be riskier than those purchasing policies with low actuarial value and thus having higher deductible and copay requirements.

The government data collected in this effort to implement Risk Adjustment under 18 U.S.C. § 18063 and placed in the Federal Register (78 F.R. 15409, 15422 (March 11, 2013)) gives us a rare opportunity to really see adverse selection in action not just as a matter of theory but as an empirical proposition.  The interactive element below shows this clearly.  It presents a graph showing for each gender and adult age level for which insurance through a private insurer is likely obtained, the relationship between the actuarial value of the plan selected and the risk factor posed. (Do not concern yourself with the units in which risk is measured).  What one can see is that there is a definite correlation for all ages and genders between the actuarial value of the plan selected and the risk factor of the individual. The line turns pink when females are selected for examination, blue when males are selected for examination. If you see a picture but no interactive elements, you need to download the free CDF player available here.
[WolframCDF source=”” CDFwidth=”600″ CDFheight=”400″ altimage=””]

We can also show the relationship in which risk factor appears on the x-axis and the actuarial value of the plan purchased appears on the y-axis.

[WolframCDF source=”” CDFwidth=”600″ CDFheight=”500″ altimage=””]

One of the many interesting features of this visualization is that the data is independent of the insured’s knowledge of disease.  Disease is  dealt with separately by the regulations implementing the Risk Adjustment provisions of the Affordable Care Act. It is also apparently independent of moral hazard — the proclivity of insureds with higher levels of coverage to more frequently incur events covered by the insurance policy. In this context, moral hazard would mean the proclivity of people with, say, platinum policies that have low cost sharing, to visit medical professionals more frequently and provide less resistance to proposed expensive medical procedures than people with, say, bronze policies. That tendency is addressed in the modeling embodied in the Risk Adjustment regulations, but is addressed as a separate “Induced Demand” factor. Thus, not only do we get a well researched estimate of the actual extent of adverse selection, but we get its effects disentangled from those of moral hazard — at least if the government has done it right and I am reading the document correctly.

The picture also gives rise to a question.  The Affordable Care Act permits insurers to price health insurance based on age. So, is provision of transfer payments that includes age in the mix “double counting”?  Why does government need to subsidize that for which insurers already are compensated? Is it an effort to address the fact that the statute constrains the extent to which age counts, limiting the pricing ratio to 3:1 from most expensive age level to least expensive age level?  I don’t know the answer to this question and welcome comments.

Visualizing Hierarchical Condition Codes

Visualizing HCC

The HCC Graph

The Affordable Care Act attempts the ambitious feat of inducing private insurers to sell individual health insurance when medical underwriting is prohibited.  Ordinarily, such a prohibition might give rise to a paralyzing fear of adverse selection and an effort to evade the prohibition. The insurer might, for example, engage in selective advertising or networks that lacked oncologists in an effort to bring healthier individuals to one’s own insurance company and leave the sickly to one’s competitors. The Affordable Care Act attempts to reduce the return on any such subterfuge by a system of transfer payments known as “Risk Adjustment” (42 U.S.C. § 18063). Under Risk Adjustment the net premium the insurer receives on an individual is based on part on the medical risk that individual poses. Adverse selection is not reduced in the typical way of medical classification conducted by the insurer and contract terms such as price being based on the results of the classification. Instead,Risk Adjustment requires that the insurer offer the same contract to all comers but that government in effect conduct the classification and transfer funds to those insurers that happen to take on high risk insureds while transferring funds away from those insurers that happen to take on low risk insureds.

Implementing such a system is an enormously complex matter, as the hundreds of pages of regulations and explanations contained in recent Federal Register entries can attest. See, e.g. 78 Fed. Reg. 15410-15541 (March 11, 2013). From the universe of potential medical conditions, one must create a mapping of projected claims costs. The Department of Health and Human Services (DHHS) has now attempted this mapping through something it calls Hierarchical Condition Codes. The idea is to look at the “ICD9” diagnostic codes typically given patients and map that to a coarser set of Condition Codes that supposedly have roughly similar treatment costs.  But how does one handle the patient with multiple related ICD9 diagnoses?  One could develop a multivariable model that attempts to show a cost factor for every combination of Condition Codes. Such a model would likely be mathematically intractable, however. Instead, the idea is to say that there is a cost hierarchy of Condition Codes and to map certain subsets of Condition Codes into the Condition Code that generates the highest medical costs.  One then attaches some intensity coefficient to each potentially “upcoded” Condition Code. This system, which has apparently been used before in the Medicare program, is known as Hierarchical Condition Codes.

Mathematically, the Department of Health and Human Services has created a graph. The nodes of the graph are the union of the set of ICD9 codes and the set of HHS Condition Codes.  The edges of the graph are the mapping between ICD9 code and HHS Condition Code and the mapping between subsumed HHS Condition Codes and its “basin of attraction”: the Condition Code to which these subsumed codes are remapped.

It turns out that not only has DHHS created a conceptual mathematical object, it has provided the data from which such an object can be visualized. It is contained in an Excel spreadsheet available at I now show how one can use this data to produce a visualizing of the HCC Graph.  To see this, you will need the free CDF player available here. If all you see here is a picture, you don’t have the Player. Also, a warning. This is a large CDF file.  It may take a minute or so for it to load into WordPress, with the precise time depending on your computer and your connection speed. Be patient.

[WolframCDF source=”” CDFwidth=”700″ CDFheight=”8400″ altimage=””]

To be honest, I am not quite sure what this all proves. It confirms, I believe, the enormous complexity of the enterprise of the Affordable Care Act.  To make health insurance purchases less sensitive to the fortunes of health but to preserve in at least name the idea that this is not a government takeover of health insurance, government permits private insurers to sell policies but prohibits the normally necessary step of medical underwriting.  But to prevent insurers from simply abandoning a system in which adverse selection might ordinarily cause a death spiral, government then undertakes its own surrogate classification system and pays insurers whose pool is drawn from the more expensive patients. But doing this requires huge amounts of data collection, a system of recoding, and then a system that computes a transfer payment based on this and much more information.  It remains to be seen whether this system succeeds in keeping private insurers involved in healthcare finance.  In the mean time, however, it does produce what I regard as some attractive pictures.


The bad math in 42 U.S.C. § 18062

For reasons that will likely be discussed on this blog later, I have concerns, as do a growing number of people,  that the Affordable Care Act (a/k/a Obamacare; a/k/a The Patient Protection and Affordable Care Act) is going to going to cost a lot more (net) than was projected and reduce the numbers of uninsureds far less than was projected. Part of that concern stems from my belief that fewer than expected individuals are going to purchase health insurance through the Exchanges. Moreover, those that do purchase insurance through the Exchanges are going to have very high medical expenses. The closest analogy to the Exchanges is the Obamacare-created Preexisting Condition Insurance Plans . As set forth in this report from the government’s Center for Consumer Information and Insurance Oversight, the PCIP has seen enrollment of less than 30% of what was projected but has seen claims more than 250% of what was expected. The $5 billion originally allocated to the program has run out and no new applications are being accepted.  Prices haven’t gone up because the government rather than private insurers set the price in advance.

If my prediction is right and the Exchanges end up suffering from the same consumer behavior as the PCIP — or, more likely, worse — one would ordinarily expect the price of insurance policies offered through the Exchange to increase. Alternatively, insurers may just to stop their voluntary business of writing policies through the Exchanges. That’s the result of “adverse selection.”  Either way, the result is likely to be that the Exchanges are not going to deliver what was promised, which may place pressure for yet greater rates of subsidization for policies purchased through the Exchange, with funding coming from who knows where.

Now, the bill’s proponents very much knew that Exchanges in which the law prohibited traditional medical underwriting could suffer from adverse selection. They knew that insurers might not sell policies within the Exchanges at all out of fear that adverse selection would materialize. One of several ways they addressed this possibility was through the creation of “risk corridors.” According to the government’s website on the program, “Qualified health plans with costs that are at least three percent less than the plans’ costs projections will remit charges for a percentage of those savings to HHS, while qualified health plans with costs at least three percent higher than cost projections will receive payments from HHS to offset a percentage of those losses.” I was going to take a hard look at how this system worked and I might still do so.  But before I could even get to the merits of the program, I found something strange.

Let’s look at what is actually written in the statute.

The relevant text is section 1341 of the Patient Protection and Affordable Care Act, the pertinent part of which is codified at 42 U.S.C. § 18062(b)(1). It reads in pertinent part:

“(1) Payments out

The Secretary shall provide under the program established under subsection (a) that if-

(A) a participating plan’s allowable costs for any plan year are more than 103 percent but not more than 108 percent of the target amount, the Secretary shall pay to the plan an amount equal to 50 percent of the target amount in excess of 103 percent of the target amount; and […]”

This can not possibly be right.  The phrase “50 percent of the target amount in excess of 103 percent of the target amount” makes no sense.  What they meant, I am quite confident, was “50 percent of the allowable costs in excess of 103 percent of the target amount.”

How do I know?  First, the italicized phrase makes no mathematical sense.  The “target amount” is a computed number. It’s defined in 42 U.S.C. § 18062(c)(1)(A) as “The amount of allowable costs of a plan for any year is an amount equal to the total costs (other than administrative costs) of the plan in providing benefits covered by the plan.”  “The target amount in excess of 103 percent of the target amount” is like saying “that part of $3 that is in excess of 103% of $3.”  That number is always zero.  Presumably Congress knows how to say zero when it wants to and it would hardly go to the trouble of drafting a statute if it was designed so that it never did anything.

Second,  “target amounts in excess of the target amount” is not what gets said in the next parallel subparagraph.  Here’s how it reads:

“(B) a participating plan’s allowable costs for any plan year are more than 108 percent of the target amount, the Secretary shall pay to the plan an amount equal to the sum of 2.5 percent of the target amount plus 80 percent of allowable costs in excess of 108 percent of the target amount.”

This at least makes mathematical sense.  And similar sensible language appears in the next subparagraph (B) when they speak about what happens if your allowable costs are less than the target amount.

Third, the bill as written will not accomplish the apparent purpose of transferring funds from insurers that happen to do well to those that do not. Read, for example, the regulations that implement 42 U.S.C. § 18062. They say:

For a QHP with allowable costs in excess of 103 percent but not more than 108 percent of the target amount, HHS will pay the QHP issuer 50 percent of the amount in excess of 103 percent of the target amount.

77 F.R. 17238

Or read regulation § 153.150 (emphasis added):

§ 153.510 Risk corridors establishment and payment methodology. …

(b) HHS payments to health insurance issuers. QHP issuers will receive payment from HHS in the following amounts, under the following
(1) When a QHP’s allowable costs for any benefit year are more than 103 percent but not more than 108 percent of the target amount, HHS will pay the QHP issuer an amount equal to 50 percent of the allowable costs in excess of 103 percent of the target amount; …

It’s interesting that, so far as I can see, no one has hitherto spotted or commented upon the typo.  Our brains have evidently compensated for the mathematical drivel contained in the law and attempted to make sense out of it.  I wonder whether Congress will fix the statute and render it formally correct before issues with the content of the statute become apparent.

Fishing in Colorado for Poisson Parameters

Here’s a math problem.  Colorado State University’s Tropical Meteorology department does extensive research. It tells you that the probability of one or more named storms striking a particular Texas county during the 2013 hurricane season is x, where x is some value between 0 and 1.  They also tell you deep in their document that they are assuming that the distribution of named storm strikes tends to follow a “Poisson distribution.”  That’s a common assumption. What’s the probability of n strikes hitting that same Texas county during the 2013 hurricane season (where n is an arbitrary non-negative integer)?  This might be an interesting problem if you were trying to assess an insurance regulatory scheme, It could help you see whether that scheme provided adequate protection against multiple strike seasons.

Here’s some Mathematica code that solves this problem. First we fish — get it? — for the actual member of the Poisson family from which the relevant distribution is drawn.  We then refine our answer to take account of the fact that x must be less than 1. And then we wrap a PoissonDistribution function around our answer.

With[{soln =
Solve[SurvivalFunction[PoissonDistribution[k], 0] == x, k, Reals]},
PoissonDistribution[k /. First[Refine[soln, x < 1]]]]

From this, we learn that the associated Poisson Distribution has a parameter of -Log[1-x]. We can now compute the probability of n strikes as being …

The probability of n-strikes if the probability of at least 1 strike is x.

The probability of n-strikes if the probability of at least 1 strike is x.





And if you go over to my other blog, you can see this technique in action.

And here, by the way, is a non-math problem.  Why is a university about as far from being hit by a hurricane as an American university can be, a leading researcher in tropical cyclone risk?  Mathematica doesn’t provide an answer to that one.



The math of President Obama’s budget proposal to limit IRAs

President Obama's 2014 proposed budget

President Obama’s 2014 proposed budget

Today we started our discussion of finance in my Analytic Methods for Lawyers class. I decided to be very ambitious. I took an item out of the week’s news and tried to show what light could be shed on it using analytic tools.  In particular, I took President Obama’s proposal to limit IRAs. Here’s what he wrote:

“The Budget would limit an individual’ s total  balance across tax – preferred accounts to an amount sufficient to finance an annuity of not more than $205, 000 per year in retirement, or about $3 million for someone retiring in 2013. This proposal would raise $9 billion over 10 years.”

Here’s an interactive exploration of this proposal about individual retirement accounts. Notice, by the way, how this analysis of the IRA relies on a few Mathematica tools. It relies on the TimeValue function along with Annuity and Annuity Due. It also makes heavy use of statistical distributions and transformed statistical distributions.  I’m rather proud that after just a semester, my students were able to follow the discussion. (Or at least said they were too polite to say they didn’t).

And, if you are too intimidated to read on, but just want to get to the bottom line, here’s what I would say. First, you shouldn’t be intimidated. If you can’t follow the code, just look at the text and play with the interactive tools. You’ll still get a lot out of it. Second, here’s what I conclude in the end.

  • Saying one will not butt up against the President’ s limit until one has $3 million seems a bit unrealistic. Figures of $2 to $2 .5 million are likely more realistic (assuming the IRS mortality tables are valid).
  • Even at $2 million, it’ s not so easy for the average person to get $2 million in a conventional IRA given current limits on contributions.

[WolframCDF source=”” CDFwidth=”810″ CDFheight=”6000″ altimage=”file”]


Iterated games

I’ve been teaching game theory as part of my Analytic Methods for Lawyers class.  Yesterday, we finished up the problem set early in the class (as I’d kind of expected), so I decided to be bold and ask the class to consider iterated games.  I’d done some work on it a few years back and produced a Demonstration. But I’d done so before Mathematica had added better support for graphs and discrete Markov processes.  I wondered whether that additional functionality might simplify some of the exposition and analysis.  Turns out, as shown below, it does.

If you want to skip to the bottom line, here’s what I found:

  1. It is fairly easy to visualize and understand simle iterated games with Mathematica. The new Graph functionality and support for discrete Markov processes makes the matter somewhat easier.
  2. There are lots of weak Nash equilibria to simple iterated games. And many let one escape a prisoners dilemma. That’s very important because an awful lot of legal situations have an iterated prisoners dilemma as a sensible metaphor.
  3. Game theory starts out simple. Understanding the idea of a strategic form game is not that hard. Likewise, it isn’ t too bad understanding the concept of a Nash equilibrium (once John Nash helped find it in the first place). But the peculiar thing about game theory is how incredibly difficult it can get once one interjects just a tiny bit of complexity. This blog entry begins, I think, to explore that transition from simplicity to complexity.

[WolframCDF source=”” CDFwidth=”802″ CDFheight=”7400″ altimage=””]


Note: On April 11th, minor changes were made to the CDF file that had prevented the Manipulate from working properly and that corrected a typo.

Exploring the effective marginal tax created by the Affordable Care Act

The Patient Protection and Affordable Care Act uses a refundable tax credit to subsidize purchase of health insurance through an Exchange by individuals with household incomes between 100 and 400% of the federal poverty level. 26 U.S.C. § 36B. It likewise requires insurers offering health insurance through an Exchange to offer purchasers with household incomes between 100 and 250% of FPL a contract providing heightened “actuarial value” for the price of a “silver policy.”  42 U.S.C. § 18071 (“reduced cost-sharing”).

The interactive graphic available via CDF here provides a framework for study of the effect of these provisions on the effective marginal tax rates of low- and middle income individuals. It shows that the Affordable Care Act typically adds 20-30% to these effective marginal tax rates. Because of discontinuities in the subsidization structure that occur as the taxpayer crosses various multiples of the federal poverty level, however, the effective marginal tax rate will sometimes go from 50% up to well over 100%, particular for those with incomes about 3.5 federal poverty level ($40,000 single individual; $82,000 family of 4). The estimates made here are even higher than those recently computed by the Congressional Budget Office since that organization de-emphasized issues created by discontinuities.  When combined with other federal income-based subsidies for those of low to moderate income such as SNAP (food stamps), the earned income tax credit, housing assistance, and, now the Pay As You Earn student loan program, the Affordable Care Act creates considerable disincentives to earn taxable income.

How did this come about? Harvard Law School has asked me to speak briefly on a topic related to health law at my upcoming 30th reunion. So, I thought I would update an article I did a few years back that attempted to project the tax implications of various subsidies provided by the Affordable Care Act designed to induce the purchase of health insurance.  A lot has happened since 2010 when the work on the article was done. We have a lot better idea about how the premium subsidies and the cost-sharing reductions are going to work.  We have somewhat better estimates of what premiums for the basic “metal tiers” are going to be.  And I’ve been joined by a few other academics and the Congressional Budget Office in thinking this topic is important.  These other sources, by the way, mostly confirm what I found back in 2010.

And why should you care?  You may like the Affordable Care Act or, more likely, some of the impulses behind the Affordable Care Act. But regardless of one’s political stance, one should not be blind to the significant problems that law creates. Particularly when you couple the effect of the Affordable Care Act with other federal programs intended to assist the poor, the effective marginal tax rates on the poor can become extremely high.  When you add in state and local programs, the rates get even higher. This is troubling because it creates a situation in which dependency is rational and in which government induces atrophy of the the sort of self-reliance that may become important when federal funds dry up.

Anyway, here’s the CDF.
[WolframCDF source=”” CDFwidth=”601″ CDFheight=”5000″ altimage=””]

The idea behind this blog

Greetings.  I’m Seth Chandler, a law professor at the University of Houston Law Center.  I also head our school’s small program on Law and Computation. I do a lot of work in Mathematica.  Much of it has to do with the analysis of legal rules. Some of  these efforts would, I believe, be useful to other people.  In the past, I’ve tried to convert a fair amount of my work to a Demonstration. This has been great, and the Wolfram Research team has been very helpful, but not all of my work readily fits into the constraints of that site.  So, I thought I would start a blog as a way of presenting a greater amount of material. You’ll need to download the free CDF plugin to your browser to make the most out of this website.  That will let you access a lot of interactive Mathematica notebooks even if you don’t own Mathematica. As with a lot of blogs, I’m not quite sure where this will all go, but, nothing ventured, nothing gained. Please feel encouraged to provide feedback and support.