<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>power-laws on S Anand</title>
    <link>https://www.s-anand.net/blog/tag/power-laws/</link>
    <description>Recent content in power-laws on S Anand</description>
    <generator>Hugo -- 0.156.0</generator>
    <language>en-us</language>
    <lastBuildDate>Sun, 01 Dec 2019 14:27:00 +0000</lastBuildDate>
    <atom:link href="https://www.s-anand.net/blog/tag/power-laws/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Normalising non-normal distributions is bad</title>
      <link>https://www.s-anand.net/blog/normalising-non-normal-distributions-is-bad/</link>
      <pubDate>Wed, 19 Jul 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/normalising-non-normal-distributions-is-bad/</guid>
      <description>&lt;p&gt;I was working with the treasury of a bank. They were trying to estimate how much money could flow out of their savings account in a day, worst case.&lt;/p&gt;
&lt;p&gt;I took their total savings account balance at the end of each day and found the standard deviation. I took thrice the standard deviation, and said, &amp;ldquo;You can be 99.7% sure that your daily loss won&amp;rsquo;t be more than 1.5% of the balance.&amp;rdquo;&lt;/p&gt;
&lt;p&gt;That would be right if it were a normal distribution. But it&amp;rsquo;s not.&lt;/p&gt;
&lt;p&gt;Banks have millions of savings accounts, each of which is like a random variable. But unless they&amp;rsquo;re independent, and they have finite standard deviations, the central limit theorem won&amp;rsquo;t work.&lt;/p&gt;
&lt;p&gt;Firstly, &lt;strong&gt;savings account transactions are not independent&lt;/strong&gt;. If there&amp;rsquo;s a run on the bank, they&amp;rsquo;d all pull out their money. Whenever a company declares dividend, a large number of savings account are credited. Salary accounts are credited at the end of the month. As a rule of thumb, you could say that if one savings account goes up, the others are likely to as well.&lt;/p&gt;
&lt;p&gt;Secondly, &lt;strong&gt;savings account transactions are not normally distributed&lt;/strong&gt;. If you take a single savings account, you won&amp;rsquo;t find a bunch of debits and credits. Every month, you&amp;rsquo;ll find one large credit for the salary, one mid-sized debit for monthly expenses, and several small debits for individual transactions (bills, ATM, etc.) Once in several years, you&amp;rsquo;ll find a gigantic debit (purchase of car or house, wedding, etc.) or a gigantic credit (retirement / pension fund, sale of property, etc.)&lt;/p&gt;
&lt;p&gt;As a result, the &lt;strong&gt;savings account is likely to fluctuate a LOT more than if it were a normal distribution&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;If I had just looked at the data, I&amp;rsquo;d have found several occurrences of fluctuations greater than 1.5%. The normal distribution predicts that there should be fewer than 0.3% of such cases. That&amp;rsquo;s about 1 per year. I&amp;rsquo;d have visually been able to spot nearly one a month. I&amp;rsquo;d also have been able to spot the huge 4% swings that do happen once in a few years.&lt;/p&gt;
&lt;p&gt;People wiser than me have made the same mistake. I was interning at Lehman Brothers when they were planning to launch a new electronic bond-trading product. My task was to trace the bond price movement.&lt;/p&gt;
&lt;p&gt;The data we had was bad. Many bonds jumped as much as 40% in a single day, due to data errors. The bulk of my task was to clean out these errors.&lt;/p&gt;
&lt;p&gt;After cleaning up, there was still two jumps that couldn&amp;rsquo;t be explained. I went to my boss, who recognised them at sight. One was a sudden drop in price of all Government bonds in December 1998. The other was a 32% drop in price of Hikari Tsushin &amp;ndash; a mobile phone retailer &amp;ndash; on the day they went bankrupt.&lt;/p&gt;
&lt;p&gt;We concluded that the daily price drop wouldn&amp;rsquo;t be more than 9%, to a 95% confidence level. If that was right, a 32% drop in one day would happen once in a &lt;strong&gt;million years&lt;/strong&gt;. Yet, we had Hikari Tsushin just the previous year.&lt;/p&gt;
&lt;p&gt;We didn&amp;rsquo;t bother about it. In fact, we didn&amp;rsquo;t even think about it. If we&amp;rsquo;d checked, we&amp;rsquo;d have found that the daily price drop was closer to 12% or something, to a 95% confidence level.&lt;/p&gt;
&lt;p&gt;Summary: &lt;strong&gt;Force-fit a normal distribution on non-normal data can understate the worst-case scenario&lt;/strong&gt;. Often you&amp;rsquo;re better off just inferring confidence levels from the raw data than from a fitted distribution.&lt;/p&gt;
&lt;p&gt;Sourced statistic from: &lt;a href=&#34;https://www.forex.academy&#34;&gt;www.forex.academy&lt;/a&gt;&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Sriram&lt;/strong&gt; &lt;em&gt;24 Jul 2006 7:53 am&lt;/em&gt;:
what you are talking about are outliers which would be there in even the most normal of the normal distributions. One always has to take them out. This is not an &amp;ldquo;un-normal&amp;rdquo; phenomenon.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;S Anand&lt;/strong&gt; &lt;em&gt;24 Jul 2006 11:20 am&lt;/em&gt;:
No, I&amp;rsquo;m not. The normal distribution asserts that the probability distribution falls of exponentially. These transactions are power-law distributed. The distribution falls off as a power law. Specifically, this means that the normal distribution has a finite standard deviation. Power law distributions have an infinite standard deviation. You can check this from the wikipedia articles on power law distributions.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;RaviM&lt;/strong&gt; &lt;em&gt;3 Aug 2006 7:09 am&lt;/em&gt;:
When I was doing Risk Management for a mutual fund, we were facing the same problems. So we used to take two approaches to calculate VaR for various products- Assuming Normal distribution of stock price changes(the problem here is that you are not sure what is the current Std dev of any Stock&amp;hellip; which can change drastically on a single day in case of events. I still remember Mastek which dropped 50% on a single day). We also used to take historical data to figure out what are the past occurances when such events has happened. but here the disadvantage is that we assume that stock price movements are historically dependent, which is also not correct&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Naresh&lt;/strong&gt; &lt;em&gt;21 Sep 2010 8:45 pm&lt;/em&gt;:
Complex problems have simple, easy to understand wrong answers.
The world does not run on a normal distribution. If we could predict the future behaviour (even heavily populated datasets) using a normal distribution, the world would be a different place, wouldn&amp;rsquo;t it?
The answer to this problem is to use a time weighted average of data with the latest data having the highest weight, or using the exponentially weighted moving average formula developed by Riskmetrics. Use a lambda of .94 for daily observations. You can alternatively use an empirical lambda. Use it to predict earthquakes (?), junior miners, venture investments, come what may. And then you will find that too is inadequate as a risk tool.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://analyticstraining.com/2013/the-curse-of-the-bell-curve-part-2/&#34;&gt;The Curse of the Bell Curve – Part 2 | Jigsaw Academy | Training for careers in Analytics&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;16 Jan 2013 8:55 am&lt;/em&gt; &lt;em&gt;(pingback)&lt;/em&gt;:
[&amp;hellip;] in Checking/Saving account – This is an interesting article written by a friend during his consulting days. He illustrates how we tend to blindly apply the [&amp;hellip;]&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>Not all distributions are normal</title>
      <link>https://www.s-anand.net/blog/not-all-distributions-are-normal/</link>
      <pubDate>Wed, 19 Jul 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/not-all-distributions-are-normal/</guid>
      <description>&lt;p&gt;14 years ago, I was introduced to the process of normalising grades. Professors &amp;ldquo;fit&amp;rdquo; students&amp;rsquo; marks into a &lt;a href=&#34;http://en.wikipedia.org/wiki/Normal_distribution&#34;&gt;normal distribution&lt;/a&gt; and assign grades based on that. (I still don&amp;rsquo;t know how they do it).&lt;/p&gt;
