34
BINOMIAL BINOMIAL DISTRIBUTION DISTRIBUTION AND ITS AND ITS APPLICATION APPLICATION

BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Embed Size (px)

Citation preview

Page 1: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

BINOMIALBINOMIAL

DISTRIBUTIONDISTRIBUTION

AND ITSAND ITS

APPLICATIONAPPLICATION

Page 2: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Binomial DistributionBinomial Distribution

The binomial probability The binomial probability density functiondensity function

–f(x) = f(x) = nnCCx x ppxx q qn-x n-x

for x=0,1,2,3…,nfor x=0,1,2,3…,n

= n! / (k! ( n-k)!) p= n! / (k! ( n-k)!) pxx q qn-x n-x

–This is called the This is called the binomial distributionbinomial distribution

Page 3: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Basic Probability Basic Probability ConceptsConcepts

Foundation of statisticsFoundation of statistics because of the concept of because of the concept of sampling and the concept of sampling and the concept of variation or dispersion and variation or dispersion and how likely an observed how likely an observed difference is due to chancedifference is due to chance

Probability statements used Probability statements used frequently in statisticsfrequently in statistics– e.g., we say that we are 90% e.g., we say that we are 90%

sure that an observed treatment sure that an observed treatment effect in a study is real effect in a study is real

Page 4: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Definition of ProbabilitiesDefinition of Probabilities If some process is repeated a If some process is repeated a

large number of times, n, and if large number of times, n, and if some resulting event with the some resulting event with the characteristic of E occurs m characteristic of E occurs m times, the relative frequency of times, the relative frequency of occurrence of E, m/n, will be occurrence of E, m/n, will be approximately equal to the approximately equal to the probability of E: probability of E: P(E)=m/nP(E)=m/n

Also known as Also known as relative relative frequencyfrequency

Page 5: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Elementary Properties of Elementary Properties of Probabilities - IProbabilities - I

Probability of an event is Probability of an event is a non-negative numbera non-negative number– Given some process (or Given some process (or

experiment) with experiment) with nn mutually exclusive mutually exclusive outcomes (events), Eoutcomes (events), E11, E, E22, ,

…, E…, Enn, the probability of , the probability of

any event Eany event Eii is assigned a is assigned a

nonnegative number nonnegative number

– P(EP(Eii) ) 00

Page 6: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Elementary Properties of Elementary Properties of Probabilities - IIProbabilities - II

Sum of the probabilities of Sum of the probabilities of mutually exclusive outcomes mutually exclusive outcomes is equal to 1is equal to 1– Property of exhaustivenessProperty of exhaustiveness

refers to the fact that the refers to the fact that the observer of the process must observer of the process must allow for all possible outcomesallow for all possible outcomes

– P(EP(E11) + P(E) + P(E22) + … + P(E) + … + P(Enn) = 1) = 1

Page 7: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Elementary Properties of Elementary Properties of Probabilities - IIIProbabilities - III

Probability of occurrence Probability of occurrence of either of two mutually of either of two mutually exclusive events is equal exclusive events is equal to the sum of their to the sum of their individual probabilitiesindividual probabilities– Given two mutually Given two mutually

exclusive events A and Bexclusive events A and B

– P(A or B) = P(A) + P(B)P(A or B) = P(A) + P(B)

Page 8: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Characteristics of ProbabilitiesCharacteristics of Probabilities

Probabilities are expressed as Probabilities are expressed as fractions between 0.0 and 1.0fractions between 0.0 and 1.0– e.g., 0.01, 0.05, 0.10, 0.50, 0.80e.g., 0.01, 0.05, 0.10, 0.50, 0.80– Probability of a certain event = 1.0Probability of a certain event = 1.0– Probability of an impossible event = Probability of an impossible event =

0.00.0

Application to biomedical Application to biomedical researchresearch– e.g., ask if results of study or e.g., ask if results of study or

experiment could be due to chance experiment could be due to chance alonealone

– e.g., significance level and powere.g., significance level and power– e.g., sensitivity, specificity, e.g., sensitivity, specificity,

predictive values predictive values

