Showing posts with label Signal and Noise. Show all posts
Showing posts with label Signal and Noise. Show all posts

Thursday, September 26, 2013

Chaotic Systems

Corrections has yet to meet anyone who is good at forecasting much of anything.  Why might this be?  One reason is bad statistical models.  Another reason (that we are not overly sympathetic towards!) might be chaotic systems.  The present may perfectly and completely determine the future, but the near present may not have any power at predicting the future.

One simple example of this is the sequence x(t+1)=4x(t)*(1-x(t)).  The sequence will bounce around for a while between 0 and 1 (given we avoid a few bad starting states like {0, 0.25, 0.5, 0.75, 1}) and be completely deterministic.  Surely it wouldn't be hard to forecast, right?  

Wrong.  If your starting point (initial information used for forecasting) deviates the slightest amount, your sequence soon becomes completely different than if you had used the true starting point.  Below, Corrections depicts two such starting values:  X(0)=0.1 and X(0)=0.24, and plot the series for 100 periods (click to enlarge).
What if we were really, really, really close?  If we start out with a percent error of merely 0.0001%, then shouldn't our forecasts match up?  They do, for a while, but diverge rather quickly for having a one-part-in-ten-million difference (click to enlarge).
Does one series provide any forecast of the other, or have a recognizable pattern?  Below, Corrections depicts the two series against one another after the 20th period:  they no longer have a discernible relationship (click to enlarge).
This is one possible reason why the vast majority of sophisticated forecasts Corrections has heard (that don't suffer from selection) have been wrong.   We don't put much stock in it, however.

Monday, December 17, 2012

Measurement without Theory on the Empire State Manufacturing Survey

Corrections examines today's Empire State Manufacturing Survey:  the release contains 88 variables:, current and future estimates of New York manufacturers for: business conditions, orders, future shipments, delivery time, inventories, unfulfilled orders, prices paid, prices received  number of employees, and average employee workweek, along with future capital expenditures and future technology spending.

Corrections takes each series, normalizes it, HP filters it, multiplies it by -1 if it correlates negatively with the average of all series together (so variables that are high when conditions are bad flip sign), and finally sorts the series vertically based on the value in July 2009.  We then graph the series in a heat map:  red when the normalized, filtered, and signed variable is "high" and blue when it is "cold."

The result is blind economics (click to enlarge), without theory, seeing if these variables are telling us anything related to one another, suggesting they're measuring something.

Monday, September 20, 2010

The Recession Officially Ends

Newsweek Magazine/The Street article "The Recession Officially Ends" (September 20th, 2010) struggles with even marginally objective journalism. Throughout an article discussing the decision by the National Bureau of Economic Research (NBER) that the recession had ended in June 2009, it can't help itself but snipe, repeatedly. Newsweek, doing its best to imitate Pravda, would doubtless desire the reformation of the Tsentralniy Komitet Kommunistitcheskoi Partii Sovetskogo Soyuza, the Soviet Central Committee, to make centralized decisions concerning recessions.
The recession isn't just over, it actually ended in June 2009, according to a statement made Monday by the elite, ivory tower cadre of U.S. economists known as the National Bureau of Economic Research (NBER).

[...]

In its typically obtuse economist language, NBER noted in calling a June 2009 end to the recession that in "determining that a trough occurred in June 2009, the committee did not conclude that economic conditions since that month have been favorable or that the economy has returned to operating at normal capacity. Rather, the committee determined only that the recession ended and a recovery began in that month."

[...]

To support their claim that the recession ended over a year ago, while for many Americans there has been little indication of a recession lessening, NBER notes 'economic activity is typically below normal in the early stages of an expansion, and it sometimes remains so well into the expansion.'
The problems associated with assigning recessions in real time are manifold. With noisy information that changes over time, changing relationships between economic variables, different predictions from different variables, and multiple variables of interest, it is a task that's easy to criticize when an institution hates economics, like Newsweek. However, Newsweek's criticism is not well-placed.

The NBER's approach is to avoid denoting recessions until they have a relatively large amount of data. For example, The NBER's Business Cycle Dating Committee waited 28 months to declare the end of the 2001-2003 recession. In this case, it agrees with a "real-time" approach James Hamilton developed using Stock and Watson's historical work. An example of Hamilton's work that this article has been influenced by was "Calling Recessions in Real Time" (Working Paper, 2010).

Hamilton runs a regime-switching Kalman Filter, a general tool discussed elsewhere by Corrections in "How to Lose an Election Without Really Trying" and "Census as a Celebration". Starting with the data, we can observe his assigned probability of whether the United States is in a "recession" state or not, along with the current Bureau of Economic Analysis issue of the GDP growth rate (click to enlarge):
Hamilton's approach generates results very similar to the NBER's based solely on GDP, not NBER's recession dates. We can see this by depicting Hamilton's probabilities of recessions, and coloring in both his recessions in red and NBER's in blue (click to enlarge).  Near-complete overlap with red can be seen on most blue bars.
We can see Hamilton's methods find this recession only lasting one more quarter than the NBER's Business Cycle Committee's. The calling of recessions is not a falsifiable endeavor, though updates are possible if the call is made in real time.  Nevertheless, when the NBER and James Hamilton, (who literally wrote the book on time series analysis) are susceptible to the same criticism by Newsweek, it is vastly more likely that Newsweek's understanding of the world is flawed, not theirs.

Thursday, September 16, 2010

F.D.A. Panel Urges Denial of Diet Drug

New York Times article "F.D.A. Panel Urges Denial of Diet Drug" (September 16th, 2010) discusses the FDA's rejection of a new diet pill and their standards without addressing the improper incentives that lead the FDA to cause the excess deaths of thousands of people a year, and cause excess pain to hundreds of thousands.
The advisers to the Food and Drug Administration voted 9 to 5 that the potential benefits of the drug, called lorcaserin and developed by Arena Pharmaceuticals, did not outweigh the risks.
Let's imagine, for simplicity, that there are two kinds of medical drugs. Drugs that save lives, and drugs that kill people.  When pharmaceutical companies test drugs, they gain a signal with error about whether or not that drug is a good drug or a bad drug. The U.S. Food and Drug Administration will then choose the cutoff. If we assume that error to be normally distributed (this is an innocuous assumption: the difference between the sample average and the true signal converges to a normal distribution by Lindeberg-Levy Central Limit Theorem).

The FDA must choose some threshold for a signal, below which they reject all drugs, and above which they accept.  They save lives by rejecting bad drugs and accepting good ones.  The FDA kills by rejecting good drugs or accepting bad bad drugs.    (Corrections is willing to discuss our precise "moral" phrasing, which we posit as accurate).

The FDA can't tell the difference between good drugs and bad drugs beyond the signal they receive. The point, therefore, is what the proper cutoff should be. Whether or not the FDA should be "very cautious" and kill by denial of more good drugs than prevention of bad, or "loose" and kill by allowing more bad drugs than good drugs. The optimal "life saving" diagram is depicted graphically below (click to enlarge).
Officials at the FDA are not in the business of saving lives, however. If a bad drug gets through their screens and kills, they lose their jobs. If a good drug never gets through, no one is ever penalized, as the consequences are not graphic. Below, we depict the FDA's scheme due to improper incentives (click to enlarge):
As we can see, because the FDA is risk-averse because of its suboptimal incentive scheme, it ends up, at the margin, killing many more individuals through its denial of live-saving drugs than it saves because of the marginal life saved by limiting a dangerous drug.

Individuals often state that among the first things the government should be doing after protection from coercion internationally through the military and internally through the justice system is setting up systems like the FDA.  What is not noted is that the FDA, because of poor incentives, kills many more individuals by withholding drugs than the private market would.  

A private system would be optimally incentivized because of the long-term, monopolistically competitive nature of its brand.  For those that think this wouldn't be a viable private enterprise, consider the 14 Californian kosher-certification services, or dozens of national certification services.  These companies have been successfully serving tiny portions of the United States population for decades.  Further, these companies have reason to avoid regulatory capture (unlike the FDA) because they are competing with other companies for consumer's trust (the FDA does not have competition).  

If anything, the FDA isn't among the first things government-loving individuals should push for--instead, an altruistic government-loving individual should abolish the FDA to save lives.  Any individual with a smidgeon of appreciation for the private market should be chomping at the bit to abolish the FDA and save lives, ease the pain of those denied efficient drugs, save the money of the poor who are denied price-reducing competition, and help improve the lives of individuals who might be benefitted by diet drugs endorsed by almost everyone but an intensely risk-averse FDA.  

3-D girl a reminder for B.C. drivers in school zone

Toronto Star article "3-D girl a reminder for B.C. drivers in school zone" (September 9th, 2010) describes the decision of Vancouver officials to put an optical illusion of a girl playing in the road to slow drivers down. Corrections thinks this is a mistake.
The visual image of the girl is believed to be the first time a child is being used to drive home the message of the dangers in excessive speeding. In 2008, the city of Philadelphia began using virtual images of fake speed humps of white, blue and orange triangles to get drivers there to slow down.

Vancouver officials are "crying wolf." The lesson to be learned from hyperinflation or the story of the boy who cried wolf is rational expectations. Individuals are not fooled over the long run. Drivers get a signal of a child playing in the road. They then make a decision on whether or not to slow down, and if so by how much. Normally, the stronger the signal the more a driver would break. By "muddying" the signal by making it unclear whether or not it is a trick or a real child, drivers are rationally less likely to slow down. This, in turn, is likely to be a mistake.

Depicted graphically below is the ordinary relationship between signals of kids playing (balls in the street, summer days, hockey nets in garage ways) and the likelihood that kids are actually playing--that they are going to rapidly dart out into the street from behind a car, or are in the street playing already (click to enlarge).

Vancouver's optical illusions change that relationship by making strong signals mean less (click to enlarge).

Consequently, drivers break less when their signal means less--when the cry of "wolf" is less likely to yield a wolf (click to enlarge). The blue line indicates the original regime, the red line indicates the new regime, and the mixed line is the two lines overlapping.


Corrections notes that this is our own application of the "Lucas Critique" to almost all "behavioralist" policy advisements. Too often policy is suggested by small-scale experiments, when macro conditions change, given the adoption of certain policies. While experimentation yields valuable results, its generalizability outside the localized field (in which the policy it is testing has not been adopted) should always be in question.

Wednesday, August 25, 2010

Case of soup-kitchen thief fuels critics of three-strikes laws

Christian-Science Monitor article "Case of soup-kitchen thief fuels critics of three-strikes laws" (August 19th, 2010) discusses California's three-strikes law, a law that requires an individual be sentenced to life imprisonment after being convicted of three felonies. It leaves relatively undiscussed the statistical reasons for such a law.

Los Angeles Superior Court Judge Peter Espinoza said Taylor’s sentence was one of many third-conviction cases that brought “disproportionate” sentences and “resulted in, if not unintended, then at least unanticipated, consequences.”

[...]

But stories like Taylor’s are useful in illustrating the problems behind the law's implementation, says Ms. Levinson. The challenge for critics will be trying to prove that society does not benefit from decades-long or even life sentences for nonviolent – or at least not serious – crimes.

Corrections suggests that it may make sense to permanently incarcerate individuals who have been convicted of only minor crimes previously, because the likelihood that they have committed unobserved and serious crimes is high. It's worth noting that, truncating the distribution of claims at the 90th percentile, burglars appear to commit about 38.1 burglaries per year (Visher 1986, reported by NSW Bureau of Crime Statistics and Research). The Senate Congressional record from 2004 indicates that rapists commit between 8 and 10 rapes on average, before being caught (Congressional Record, page 22999). Car Thieves in England appear to steal 45 cars before they're 18, and 94 when they're older (Car Theft: The Offender's Perspective, Light, Nee and Ingham, 1993, page 11). Between 545 and 707 metric tons of cocaine was shipped toward the United States in 2007. Two-hundred and fifty-nine metric tons were caught by U.S. authorities, either internally, at arrival zones, or in transit. Given the discrepancy, Corrections conjectures that distributors of cocaine go through hundreds, or thousands of transactions without being caught.