&lt;p&gt;Since then, I&amp;rsquo;ve encountered normalising a lot. My performance at work is normalised. I normalise my song ratings and movie ratings. I&amp;rsquo;ve normalised all kinds of things at work: lead-time of delivery of fans, movements in savings account balances, calls to a call centre, demand for a resource&amp;hellip; you name it.&lt;/p&gt;
&lt;p&gt;(What I mean by normalising is, I find the mean and standard deviation, and assume that it&amp;rsquo;s a normal distribution with that mean and standard deviation. For things under my control, like movie ratings, I revise the ratings to fit a normal distribution.)&lt;/p&gt;
&lt;p&gt;In fact, I normalise everything I encounter by default.&lt;/p&gt;
&lt;p&gt;A few years ago, I started feeling uncomfortable about this. I&amp;rsquo;ve now figured out why &lt;strong&gt;normalising is bad &amp;ndash; at least when done blindly like I do&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;First, let&amp;rsquo;s explore why normalising is good. &lt;strong&gt;Normalising eliminates biases.&lt;/strong&gt; If the Prof in Section A grades higher than the Prof in Section B, normalising takes care of it. If a Prof is extremist (more A&amp;rsquo;s as well as F&amp;rsquo;s), normalising takes care of it. If a Prof is skewed (lots below average, few extremely high above average), normalising takes care of it.&lt;/p&gt;
&lt;p&gt;Eliminating biases makes sense if Section A is fundamentally like Section B. It&amp;rsquo;s not better, nor more extremist, nor more skewed. If the sections are large enough and picked randomly, this assumption is correct. If Section A represents the smarter half, or people born in the second half of the year, or people from the Western states, or any other non-random selection, this need not be correct.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;An aside: You may wonder why people born in the second half of the year is non-random. If school admissions start in September, and admissions start when you&amp;rsquo;re 3 years old, kids born in September will be nearly 4 years old when they join. Kids born in August will be between just over 3 years. That one-year difference, to a three-year old, is HUGE. For example, you will find a &lt;a href=&#34;http://www.11v11.co.uk/news/archives/152-Birth-Date-Bias-in-Football-An-AFS-Special-Survey.html&#34;&gt;birth date bias in football&lt;/a&gt;, with most premiership players being born in the months of September - November.&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Normalising goes a step further than eliminating bias, however. &lt;strong&gt;Normalising forces a &lt;strong&gt;normal&lt;/strong&gt; distribution&lt;/strong&gt;. This would be right if the underlying data is normally distributed. But if not, we may be making a mistake by force-fitting.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.statisticalengineering.com/central_limit_theorem.htm&#34;&gt;Central Limit Theorem&lt;/a&gt; says that if you add up random variables, you get a normal distribution. &lt;strong&gt;Provided it&amp;rsquo;s a large sample, variables are independent, and each has a finite standard deviation&lt;/strong&gt;.&lt;/p&gt;
&lt;p&gt;This means that &lt;strong&gt;many things you get by adding random variables are normally distributed&lt;/strong&gt;. For example:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Number of heads when you toss a coin (add up each coin toss)&lt;/li&gt;
&lt;li&gt;Average age of an army platoon (add up each soldier&amp;rsquo;s age)&lt;/li&gt;
&lt;li&gt;Terminus-to-terminus time for a bus (add up the time between each stop)&lt;/li&gt;
&lt;li&gt;Price movement of an stock exchange index (add up each stock&amp;rsquo;s price movement)&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;But a lot of &lt;strong&gt;real-life data is NOT normally distributed&lt;/strong&gt;. The usual reasons are:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;It&amp;rsquo;s not the sum of random variables&lt;/li&gt;
&lt;li&gt;It doesn&amp;rsquo;t satisfy the central limit theorem (independence, large sample, finite standard deviations)&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Here are some non-normal distributions that are NOT the sum of random variables:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Soldier&amp;rsquo;s age within an army platoon&lt;/strong&gt;. What random variables could you add up? You&amp;rsquo;ll probably find a lot of people at age 18, because that&amp;rsquo;s the minimum age. A little fewer at age 19 &amp;ndash; last year&amp;rsquo;s recruits. Far less at age 20 &amp;ndash; 2 years minimum service accomplished. Certainly not a normal distribution.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Price movement of a single stock&lt;/strong&gt;. What random variables could you add up? You&amp;rsquo;ll find that there are far larger price movements than a normal distribution predicts.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Here are some non-normal distributions that don&amp;rsquo;t satisfy the central limit theorem. (These are, in fact, things I said were normally distributed earlier. You see? It&amp;rsquo;s easy to think things are normal, but in reality they&amp;rsquo;re not.)&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;The terminus-to-terminus time for a bus&lt;/strong&gt;. The number of bus stops is quite small. More importantly, the time between stops isn&amp;rsquo;t independent. If there&amp;rsquo;s a traffic jam, an entire section of the route will take more time. If there&amp;rsquo;s a delay between point 2 to 3, it&amp;rsquo;s likely that there&amp;rsquo;ll be a delay between points 1-2 and 3-4 as well.&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;The price movement of a stock exchange index&lt;/strong&gt;. The price movement of stocks follows a power-law distribution, which does not have finite standard deviations. Also, the price movements are not independent.&lt;/li&gt;
&lt;li&gt;See more &lt;a href=&#34;http://www.qualityamerica.com/knowledgecente/articles/PYZDEKnonnormal.html&#34;&gt;non-normal distributions&lt;/a&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Summary: &lt;strong&gt;Don&amp;rsquo;t assume that anything you see is a normal distribution&lt;/strong&gt;. It usually isn&amp;rsquo;t.&lt;/p&gt;
&lt;p&gt;I&amp;rsquo;ll shortly talk about what happens when you assume something&amp;rsquo;s a normal distribution, when it really is not.&lt;/p&gt;
&lt;hr&gt;
&lt;h2 id=&#34;comments&#34;&gt;Comments&lt;/h2&gt;
&lt;!-- wp-comments-start --&gt;
&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;&lt;a href=&#34;http://demesos.blogspot.com/&#34;&gt;Wil&lt;/a&gt;&lt;/strong&gt; &lt;em&gt;18 Nov 2010 9:14 pm&lt;/em&gt;:
Great article - you brought it to the point!&lt;/li&gt;
&lt;/ul&gt;
&lt;!-- wp-comments-end --&gt;
</description>
    </item>
    <item>
      <title>The Mathematical Structure of Terrorism</title>
      <link>https://www.s-anand.net/blog/the-mathematical-structure-of-terrorism/</link>
      <pubDate>Wed, 24 May 2006 12:00:00 +0000</pubDate>
      <guid>https://www.s-anand.net/blog/the-mathematical-structure-of-terrorism/</guid>
      <description>&lt;p&gt;&lt;a href=&#34;http://www.physorg.com/news67524254.html&#34;&gt;The Mathematical Structure of Terrorism&lt;/a&gt;. The frequency distribution of terrorist attacks &amp;ndash; be it in Iraq, Columbia, Afghanistan or anywhere in the world &amp;ndash; is the same. The frequency distribution of the size of terrorist groups is the same as well.&lt;/p&gt;
</description>
    </item>
  </channel>
</rss>