Page 9: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Examples:Examples:(1) Suppose we toss a die. What (1) Suppose we toss a die. What

is the probability of 4 coming is the probability of 4 coming up?up?

since there are six mutually since there are six mutually exclusive and equally likely exclusive and equally likely outcomes out of which 4 in outcomes out of which 4 in only one, the probability of 4 only one, the probability of 4 coming up is 1/6.coming up is 1/6.

(2) Suppose we toss 2 coins. We (2) Suppose we toss 2 coins. We can have the following can have the following outcomes: both heads, HH; outcomes: both heads, HH; one head and the other tail, one head and the other tail, TH or HT; and both tails, TT TH or HT; and both tails, TT (H=Head; T=Tail).(H=Head; T=Tail).

Suppose we want to know the Suppose we want to know the probability of HH.probability of HH.

HH being one of the four HH being one of the four equally likely outcomes, the equally likely outcomes, the probability of obtaining HH is probability of obtaining HH is ¼.¼.

Page 10: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

(3) Suppose we throw 2 dice (3) Suppose we throw 2 dice and we want the probability and we want the probability of a total of 7 points.of a total of 7 points.

A total of 7 can come in 6 A total of 7 can come in 6 ways ways

(1-6,2-5,3-4,4-3,5-2, or 6-1). (1-6,2-5,3-4,4-3,5-2, or 6-1). So the numerator will be 6. So the numerator will be 6. Since we have 6 sides for Since we have 6 sides for each die, the total number each die, the total number of ‘equally likely’ ‘mutually of ‘equally likely’ ‘mutually exclusive’ outcomes is 6 x exclusive’ outcomes is 6 x 6 =36. So the chance of 6 =36. So the chance of getting a total of 7 when we getting a total of 7 when we throw 2 dice is 6/36 (or 1/6).throw 2 dice is 6/36 (or 1/6).

Page 11: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Examples: Examples: (Addition Law) (Addition Law)

When we toss a die, what is the When we toss a die, what is the probability of getting 2 or 4 or probability of getting 2 or 4 or 6 ?6 ?

The prob. of 2 =1/6The prob. of 2 =1/6

The prob. of 4=1/6The prob. of 4=1/6

The prob. of 6=1/6The prob. of 6=1/6

Probability of 2 or 4 or 6 is:Probability of 2 or 4 or 6 is:

1/6 +1/6+1/6 = 3/6 = ½1/6 +1/6+1/6 = 3/6 = ½

(Multiplication Law)(Multiplication Law)

In tossing 2 coins,In tossing 2 coins,

Prob. of head in one coin =1/2Prob. of head in one coin =1/2

Prob. of head in another coin=1/2Prob. of head in another coin=1/2

Thus prob. of head in both coinsThus prob. of head in both coins

=1/2 x 1/2 =1/4=1/2 x 1/2 =1/4

Page 12: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

CombinationsCombinations

Based on last example, it is clear that Based on last example, it is clear that we need to calculate more easily the we need to calculate more easily the probability of a particular resultprobability of a particular result– If a set consists of n objects, and we If a set consists of n objects, and we

wish to form a subset of x objects wish to form a subset of x objects from these n objects, without regard from these n objects, without regard to order of the objects in the subset, to order of the objects in the subset, the result is called a combinationthe result is called a combination

The number of combinations of n The number of combinations of n objects taken x at a time is given byobjects taken x at a time is given by

– nnCCkk = n! / (k! ( n-k)!) = n! / (k! ( n-k)!)

– Where k! (factorial) is the product of Where k! (factorial) is the product of all numbers from k to 0all numbers from k to 0 0! = 10! = 1

Page 13: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

PermutationsPermutations

Similar to combinationsSimilar to combinations– If a set consists of n objects, and we If a set consists of n objects, and we

wish to form a subset of x objects wish to form a subset of x objects from these n objects, taking into from these n objects, taking into account the order of the objects in account the order of the objects in the subset, the result is called a the subset, the result is called a permutationpermutation

The number of permutations of n The number of permutations of n objects taken x at a time is given byobjects taken x at a time is given by

