w4 probability distributions

Post on 06-Apr-2018

222 Views

Category:

Documents

0 Downloads

Preview:

Click to see full reader

TRANSCRIPT

  • 8/2/2019 W4 Probability Distributions

    1/41

    Centre for Computer Technology

    ICT114ICT114Mathematics forMathematics for

    ComputingComputing

    Week : 4Week : 4

    Probability DistributionsProbability Distributions

  • 8/2/2019 W4 Probability Distributions

    2/41

    March 20, 2012March 20, 2012

    ObjectivesObjectives

    Review Week 3Review Week 3Random VariablesRandom Variables

    Discrete Probability DistributionDiscrete Probability DistributionContinuous Probability DistributionContinuous Probability DistributionBinomial DistributionBinomial DistributionNormal DistributionNormal DistributionPoisson DistributionPoisson Distribution

  • 8/2/2019 W4 Probability Distributions

    3/41

    March 20, 2012March 20, 2012

    Generalized Multiplication RuleGeneralized Multiplication Rule

    If an operation can be performed inIf an operation can be performed in nn11waysways, and if for each of these, and if for each of these a seconda second

    operationoperation can be performed incan be performed in nn22 waysways,,andand for each of the first two a thirdfor each of the first two a thirdoperationoperation can be performed incan be performed in nn33 waysways,,

    and so forth,and so forth, then the sequence of kthen the sequence of koperations can be performed inoperations can be performed innn11.n.n22.n.n33nnkk ways.ways.

  • 8/2/2019 W4 Probability Distributions

    4/41

    March 20, 2012March 20, 2012

    PermutationsPermutations

    The number of permutations for n distinctThe number of permutations for n distinctobjects taken r at a timeobjects taken r at a time

    n.(n-1).(n-2)(n-r+1)n.(n-1).(n-2)(n-r+1)

    The above product is represented byThe above product is represented bynnpprr = n! / (n-r)!= n! / (n-r)!

  • 8/2/2019 W4 Probability Distributions

    5/41

    March 20, 2012March 20, 2012

    CombinationsCombinations

    The number of combinations ofThe number of combinations ofn distinctn distinctobjects taken r at a time isobjects taken r at a time is

    n!n!

    nnccrr = --------------= --------------

    r! (n-r)!r! (n-r)!

  • 8/2/2019 W4 Probability Distributions

    6/41

    March 20, 2012March 20, 2012

    Addition Theorem of ProbabilityAddition Theorem of Probability

    If A and B are any two events, thenIf A and B are any two events, then

    P(AUB)=P(A)+P(B)-P(AP(AUB)=P(A)+P(B)-P(A B)B)

  • 8/2/2019 W4 Probability Distributions

    7/41

    March 20, 2012March 20, 2012

    Conditional ProbabilityConditional Probability The probability of an eventThe probability of an event B occurringB occurring, when, when anan

    event A has already occurredevent A has already occurred is calledis calledconditional probability, represented byconditional probability, represented by P(B/A).P(B/A).

    The conditional probability of B, given A,The conditional probability of B, given A,denoted by P(B/A), is defined bydenoted by P(B/A), is defined by

    P(AP(A B)B)

    P(B/A) = ---------------- if P(A)>0P(B/A) = ---------------- if P(A)>0P(A)P(A)

  • 8/2/2019 W4 Probability Distributions

    8/41

    Centre for Computer Technology

    Probability DistributionsProbability Distributions

  • 8/2/2019 W4 Probability Distributions

    9/41

    March 20, 2012March 20, 2012

    Random Variables AgainRandom Variables Again

    In some experimentsIn some experiments we cannot controlwe cannot controlcertain variablescertain variables that affect the outcome,that affect the outcome,

    even though most of the conditions are theeven though most of the conditions are thesamesame. Such experiments are called. Such experiments are calledrandom experiments.random experiments.

    Set of all possible outcomes is called aSet of all possible outcomes is called asample space or sample.sample space or sample.

  • 8/2/2019 W4 Probability Distributions

    10/41

    March 20, 2012March 20, 2012

    Random Variables AgainRandom Variables Again

    Let a number be assigned to all theLet a number be assigned to all theelements of a random sample space.elements of a random sample space.

    Then there is a function defined on theThen there is a function defined on thesample space.sample space.

    This function is called a randomThis function is called a randomfunction or a stochastic function,function or a stochastic function,denoted by a capital letterdenoted by a capital letterX or YX or Y..

  • 8/2/2019 W4 Probability Distributions

    11/41

    March 20, 2012March 20, 2012

    Random VariablesRandom VariablesA random variable generally has someA random variable generally has some

    specified physical, geometrical or otherspecified physical, geometrical or otherfunctionfunction..

    Random variable with a finite number ofRandom variable with a finite number ofvalues is called avalues is called a discrete randomdiscrete randomvariable.variable.

    Random variable with an infinite numberRandom variable with an infinite numberof values is called aof values is called a nondiscrete randomnondiscrete randomvariable.variable.

  • 8/2/2019 W4 Probability Distributions

    12/41

    March 20, 2012March 20, 2012

    Discrete Probability DistributionDiscrete Probability Distribution

    LetLet XX = discrete random variable= discrete random variable

    xx11,x,x22,x,x33,...,... = possible values (arranged)= possible values (arranged)

    The probability is given byThe probability is given byP(X=xP(X=xkk) = f(x) = f(xkk)) k = 1, 2, 3,.k = 1, 2, 3,.

    The probability function or distribution in theThe probability function or distribution in the

    Simplified form isSimplified form is

    P(X=x) = f(x)P(X=x) = f(x)

  • 8/2/2019 W4 Probability Distributions

    13/41

    March 20, 2012March 20, 2012

    Discrete Probability DistributionDiscrete Probability Distribution

    f(x) is a probability function iff(x) is a probability function if

    1.1. f(x) 0f(x) 0

    2.2. f(x) = 1f(x) = 1

    xxsum is taken over all possible values of xsum is taken over all possible values of x

  • 8/2/2019 W4 Probability Distributions

    14/41

    March 20, 2012March 20, 2012

    Example : Suppose a coin is tossed twice. Let XExample : Suppose a coin is tossed twice. Let X

    represent the number of heads that can come up.represent the number of heads that can come up.With each sample point we can associate aWith each sample point we can associate anumber for X as followsnumber for X as follows

    P(HH) = P(HT) = P(TH) = P(TT) = P(HH) = P(HT) = P(TH) = P(TT) =

    Sample PointSample Point HHHH HTHT THTH TTTTXX 22 11 11 00

  • 8/2/2019 W4 Probability Distributions

    15/41

    March 20, 2012March 20, 2012

    ThenThen

    P(X=0) = P(TT) = P(X=0) = P(TT) = P(X=1) = P(HTUTH) = P(X=1) = P(HTUTH) =

    P(X=2) = P(HH) = P(X=2) = P(HH) =

    Thus the probability function is given byThus the probability function is given by

    xx 00 11 22

    f(x)f(x) 1/41/4 1/21/2 1/41/4

  • 8/2/2019 W4 Probability Distributions

    16/41

    March 20, 2012March 20, 2012

    Distribution function for a DiscreteDistribution function for a Discrete

    Random VariableRandom VariableThe distribution function for X can be obtainedThe distribution function for X can be obtainedfrom the probability function for all x in (-, ),from the probability function for all x in (-, ),

    00 -

  • 8/2/2019 W4 Probability Distributions

    17/41

    March 20, 2012March 20, 2012

    Example : In the previous exampleExample : In the previous example

    00 -

  • 8/2/2019 W4 Probability Distributions

    18/41

    March 20, 2012March 20, 2012

    Continuous Random VariablesContinuous Random Variables

    The function f(x) has the propertiesThe function f(x) has the properties

    1. f(x) 01. f(x) 0

    2. f(x)dx = 12. f(x)dx = 1

    --

  • 8/2/2019 W4 Probability Distributions

    19/41

    March 20, 2012March 20, 2012

    Preliminaries : Binomial theoremPreliminaries : Binomial theorem

    The Binomial theorem gives,The Binomial theorem gives,

    ( x + y )( x + y )nn

    = x= xnn

    ++nn

    CC 11 xxn-1n-1

    yy

    ++ nn CC 22 xxn-2n-2 yy22 ++ ++ nn CC n-2n-2 xx

    22 yyn-2n-2

    ++ nn CC n-1n-1 xx yyn-1n-1 + y+ y nn

    = = nn CC rr xx n-rn-ryyrr , r ranges from 0 to n, r ranges from 0 to n

  • 8/2/2019 W4 Probability Distributions

    20/41

    March 20, 2012March 20, 2012

    Binomial DistributionBinomial DistributionConsider an experiment, like tossing aConsider an experiment, like tossing a

    coin or choosing a marble from an urncoin or choosing a marble from an urnrepeatedly.repeatedly.

    Each toss or selection is called a trialEach toss or selection is called a trial In some casesIn some cases the probability will notthe probability will not

    change from one trial to another,change from one trial to another, likelike

    tossing a coin or die.tossing a coin or die.Such experiments are calledSuch experiments are called independentindependent

    or Bernoulli trials.or Bernoulli trials.

  • 8/2/2019 W4 Probability Distributions

    21/41

    March 20, 2012March 20, 2012

    Binomial DistributionBinomial Distribution

    let p = probability that an event will happenlet p = probability that an event will happen

    q = 1-pq = 1-p

    probability that the event will failprobability that the event will failThe probability that the event will happenThe probability that the event will happenexactly x times in n trialsexactly x times in n trials

    f(x) = P(X=x) =f(x) = P(X=x) = nnCCxx ppxx qq(n-x)(n-x)

  • 8/2/2019 W4 Probability Distributions

    22/41

    March 20, 2012March 20, 2012

    Lets do this togetherLets do this together

    What is the probability of getting exactlyWhat is the probability of getting exactly2 heads in 6 tosses of a fair coin?2 heads in 6 tosses of a fair coin?

    p = ?p = ?

    q = ?q = ?

    P(X=x) = ?P(X=x) = ?

  • 8/2/2019 W4 Probability Distributions

    23/41

    March 20, 2012March 20, 2012

    Let getting a head be the probability ofLet getting a head be the probability of

    success, p = success, p = Then the probability of failure, q = Then the probability of failure, q =

    Number of trials, n = 6Number of trials, n = 6Number of favorable outcomes, x = 2Number of favorable outcomes, x = 2

    Therefore,Therefore, P(X=2) =P(X=2) = 66CC22 pp22 qq(6-2)(6-2)

    == 66CC22 ()()22 ()()44

  • 8/2/2019 W4 Probability Distributions

    24/41

    March 20, 2012March 20, 2012

    Properties of a Binomial DistributionProperties of a Binomial Distribution

    Mean,Mean, = np = np

    Variance,Variance, 22 = np(1-p)= np(1-p)= npq= npq

    Standard Deviation,Standard Deviation, = (npq) = (npq)

  • 8/2/2019 W4 Probability Distributions

    25/41

    March 20, 2012March 20, 2012

    Lets do this togetherLets do this together

    Toss a fair coin 100 times, and count theToss a fair coin 100 times, and count thenumber of heads that appear. Find thenumber of heads that appear. Find the

    mean, variance and standard deviation ofmean, variance and standard deviation ofthis experiment.this experiment.

  • 8/2/2019 W4 Probability Distributions

    26/41

    March 20, 2012March 20, 2012

    Normal DistributionNormal Distribution

    Normal distribution is a continuousNormal distribution is a continuousdistributiondistribution..

    The variable may take any value betweenThe variable may take any value betweenminus infinity and plus infinity.minus infinity and plus infinity.Most of the probabilities are concentratedMost of the probabilities are concentrated

    within three standard deviations from thewithin three standard deviations from themean.mean.

  • 8/2/2019 W4 Probability Distributions

    27/41

    March 20, 2012March 20, 2012

    Normal DistributionNormal DistributionA normal distributionA normal distribution is symmetric aboutis symmetric about

    mean.mean.There are a large number of normalThere are a large number of normal

    distributions, but the normal distributiondistributions, but the normal distributionwithwith mean, = 0mean, = 0 andand standard deviation,standard deviation, = 1 = 1(called standard normal distribution,(called standard normal distribution,

    denoted as z )denoted as z ) is of interest.is of interest.The probability values for this areThe probability values for this are

    extensively tabulated,extensively tabulated, called the z tablecalled the z table..

  • 8/2/2019 W4 Probability Distributions

    28/41

    March 20, 2012March 20, 2012

    Normal DistributionNormal Distribution

    Any variable X following normal distribution withAny variable X following normal distribution withmean and standard deviation mean and standard deviation can be linearlycan be linearlytransformed to the standard normal distributiontransformed to the standard normal distribution

    by subtracting mean and dividing by standardby subtracting mean and dividing by standarddeviation.deviation.

    Z be the standard variable corresponding to XZ be the standard variable corresponding to X

    X X Z = ---------------Z = ---------------

  • 8/2/2019 W4 Probability Distributions

    29/41

    March 20, 2012March 20, 2012

    Prob (z is between 0 and 1.0) = 0.3413Prob (z is between 0 and 1.0) = 0.3413

    We may write this asWe may write this as

    Prob (0

  • 8/2/2019 W4 Probability Distributions

    30/41

    March 20, 2012March 20, 2012

    Lets do this togetherLets do this together

    Exercise : Marks of an examination followsExercise : Marks of an examination followsnormal distribution with mean 70 andnormal distribution with mean 70 and

    standard deviation 10. What percentage ofstandard deviation 10. What percentage ofstudents obtained marks (i) between 70students obtained marks (i) between 70and 85 (ii) between 80 and 90 (iii) moreand 85 (ii) between 80 and 90 (iii) morethan 75 (iv) less than 60 (v) between 65than 75 (iv) less than 60 (v) between 65

    and 80?and 80?

  • 8/2/2019 W4 Probability Distributions

    31/41

    March 20, 2012March 20, 2012

    Mean = 70Mean = 70Standard Deviation = 10Standard Deviation = 10

    Prob(70 X 85)Prob(70 X 85)

    = Prob ([70-70]/10 z [85-70]/10)= Prob ([70-70]/10 z [85-70]/10)

    = Prob (0 z 1.5)= Prob (0 z 1.5)= 0.4332= 0.4332

  • 8/2/2019 W4 Probability Distributions

    32/41

    March 20, 2012March 20, 2012

    Prob(65 X 80)Prob(65 X 80)

    = Prob ([65-70]/10 z [80-70]/10)= Prob ([65-70]/10 z [80-70]/10)

    = Prob ( - 0.5 z 1.0)= Prob ( - 0.5 z 1.0)= Prob ( - 0.5 z 0 )+ Prob ( 0 z 1.0)= Prob ( - 0.5 z 0 )+ Prob ( 0 z 1.0)

    = Prob ( 0 z 0.5 ) + Prob ( 0 z 1.0)= Prob ( 0 z 0.5 ) + Prob ( 0 z 1.0)

    = 0.1915 + 0.3413 = 0.5328= 0.1915 + 0.3413 = 0.5328

  • 8/2/2019 W4 Probability Distributions

    33/41

    March 20, 2012March 20, 2012

    Normal approximation to BinomialNormal approximation to Binomial

    If n is large and if p is not too close toIf n is large and if p is not too close toeither 0 or 1either 0 or 1, the binomial distribution can, the binomial distribution can

    bebe approximated by a normal distributionapproximated by a normal distributionusing standardized variable.using standardized variable.Suppose X follow binomial distributionSuppose X follow binomial distribution

    (n,p) [ that is with mean np and variance(n,p) [ that is with mean np and variancenp(1-p)]np(1-p)]

  • 8/2/2019 W4 Probability Distributions

    34/41

    March 20, 2012March 20, 2012

    Normal approximation to BinomialNormal approximation to Binomial

    (X np)(X np)

    Z = ----------------Z = ---------------- (np(1-p))(np(1-p))

    will approximately follow standard normalwill approximately follow standard normaldistributiondistribution

  • 8/2/2019 W4 Probability Distributions

    35/41

    March 20, 2012March 20, 2012

    Lets do this togetherLets do this together

    A fair coin is tossed 400 times. What is theA fair coin is tossed 400 times. What is theprobability that the number of heads willprobability that the number of heads will

    be more than 215?be more than 215?

  • 8/2/2019 W4 Probability Distributions

    36/41

    March 20, 2012March 20, 2012

    Poisson DistributionPoisson Distribution

    The probability distribution of the PoissonThe probability distribution of the Poissonrandom variable X, in a given time intervalrandom variable X, in a given time intervalis given byis given by

    ee-t-t (t)(t)xx

    P(x:t) = -------------------P(x:t) = ------------------- x= 0, 1, 2,.x= 0, 1, 2,.x!x!

    where is the average number ofwhere is the average number ofoutcomes per unit timeoutcomes per unit time

  • 8/2/2019 W4 Probability Distributions

    37/41

    March 20, 2012March 20, 2012

    Lets do this togetherLets do this together

    If the probability that an individual willIf the probability that an individual willsuffer a bad reaction from an injection of asuffer a bad reaction from an injection of a

    given serum is 0.001, determine thegiven serum is 0.001, determine theprobability that out of 200 individualsprobability that out of 200 individuals

    (a) exactly 3(a) exactly 3

    (b) more than 2 individuals(b) more than 2 individualswill suffer a bad reactionwill suffer a bad reaction

  • 8/2/2019 W4 Probability Distributions

    38/41

    March 20, 2012March 20, 2012

    Given, t = 0.001Given, t = 0.001

    ee-0.001-0.001 (0.001)(0.001)33

    (a) P(3:0.001) = -----------------------(a) P(3:0.001) = -----------------------

    3!3!

    (b) P(x>2) = 1 (P(x=0)+P(x=1)+P(x=2))(b) P(x>2) = 1 (P(x=0)+P(x=1)+P(x=2))

  • 8/2/2019 W4 Probability Distributions

    39/41

    March 20, 2012March 20, 2012

    SummarySummary Discrete Probability DistributionDiscrete Probability Distribution

    1. f(x) 01. f(x) 0

    2. f(x) = 12. f(x) = 1

    xx

    Continuous Probability DistributionContinuous Probability Distribution1. f(x) 01. f(x) 0

    2. f(x)dx = 12. f(x)dx = 1 --

  • 8/2/2019 W4 Probability Distributions

    40/41

    March 20, 2012March 20, 2012

    SummarySummary Binomial Distribution, f(x) = P(X=x) =Binomial Distribution, f(x) = P(X=x) = nnCCxx ppx

    x qq(n-x)(n-x)

    p = probability of success, q = 1-p = probability of failurep = probability of success, q = 1-p = probability of failure

    X X Normal Distribution, Z = ---------------Normal Distribution, Z = ---------------

    ee-t-t (t)(t)xx

    Poisson distribution, P(x:t) = -----------------Poisson distribution, P(x:t) = -----------------x!x! is the average outcomes per unit time is the average outcomes per unit time

  • 8/2/2019 W4 Probability Distributions

    41/41

    March 20, 2012March 20, 2012

    ReferenceReference

    Spiegel, Schiller, Srinivasan : ProbabilitySpiegel, Schiller, Srinivasan : Probabilityand Statisticsand Statistics

    M R Spiegel : Theory and Problems ofM R Spiegel : Theory and Problems ofStatistics, Schaum's Outline Series,Statistics, Schaum's Outline Series,McGraw HillMcGraw Hill

    http://mathworld.wolfram.comhttp://mathworld.wolfram.com

top related