Probability - Probability Distributions

22
Indian Institute of Quantitative Finance Probability and Probability Distributions Instructor : Basesh Gala Indian Institute of Quantitative Finance

description

Probability - Probability Distributions

Transcript of Probability - Probability Distributions

  • Indian Institute of Quantitative Finance

    Probability and Probability Distributions

    Instructor : Basesh GalaIndian Institute of Quantitative Finance

  • Indian Institute of Quantitative Finance

    Conditional probability and independenceIf we know that one event has occurred it may change our If we know that one event has occurred it may change our

    view of the probability of another event. Let view of the probability of another event. Let A = {rain today}, B = {rain tomorrow}, C = {rain in 90 days timeA = {rain today}, B = {rain tomorrow}, C = {rain in 90 days time}}

    It is likely that knowledge that A has occurred will change It is likely that knowledge that A has occurred will change your view of the probability that B will occur, but not of your view of the probability that B will occur, but not of the probability that C will occur. the probability that C will occur.

    We write P(B|A) We write P(B|A) P(B), P(C|A) = P(C). P(B|A) denotes the P(B), P(C|A) = P(C). P(B|A) denotes the conditional probability of B, given A. conditional probability of B, given A.

    We say that A and C are We say that A and C are independent,independent, but A and B are not.but A and B are not.

    Note that for independent events P(ANote that for independent events P(AC) = P(A)P(C).C) = P(A)P(C).

  • Indian Institute of Quantitative Finance

    Conditional probability - tornado forecastingConsider the classic data set on the next Slide Consider the classic data set on the next Slide

    consisting of forecasts and observations of consisting of forecasts and observations of tornados (Finley, 1884).tornados (Finley, 1884).

    LetLet F = {Tornado forecast} F = {Tornado forecast} T = {Tornado observed}T = {Tornado observed}

    Use the frequencies in the table to estimate Use the frequencies in the table to estimate probabilities probabilities itits a large sample, so estimates s a large sample, so estimates should not be too bad. should not be too bad.

  • Indian Institute of Quantitative Finance

    Forecasts of tornados

    TornadoForecast

    No Tforecast

    Total

    Tornadoobserved

    28 23 51

    No Tobserved

    72 2680 2752

    Total 100 2703 2803

  • Indian Institute of Quantitative Finance

    Conditional probability - tornado forecastingP(T) = 51/2803 = 0.0182P(T) = 51/2803 = 0.0182P(T|F) = 28/100 = 0.2800P(T|F) = 28/100 = 0.2800P(T|P(T|FFcc) = 23/2703 = 0.0085) = 23/2703 = 0.0085

    Knowledge of the forecast changes P(T). F and T are Knowledge of the forecast changes P(T). F and T are not independent.not independent.

    P(F|T) = 28/51 = 0.5490P(F|T) = 28/51 = 0.5490 P(T|F), P(F|T) are often confused but are different P(T|F), P(F|T) are often confused but are different

    quantities, and can take very different values.quantities, and can take very different values.

  • Indian Institute of Quantitative Finance

    Conditional probability - tornado forecastingP(TP(TF) = 28/2803 = P(T) P(F|T) = P(F)P(T|F) F) = 28/2803 = P(T) P(F|T) = P(F)P(T|F) P(F)P(T). P(F)P(T).

    The two formulae for the probability of an The two formulae for the probability of an intersection always hold. intersection always hold.

    If A, B are independent, then P(A|B) = P(A), P(B|A) If A, B are independent, then P(A|B) = P(A), P(B|A) = P(A), so P(A= P(A), so P(AB) = P(A)P(B).B) = P(A)P(B).

    P(B|A) = P(B)P(A|B)/P(A)P(B|A) = P(B)P(A|B)/P(A) This isThis is BayesBayes Theorem, though in the usual statement Theorem, though in the usual statement

    of the theorem P(A) is expanded in a more of the theorem P(A) is expanded in a more complicatedcomplicated--looking fashion. looking fashion.

  • Indian Institute of Quantitative Finance

    Random variables

    Often we take measurements which have different Often we take measurements which have different values on different occasions. Furthermore, the values on different occasions. Furthermore, the values are subject to random or stochastic values are subject to random or stochastic variation variation -- they are not completely predictable, they are not completely predictable, and so are not deterministic. They are and so are not deterministic. They are random random variables.variables.

    Examples are crop yield, maximum temperature, Examples are crop yield, maximum temperature, number of cyclones in a season, rain/no rain.number of cyclones in a season, rain/no rain.

  • Indian Institute of Quantitative Finance

    Continuous and discrete random variablesA A continuouscontinuous random variable is one which can (in random variable is one which can (in

    theory) take theory) take any any value in some range, for example value in some range, for example crop yield, maximum temperaturecrop yield, maximum temperature. .

    A discrete variable has a countable set of values. A discrete variable has a countable set of values. They may be They may be counts, such as numbers of cyclonescounts, such as numbers of cyclones categories, such as much above average, above categories, such as much above average, above

    average, near average, below average, much below average, near average, below average, much below averageaverage

    binary variables, such as rain/no rainbinary variables, such as rain/no rain

  • Indian Institute of Quantitative Finance

    Probability distributions

    If we measure a random variable many times, we can If we measure a random variable many times, we can build up a distribution of the values it can take.build up a distribution of the values it can take.

    Imagine an underlying distribution of values which Imagine an underlying distribution of values which we would get if it was possible to take more and we would get if it was possible to take more and more measurements under the same conditions.more measurements under the same conditions.

    This gives the probability distribution for the This gives the probability distribution for the variable.variable.

  • Indian Institute of Quantitative Finance

    Discrete probability distributions

    A discrete probability distribution associates a A discrete probability distribution associates a probability with each value of a discrete random probability with each value of a discrete random variable.variable. Example 1. Random variable has two values Rain/No Example 1. Random variable has two values Rain/No

    Rain. P(Rain) = 0.2, P(No Rain) = 0.8 gives a Rain. P(Rain) = 0.2, P(No Rain) = 0.8 gives a probability distribution.probability distribution.

    Example 2. Let X = Number of wet days in a 10 day Example 2. Let X = Number of wet days in a 10 day period. P(X=0) = 0.1074, P(X=1) = 0.2684, P(X=2) = period. P(X=0) = 0.1074, P(X=1) = 0.2684, P(X=2) = 0.3020, 0.3020, P(X=6) = 0.0055, ... (see Slide 24 for more P(X=6) = 0.0055, ... (see Slide 24 for more on this example).on this example).

    Note that P(rain) + P(No Rain) = 1; P(X=0) + P(X=1) + Note that P(rain) + P(No Rain) = 1; P(X=0) + P(X=1) + P(X=2) + P(X=2) + +P(X=6) + +P(X=6) + P(X=10) = 1.P(X=10) = 1.

  • Indian Institute of Quantitative Finance

    Continuous probability distributions

    Because continuous random variables can take all Because continuous random variables can take all values in a range, it is not possible to assign values in a range, it is not possible to assign probabilities to individual values. probabilities to individual values.

    Instead we have a continuous curve, called a Instead we have a continuous curve, called a probability density function, which allows us to probability density function, which allows us to calculate the probability a value within any calculate the probability a value within any interval. interval.

    This probability is calculated as the area under the This probability is calculated as the area under the curve between the values of interest. The total area curve between the values of interest. The total area under the curve must equal 1.under the curve must equal 1.

  • Indian Institute of Quantitative Finance

    Families of probability distributions

    The number of different probability distributions is The number of different probability distributions is unlimited. However, certain families of unlimited. However, certain families of distributions give good approximations to the distributions give good approximations to the distributions of many random variables.distributions of many random variables.

    Important families of discrete distributions include Important families of discrete distributions include binomial, multinomial, Poisson,binomial, multinomial, Poisson, hypergeometrichypergeometric, , negative binomial negative binomial

    Important families of continuous distributions Important families of continuous distributions include normal (include normal (GaussianGaussian), exponential, gamma, ), exponential, gamma, lognormal,lognormal, WeibullWeibull, extreme value , extreme value

  • Indian Institute of Quantitative Finance

    Families of discrete distributions

    We consider only two, binomial and Poisson. We consider only two, binomial and Poisson. There are many more. There are many more.

    Do not use a particular distribution unless you Do not use a particular distribution unless you are satisfied that the assumptions which are satisfied that the assumptions which underlie it are (at least approximately) underlie it are (at least approximately) satisfied.satisfied.

  • Indian Institute of Quantitative Finance

    Binomial distributions

    The data arise from a sequence of n The data arise from a sequence of n independentindependent trials.trials.At each trial there are only two possible outcomes, At each trial there are only two possible outcomes,

    conventionally called success and failure.conventionally called success and failure.The probability of success, p, is the The probability of success, p, is the samesame in each trial.in each trial.The random variable of interest is the number of successes, The random variable of interest is the number of successes,

    X, in the n trials.X, in the n trials.

    The The assumptionsassumptions of independence and constant p of independence and constant p in 1, 3 in 1, 3 are importantare important. If they are invalid, so is . If they are invalid, so is the binomial distributionthe binomial distribution

  • Indian Institute of Quantitative Finance

    Binomial distributions - examples

    It It is unlikely that the binomial distribution would be is unlikely that the binomial distribution would be appropriate for the number of wet days in a period of 10 appropriate for the number of wet days in a period of 10 consecutive consecutive days, because of days, because of nonnon--independenceindependence of rain on of rain on consecutive days. consecutive days.

    It might be appropriate for the number of frostIt might be appropriate for the number of frost--free Januarys, free Januarys, or the number of crop failures, in a 10or the number of crop failures, in a 10--year period, if we year period, if we can assume no intercan assume no inter--annual dependence and no trend in p, annual dependence and no trend in p, the frostthe frost--free probability, or crop failure probability.free probability, or crop failure probability.

  • Indian Institute of Quantitative Finance

    Poisson distributions

    Poisson distributions are often used to describe the number of Poisson distributions are often used to describe the number of occurrences of a occurrences of a rarerare event. For exampleevent. For example The number of tropical cyclones in a seasonThe number of tropical cyclones in a season The number of occasions in a season when river levels The number of occasions in a season when river levels

    exceed a certain valueexceed a certain valueThe main assumptions are that events occur The main assumptions are that events occur

    at random (the occurrence of an event doesnat random (the occurrence of an event doesnt change the t change the probability of it happening again) probability of it happening again)

    at a constant rateat a constant ratePoisson distributions also arise as approximations to Poisson distributions also arise as approximations to

    binomials when n is large and p is small.binomials when n is large and p is small.

  • Indian Institute of Quantitative Finance

    Poisson distributions an example

    Suppose that we can assume that the number of Suppose that we can assume that the number of cyclones, X, in a particular area in a season has a cyclones, X, in a particular area in a season has a Poisson distribution with a mean (average) of 3. Poisson distribution with a mean (average) of 3. Then P(X=0) = 0.05, P(X=1) = 0.15, P(X=2) = Then P(X=0) = 0.05, P(X=1) = 0.15, P(X=2) = 0.22, P(X=3) = 0.22, P(X=4) = 0.17, P(X=5) = 0.22, P(X=3) = 0.22, P(X=4) = 0.17, P(X=5) = 0.10, 0.10, Note:Note: There is no upper limit to X, unlike the binomial where There is no upper limit to X, unlike the binomial where

    the upper limit is n.the upper limit is n. Assuming a constant rate of occurrence, the number of Assuming a constant rate of occurrence, the number of

    cyclones in 2 seasons would also have a Poisson cyclones in 2 seasons would also have a Poisson distribution, but with mean 6.distribution, but with mean 6.

  • Indian Institute of Quantitative Finance

    Normal (Gaussian) distributions

    Normal (also known asNormal (also known as GaussianGaussian) distributions are ) distributions are by far the most commonly used family of by far the most commonly used family of continuous distributions.continuous distributions.

    They are They are bellbell--shapedshaped see Slide 20 see Slide 20 -- and are and are indexed by two parameters:indexed by two parameters: The mean The mean the distribution is symmetric about this the distribution is symmetric about this

    value value The standard deviation The standard deviation this determines the spread this determines the spread

    of the distribution. Roughly 2/3 of the distribution lies of the distribution. Roughly 2/3 of the distribution lies within 1 standard deviation of the mean, and 95% within 1 standard deviation of the mean, and 95% within 2 standard deviations.within 2 standard deviations.

  • Indian Institute of Quantitative Finance

    Deviations from normality - skewness

    Some variables deviate from normality because their Some variables deviate from normality because their distributions are symmetric but distributions are symmetric but too flattoo flat or too or too longlong--tailedtailed. .

    A more common type of deviation isA more common type of deviation is skewnessskewness, where one tail , where one tail of the distribution is much longer than the other. of the distribution is much longer than the other.

    PositivePositive skewnessskewness, as illustrated in the next Slide is most , as illustrated in the next Slide is most common common it occurs forit occurs for windspeedswindspeeds, and for rainfall , and for rainfall amounts. amounts.

    NegativelyNegatively--skewedskewed distrbutionsdistrbutions with longer tails to the left with longer tails to the left sometimes occur, for example surface pressure.sometimes occur, for example surface pressure.

  • Indian Institute of Quantitative Finance

    A positively-skewed Weibull distribution

    0 5 10

    0.0

    0.1

    0.2

    0.3

    x

    f(x)

  • Indian Institute of Quantitative Finance

    Families of skewed distributions

    There are several families of skewed distributions, There are several families of skewed distributions, includingincluding WeibullWeibull, gamma and lognormal. Each , gamma and lognormal. Each family has 2 or more parameters which can be family has 2 or more parameters which can be varied to fit a variety of shapes.varied to fit a variety of shapes.

    One particular family (strictly 3 families) consists of One particular family (strictly 3 families) consists of soso--called extreme value distributions. As the name called extreme value distributions. As the name suggests, these can be used to model extremes suggests, these can be used to model extremes over a period, for example, maximumover a period, for example, maximum windspeedwindspeed, , minimum temperature, greatest 24minimum temperature, greatest 24--hr. rainfall, hr. rainfall, highest flood highest flood

  • Indian Institute of Quantitative Finance

    Other probability distributions

    We have sketched a few of the main probability We have sketched a few of the main probability distributions, but there are many others. Examples distributions, but there are many others. Examples which donwhich dont fit standard patterns includet fit standard patterns include Proportion of sky covered by cloud may have large Proportion of sky covered by cloud may have large

    probability values near 0 and 1, with lower probabilities probability values near 0 and 1, with lower probabilities in between in between UU--shaped rather than bellshaped rather than bell--shapedshaped

    Daily rainfall is neither (purely) discrete, nor Daily rainfall is neither (purely) discrete, nor continuous. Positive values are continuous, but there is continuous. Positive values are continuous, but there is also a nonalso a non--zero (discrete) probability of taking the zero (discrete) probability of taking the value zero.value zero.