Perhaps some of these statistics are individually not dependable, but their consistency and magnitude serve as more general suggestive evidence. Given someone has been convicted of one crime, the likelihood that they have committed an order of magnitude more without having been caught appears rather large. The idea that crimes someone is convicted for are simply a signal for the crimes they have committed is the impetus for the point Corrections makes here.

Let us imagine, before we have caught and convicted an individual, that we have some probability distribution that we believe they are sampled from, some likelihood that they are a career criminal, irredeemable recidivists. This is our "prior probability," a distribution between zero and one, that someone will be a recidivist, displayed graphically below (the image is rather small, click to enlarge).

Someone's criminal act or acts provide a data distribution that the person will be a recidivist. One example of this might be their being caught and convicted of breaking into a building. Our hypothetical probability distribution we might place that someone has committed a major crime given they have been caught committing a serious crime like breaking an entering is displayed graphically below


We have distribution of the data on the probability of another criminal act, displayed graphically below (click to enlarge).



We can combine our data on our parameters of interest with our prior beliefs about the parameters, in this case the likelihood that someone will commit another criminal act (click to enlarge)



We can summarize bayesian update by displaying our prior, data, and posterior in one graph, displayed graphically below (click to enlarge). For those interested, in this case we took data to be drawn from a binomial distribution, and assumed its conjugate prior distribution, a beta distribution (therefore making the prior distribution is a beta distribution--of course, our assumptions are without loss of generality, merely for mathematical convenience).



