Tag: math

  • What’s the Weather Like?

    You look at your forecast. 30% chance of rain, that’s a bummer(unless you’re one of the rare people who like the rain). But what does this number really mean?

    Many assume this number means that 30% of the given town would rain or it will rain for 30% of the day, but what it actually means is far more interesting and uses a clever calculation not many are aware of. When the forecast shows 30% it means that there is a 30% probability(I love that word) that at least 0.01 inches of rain will hit any given surface in the town over a certain time period(usually one,twelve,or twenty four hours). So now that we know what a 30% chance of rain means, how is it calculated?

    The National Weather Service says the probability is calculated like this, where P=probability of rain, C=confidence of prediction, and A=percent area of town expected to receive rain:
    P=C*A
    I know its pretty surprising how simple that is, you were probably expecting some crazy formula, or applying Bayes theorem and finding the expected value, but no its just multiplying two values!

    So for example, if P=30%(I don’t know why I keep using that number), you could have the following extremes:
    1. You have small storms incoming on only a fraction of the area but the meteorologist is very confident that this event will occur
    2. You may get a large storm flooding your entire town but the meteorologist is not super confident this will occur
    These both will show the same number on your weather app but they are two very different types of storms and occurences.

    So next time you look through the rain probability always think what kind of confidence or area of rainstorm you could be encountering!

  • THE PRISONER’S DILEMMA-a core situation of game theory and probability

    The Prisoner’s Dilemma is considered as one of the greatest situations in game theory, and like many problems it seems very simple yet the math and logic behind it is very interseting. The situation simply goes:
    Two partners in crime are arrested. The police put them in separate rooms and offer them the same deal:
    If you both betray each other, you both get 2 years.
    If you betray your partner and they stay silent, you go free and they get 3 years.
    If you both stay silent, you both get only 1 year on a minor charge.

    So what do you do? Now you would think that a huge part of this has to do with your relation to the other person and how strong your bond and loyalty is. While this does play a factor if you were entirely focused on a shorter sentence this social aspect is irrelevant.

    Let E(silent) be the expected value of prison sentence if you stay silent, and let E(betray) be the expected value of prison sentence if you betray your partner.
    Also let P(this is the variable, depending on the other person’s loyalty) be the probability that your partner stays silent, meaning 1-P is the probability that they betray you.
    Now let’s split into cases on if you stay silent or if you betray:

    Case 1: You stay silent–> if they stay silent as well you get 1 year, if they betray you get 3 years
    E(silent)=1*(P)+3*(1-P)=3-2P (if you are confused where this formula is coming from, it is simply just multiplying the outcome by the probability of it happening, this is the most straightforward way of calculating expected value)
    Sentence for you: 3-2P years

    Case 2: You betray–> if they stay silent you get 0 years, if they also betray you get 2 years
    E(betray)=0*(P)+2*(1-P)=2-2P
    Sentence for you: 2-2P years

    Conclusion: E(silent) is 3-2P years, while E(betray) is 2-2P years. As you can see you will always get 1 year less on your sentence if you betray!

    So the moral of the story is to never lie to police(and always betray your friend, just kidding), but like always don’t blame the math!