– nnPPkk = n! / ( n-k)! = n! / ( n-k)!

Page 14: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Probability distributions of discrete Probability distributions of discrete variablesvariables

A A table, graph, formula, or other table, graph, formula, or other devicedevice used to specify all possible used to specify all possible values of a values of a discrete random variablediscrete random variable along with their respective along with their respective probabilitiesprobabilities– P(X=x)P(X=x)

TablesTables – value, frequency, probability – value, frequency, probability Graph Graph – usually bar chart– usually bar chart FormulaFormula - Binomial distribution- Binomial distribution

Page 15: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 16: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Theoretical Probability Theoretical Probability DistributionsDistributions

-- If we know (reasonably) that data are -- If we know (reasonably) that data are from a certain distribution, than we know from a certain distribution, than we know a lot about ita lot about it

-- -- Means, standard deviations, other Means, standard deviations, other measures of dispersionmeasures of dispersion

– That knowledge makes it easier to make That knowledge makes it easier to make statistical inference; i.e., to test statistical inference; i.e., to test differencesdifferences

Many types of distributionsMany types of distributions

– 1300+ have been documented in the 1300+ have been documented in the literatureliterature

Three main onesThree main ones

– Binomial (discrete - 0,1)Binomial (discrete - 0,1)

– Poisson (discrete counts)Poisson (discrete counts)

– Normal (continuous)Normal (continuous)

Page 17: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Binomial DistributionBinomial Distribution

Derived from a series of binary outcomes Derived from a series of binary outcomes called a Bernoulli trialcalled a Bernoulli trial

When a random process or experiment, When a random process or experiment, called a trial, can result in only one of two called a trial, can result in only one of two mutually exclusive outcomes, such as dead mutually exclusive outcomes, such as dead or alive, sick or well, the trial is called a or alive, sick or well, the trial is called a Bernoulli trialBernoulli trial

Page 18: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Bernoulli ProcessBernoulli Process

A sequence of Bernoulli trials forms a A sequence of Bernoulli trials forms a Bernoulli process under the following Bernoulli process under the following conditionsconditions– Each trial results in one of two Each trial results in one of two

possible, mutually exclusive, possible, mutually exclusive, outcomes: “success” and “failure”outcomes: “success” and “failure”

– Probability of success, Probability of success, pp, remains , remains constant from trial to trial. Probability constant from trial to trial. Probability of failure is of failure is qq = 1- = 1-pp..

– Trials are independent; that is, Trials are independent; that is, success in one trial does not success in one trial does not influence the probability of success in influence the probability of success in a subsequent trial.a subsequent trial.

Page 19: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Bernoulli Process - ExampleBernoulli Process - Example

Probability of a certain sequence Probability of a certain sequence of binary outcomes (Bernoulli of binary outcomes (Bernoulli trials) is a function of trials) is a function of pp and and qq..

For example, a particular For example, a particular sequence of 3 “successes” and 2 sequence of 3 “successes” and 2 “failures” can be represented by “failures” can be represented by p*p*p*q*q; = pp*p*p*q*q; = p33qq22

However, if we ask for the However, if we ask for the probability of 3 “successes” and probability of 3 “successes” and 2 “failures” in a set of 5 trials, 2 “failures” in a set of 5 trials, then we need to know how may then we need to know how may possible combinations of 3 possible combinations of 3 successes and 2 failures out of successes and 2 failures out of all of the possible outcomes all of the possible outcomes there are. there are.

Page 20: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Parameters of Binomial Parameters of Binomial distributiondistribution

n (the number of objects) and p (the n (the number of objects) and p (the probability of a ‘success’) are the probability of a ‘success’) are the two unknown quantities which two unknown quantities which define a binomial distribution. define a binomial distribution. They are called the parameters They are called the parameters of the binomial distribution.of the binomial distribution.

The Binomial distribution is The Binomial distribution is applicable to the situation where:applicable to the situation where:

i)i) the n trails are independent (ie., the n trails are independent (ie., what occurs in one trail does not what occurs in one trail does not affect what will occur in the next affect what will occur in the next trail),trail),