To summarize the point Corrections is making: given that someone has committed and for two felonies previously and has been convicted of a third felony, the likelihood that they have committed dozens, or hundreds of felonies and crimes is high. Convicting and imprisoning these career criminals for life, for their three observed, and dozens of unobserved felonies and crimes, may simply be the optimal response of a justice system that is sentencing people for their likely crimes (the likely crime they were convicted, and the likely crimes they were not caught for).

For those concerned that we are convicting individuals for crimes they have only likely committed, we remind them that this is precisely what the judicial system does currently. The question is how to decide the threshold for punishment.

Corrections finally notes that it is possible punishments already take this into account--that is, the penalty for marijuana distribution, in locations (excepting those with marijuana legalization or decriminalization) are deliberately punishing crimes for which one has not yet been caught. Our discussion took place under the assumption that punishments reflect only the crime for which one was convicted.

Monday, August 9, 2010

How to Lose an Election Without Really Trying

New York Times opinion "How to Lose an Election Without Really Trying" (August 7th, 2010) discusses political "amnesia", a concept that sounds particularly non-economical. Corrections suggests an alternative model.
Betting on amnesia is almost always a winning, not a losing, wager in America. Angry demonstrators at health care town-hall meetings didn’t remember that Medicare is a government program, and fewer and fewer voters of both parties recall that the widely loathed TARP was a Bush administration creation supported by the G.O.P. Congressional leadership.
There may be a real reason for political "amnesia." We might take a "regime switching" model as an explanation. The republican party can take on two values. One in which most Republicans want to reduce government intervention, and one in which they do not.  Individuals do not know what state or "regime" Republicans are in, but have signals.  (regular readers will see the familiarity between this Regime Switching model and our earlier article introducing the Kalman Filter).

