Saturday, March 24, 2018

Correlation versus Causation

In ancient Russia, there was a cholera outbreak in certain areas. This epidemic caused the government to send doctors to these certain areas. However, sending of doctors did not decrease the intensity of cholera epidemic, rather it intensified it. This caused the Russian in those areas to kill these doctors.

This is a master example what happens when people confuse between correlation and causation. Those Russian doctors did not cause cholera epidemic to intensify, but people thought they were the cause for cholera outbreak intensification. Albeit, doctors and cholera are correlated, but doctors are not the cause of cholera intensification.

Similarly, if you ask that whether government benefits in the form of social security cause people to work less? May be. May be not. May be, people with disability work less, and their working less is not caused by them receiving government benefits, rather their disability cause them to work less. So, in this case, we can say that government benefits are working less are correlated, but whether government benefit causes people to work less, it's a trickier question to answer.

In similar vein, we all are familiar with the idea that during winter or rain, going outside will cause you to catch cold. However, bad weather does not cause cold. Germs or more specifically, viruses do. And when people are indoor, the germs spread. Therefore, cold outside or rain outside are correlated in that they cause people to stay inside, which in turn, helps spread germs, causing people to catch cold.

In another glaring example, researchers who study child development found that watching for breastfeeding after one year, kids are not as healthy as they should be. So they thought breastfeeding caused babies to be less healthy, perhaps sicker. They urged mother to stop breastfeeding after year one. However, later in Peru, researchers identified that kids that are sicker got breastfed more, because their moms lavish more attention to them. In such case,

Babies being sicker causing them to get breastfed more. Not being breastfed more causing them to get sicker. An epic confusion relating correlation versus causation.

<!-- Global site tag (gtag.js) - Google Analytics -->
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-74398439-1"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'UA-74398439-1');
</script>


Friday, March 23, 2018

Game Theory Primer


  • Game theory is a way of strategic interactions between self-interested people. It relates to how self-interested participants would behave in strategic interactions. 
  • A game in general is any interaction between two or more people where the outcomes depend on what every body does or what every body has.  




















Source: Coursera, Game theory course.

The questions to ask:
  • What action should a player of the game take?
  • Would all users behave the same in this scenario?
  • What global behavior patterns should a system designer expect?
  • For what changes to the numbers would behavior be the same?
  • What effect would communication have?
  • Repetitions? (Finite? Infinite?) 
  • Does it matter if I believe that my opponent is rational?
What does it mean to say that the agent is self-interested?
  • It does not mean that they want to harm others or only care about themselves. 
  • only that the agent has his own description of states of the world that it likes, and acts based on this description. 
Each agent has a utility function. 
  • quantifies degrees of preference across alternatives
  • explains the impacts of uncertainty
  • Decision-theoretic rationality: act to maximize expected utility. There is a basic theorem (von Neumann and Morgenstern, 1944) that derives the existence of a utility function from a more basic preference ordering and axioms of such offerings. 
Defining a game: Key Ingredients

  • Players: who are decision makers? 
    • people? governments? companies?
  • Actions: Enter a bid in auction? Decide whether to end a strike? Decide when to sell a stock? Decide who to vote?
  • Payoffs? 
    • What motivates players? Do they care about some profits? Do they care about other players? 
Defining Games: Two Standard Representations

  • Normal form (a.k.a. Matrix Form, Strategic Form) List what payoffs get as a function of their actions
    • It is as if players moved simultaeneously
    • But strategies encode many things 

 Prisoner's dilemma in any game:
  • a,a: both cooperate and both get highest possible reward. 
  • d,d: both defect and both get least possible reward. 
  • b,c: one cooperates and the other defects --> the defector gets the most benefit and the cooperator gets the least benefit. 
  • c,b: symmetric to the above. One cooperates and the other defects. The defector gets the most benefits, and the cooperator gets the least benefit as in c > a > d > b. 


The Dynamic of Traffic in Dhaka City

People say there are no rules when it comes to traffic in Dhaka city. I disagree. While it may seem the traffic rules in Dhaka are completely out of any plan or order, which I kind of sympathize with, there are some traffic rules, albeit informal, that define how traffic in Dhaka works. These rules can be termed as commandments. I found these rules attributed to Saigon traffic rules that are so relatable to Dhaka. Giving proper credit to the sources, I first read these rules, rather commandments, in the informative post about Devon Zuegel's personal visit to Saigon in this post. From there, I learned that she referred to Anna Wickham's blog post about these rules.
1. A red light is just a suggestion that you could stop. If you want.
2. It’s always rush hour.
3. No place is sacred for pedestrians.
4.There’s no such thing as a one-way road, even if it’s a one-way road. Always look both ways.
5. One inch is a perfectly acceptable following distance between motorbikes, especially during rush hour.
6. Crossing the road: “Be like a rock in a stream."
7. Just because it looks like there’s no room for you in that lane, doesn’t mean there’s not.