ii)ii) at each trail there is only two at each trail there is only two possible outcomes (‘success’ or possible outcomes (‘success’ or ‘failure’)‘failure’)

iii)iii) the probability of a ‘success’ (p) the probability of a ‘success’ (p) should be known and is the should be known and is the same for all trailssame for all trails

Page 21: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Mean and Variance of the Mean and Variance of the Binomial distributionBinomial distribution

To obtain the frequency distribution for a To obtain the frequency distribution for a particular combination of ’ n ‘and ‘p ‘we particular combination of ’ n ‘and ‘p ‘we need to calculate the probabilities need to calculate the probabilities

p (X=0), p (X=2), ------, p (X=n)p (X=0), p (X=2), ------, p (X=n)Where X is the random variable representing Where X is the random variable representing

the number of ‘successes’ in ‘n’ trails. the number of ‘successes’ in ‘n’ trails. Where ‘n’ is large, the calculations of Where ‘n’ is large, the calculations of these probabilities becomes very tedious these probabilities becomes very tedious and time consuming.and time consuming.

However, we can obtain the mean and However, we can obtain the mean and variance of ‘X’ as a summary of the variance of ‘X’ as a summary of the distribution.distribution.

For a binomial distribution mean (For a binomial distribution mean ( ) ) is given is given by ‘np’ and the variance (by ‘np’ and the variance (22 ) ) is equal to is equal to

‘ ‘ np(1-p)’.np(1-p)’.The mean is the average value of the The mean is the average value of the

random variable that would be expected to random variable that would be expected to occur in the long run and the standard occur in the long run and the standard deviation is the expected variation from deviation is the expected variation from the meanthe mean

Page 22: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Binomial TableBinomial Table

Normally, we would look up Normally, we would look up probabilities in the Binomial probabilities in the Binomial TableTable

Tables of the Binomial Tables of the Binomial probability distribution functionprobability distribution function– P (X=k)P (X=k)– Find probability that x=4 successes Find probability that x=4 successes

when n trials = 10 and p of success when n trials = 10 and p of success = 0.3= 0.3

– Find probability that xFind probability that x44– Find probability that xFind probability that x55

Page 23: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 24: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 25: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

In medical research, an In medical research, an outcome of interest can outcome of interest can often be expressed as the often be expressed as the presence or absence of a presence or absence of a particular disease, sign or particular disease, sign or symptom or as whether the symptom or as whether the patient lived or died, or patient lived or died, or recovered or did not recover. recovered or did not recover. In each case we are dealing In each case we are dealing with an outcome in which with an outcome in which exactly one of two exactly one of two alternatives can occur.alternatives can occur.

Page 26: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

Suppose we know that the Suppose we know that the survival rate for a particular survival rate for a particular disease is 20% and we have disease is 20% and we have 10 patients with this disease. 10 patients with this disease. We would use the binomial We would use the binomial distribution to calculate the distribution to calculate the probability of having 3 or probability of having 3 or fewer patients survive. The fewer patients survive. The answer is 0.88, so that we answer is 0.88, so that we have about a 90% chance have about a 90% chance of having 3 or fewer patients of having 3 or fewer patients surviving (or 7 or more surviving (or 7 or more dying)dying)

Page 27: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 28: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 29: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for

(d) P( two or fewer) = P(X<=2)(d) P( two or fewer) = P(X<=2)

=1- P(x=3)=1- P(x=3)

=1-0.729=1-0.729

=0.271=0.271

(e)(e) P( two or three) = P(X=2 orP( two or three) = P(X=2 or

X=3)X=3)

=P(X=2) +P(X=3)=P(X=2) +P(X=3)

=0.972=0.972

(f) P( exactly three) = P(X=3)(f) P( exactly three) = P(X=3)

= 0.729= 0.729

Page 30: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 31: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 32: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 33: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for
Page 34: BINOMIALDISTRIBUTION AND ITS APPLICATION. Binomial Distribution  The binomial probability density function –f(x) = n C x p x q n-x for x=0,1,2,3…,n for