In any case, we can generate a random variable in which Republicans are in a "regime."  They have a 95% chance of staying in whatever regime they are currently in next period, and a 5% chance of switching regimes.  In our case, we have a signal with noise which broadly tracks the true regime (because of the noise, we can get "false" signals).  In this case, we observe the following signal.  As the blue line is close to one, we see high legislative activity and Republicans are likely to be in a pro-government mood, though they may or may not be.  Using the blue line, our probabilities, and a standard regime switching model, as James Hamilton outlines here (gated) and here (ungated), we can make a "best guess" of what our regime is.  Graphically below, we display our signal in blue and our "best guess" as a red dotted line.  The red line is the "probability"we assign to each state (click to enlarge).


A measure of our success is the following graphical display, in which we again graph the probability that we assign to each state, while also graphing the "truth" (something we wouldn't ordinarily observe) (click to enlarge).  We call this a 'Hamiltonian' Regime Switch simply because we're following Hamilton's outline, not in relation to the mathematical concept.  Note that times when our guess (red dotted line) spikes and our regime (solid blue) doesn't change  were noise that lead us to believe regimes switched when they did not.  Also note that we are (asymptotically) efficient with our estimator--linear weightings cannot do better, ex ante.



This modeling situation appears to be more appropriate than suggesting "amnesia."  We can extend this situation in the case of having no signal as well.  In the case of having no data and predicting what regime or state we are in, or the case of forecasting what state we will be in at some future period, probabilities will slowly converge to our unconditional probabilities--a 50/50 probability of being in Regime 1 or Regime 2.

This seems to be an adequate story for voter "amnesia."  Voters observe strong signals of the regime Republicans are in when they have legislative power.  This may be the Medicare Prescription Drug Improvement and Modernization Act of 2003, for instance.  In such a case, voters understand with a clear signal "where" Republicans are.  When they are out of power for a time, or with a noisy signal, they may be less sure than they were two years ago--they recognize the regime can switch.

Corrections suggests that this sort of model is more satisfactory and economical than a model positing "amnesia" in voters.