("oa —p)""
where || is the "floor" under k, i.e. the greatest integer less than or equal to k.
It can also be represented in terms of the regularized incomplete beta function, as
follows:
F(k;n,p) = Pr(X < k)
= h(n kk +1)
mon) [”
‘Some closed-form bounds for the cumulative distribution function are given below.
Example
‘Suppose a biased coin comes up heads with probability 0.3 when tossed. What is the
probability of achieving 0, 1..., 6 heads after six tosses?
AL — t)F dt
Pr(0 heads) = f(0) = Pr(X =0) = (p)ase 03)" x 0.1176
6)
1
6
Pr(1 heads) = f(1) = Pr(X = 1) = oata—o3y 3 0.3025,
Pr(2 heads) = (2) = Prix =2) = (})os%(1—03)%* 0.3241
2
Px(3 heads) = #(2)= Pr(xX =3) = ($)o3%(1—03)° ~ 0.1852
6
a0)
(4 hens) = f(a) = Prix = 4) = (034 03y"-+~ 0.095Probabiity Distributions
Pr(5 heads) = f(5) = Pr(X =5) = (
oat 0ay'-* = oon
Py (6 heads) = (6) = Pe(X =6) = (F
oat a —0ay-*= 0.0007
‘Mean
IfX~ B(n, p), that is, X is a binomially distributed random variable, n being the total
number of experiments and p the probability of each experiment yielding a successful
result, then the expected value of X is:
E[X] = np.
(For example, if n=100, and p=1/4, then the average number of successful results
will be 28)
Proof: The mean yi can be directly calculated from its definition jt = 3x, and
the binomial theorem:
de({)ra-ne
Sop Ma! in-t)-(k-
ve eR ere?
ay (n—1t fot in=t)-(e-
"Ll ie-y-G-e-r Co
wy (; 7 eta - pete)
n-1
€
ota =p)" with (= k= 1
It is also possible to deduce the + mean from — the
equation X= X,+X,+..+X, whereby all X, are Bernoulli distributed random
variables with E[X,]= p. We get
E[X] = E[Xi+Xat...+Xu] = E[Xi]+E(Xa]+.. + EX] = Bt vt. + B= np
Variance
The variance is:
Var[X] = np(1- p)
Proof: Let X=X,+X;+..+X, with all X, be Lid Bernoulli distributed random
variables. We get because of Var(X,)= pq
Var(X) = Var(Xit- +X)
Var( Xi) 4+-4+-Var(Xq) = 0 Var(
np(1—p) = npg
65
Notes66
Notes
Statistics for management
Mode
Usually the mode of a binomial B(n,p) distribution is equal tol(” + 1)P, where Lis
the floor function.
However when (n + 1)p is an integer and p is neither 0 nor 1, then the distribution
has two modes: (n+ 1)p and (n + 1)p ~ 1. When p is equal to 0 or 1, the mode will be 0
land n correspondingly. These cases can be summarized as follows’
Uin+ Dp] if (n+ 1)p is 0 or a noninteger,
mode = {(n+1)p and (n+1)p—1 if (n+1)pe {1,...n}
n if (n+1)p=n41
Proof Let f(k) -(More For p=0 only (0) has @ nonzero value with f0)=1 and
for p=1 we find fin)=1. and f{k)=0 for k + n.. This proves that the mode is 0 for p=0 and
for p=1
Akt) (n-kyp
Let 0 (n+1)p—1=> anys < ae
k= (n+1)p—1= dey = au
k< (n+ 1)p—1 aug > a
So when (n+1)p—1 is an integer, then (n+1)p—1 and (n+1)p is a mode. In the case
that (n1)p-1 (n+ 1)p-1¢ 2, then only |(n+1)p—4]+1=[(n-+1)p| is a mode,
Median
In general, there is no single formula to find the median for a binomial distribution, and it
may even be non-unique. However several special results have been established:
If np is an integer, then the mean, median, and mode coincide and equal np.
Any median m must lie within the interval :mp sm < Imp)
A median m cannot lie too far away from the mean: jm np| < ming. In 2, max
{p. 1- p}}.
The median is unique and equal tom = round(np) in cases when either ps 1 -
In 2or pz In 2or |m~np| = minp, 1 ~ p} (except for the case when p= % and nis
odd).
When p = 1/2 and nis odd, any number m in the interval 24(n ~ 1) ms ¥4(n + 1) is
‘a median of the binomial distribution. If p = 1/2 and n is even, then m = n/2 is the unique
median,
Covariance between two binomials
If two binomially distributed random variables X and Y are observed together,
estimating their covariance can be useful. Using the definition of covariance, in the
case n= 1 (thus being Bernoulli trials) we have
Cov(X,Y) = E(XY)- xy
The first term is non-zero only when both X and Y are one, and ux and pY are
equal to the two probabilities. Defining pB as the probability of both happening at the
same time, this givesProbability Distributions
Cov (X, ¥) = pB — pxpy,
and for n independent pair wise trials
Cov (X, Y)q = n(pB — px py).
IfX and Y are the same variable, this reduces to the variance formula given above,
Related distributions
‘Sums of binomials
fX~ Bin, p) and Y~ 8(m, p) are independent binomial variables with the same
probability p, thenX+Yis again a binomial variable; its distribution is,
Z=X+Y ~ Bin+m, p):
i “a-p" |
El(oe-ord[le
However, if X and Y do not have the same probability p, then the variance of the
‘sum will be smaller than the variance of a binomial variable distributed as B(n + m.D)
PZ
Conditional binomials
If X ~ B(n, p) and, conditional on X, Y ~ B(X, q), then Yis a simple binomial variable
with distribution,
Y~ Bn, pq).
For example imagine throwing n balls to a basket UX and taking the balls that hit
and throwing them to another basket UY. If pis the probability to hit UX then X ~ B(n, p)
is the number of balls that hit UX. Ifq is the probability to hit UY then the number of
balls that hit UY is Y ~ B(X, q) and therefore Y ~ B(n, pq)
Bernoulli distribution
‘The Bernoulli distribution is a special case of the binomial distribution, where n = 1
Symboiically, X~ B(1,p) has the same meaning as X~Bern(p). Conversely, any
binomial distribution, Bin, p), is the distribution of the sum of n Bernoulli trials, Bern(p),
each with the same probability p.
Poisson binomial distribution
‘The binomial distribution is @ special case of the Poisson binomial distribution, which is
a sum ofn independent non-identical Bemoulli trials Bemn(pi). IfXhas the Poisson
‘binomial distribution with p, =... = p, =p then X ~ B(n, p).68
Notes
Statist for management
Normal approximation
— Normal pf,
Binomial p.m-f.
Figure 3.4: Binomial probability mass function and normal probability density
function approximation for n= 6 and p= 0.5
If nis large enough, then the skew of the distribution is not too great. In this case a
reasonable approximation to B(n, p) is given by the normal distribution
N(np,ynp(t—p)),
and this basic approximation can be improved in a simple way by using a
Suitable continuity correction. The basic approximation generally improves asin
increases (at least 20) and is better when pis not near to 0 or 1. Various rules of
thumb may be used to decide whether n is large enough, and p is far enough from the
extremes of zero or one:
One rule is that both x=np and n(1-p) must be greater than §. However, the
specific number varies from source to source, and depends on how good an
approximation one wants; some sources give 10 which gives virtually the same results
2 the following rule for large n until n is very large (ex: x=11, n=7752).
A second rule is that for n > 5 the normal approximation is adequate if
EB
Another commonly used rule holds that the normal approximation is appropriate
only if everything within 3 standard deviations of its mean is within the range of possible
values, that is if
1430 = np+3ynp(t—p) < [0.n],
The following is an example of applying a continuity correction. Suppose one
wishes to calculate Pr(X <8) for a binomial random variable X. If Y has a distribution
given by the normal approximation, then Pr(X = 8) is approximated by Pr(Y < 8.5), TheProbabiity Distributions
addition of 0.5 is the continuity correction; the uncorrected normal approximation gives
considerably less accurate results.
This approximation, known as de Moivre-Laplace theorem, is a huge time-saver
when undertaking calculations by hand (exact calculations ‘with largenare very
onerous): historically, it was the first use of the normal distribution, introduced in
Abraham de Moivre’s book The Doctrine of Chances in 1738. Nowadays, it can be seen
as a consequence of the central limit theorem since B(n, p) is a sum of n independent,
identically distributed Bernoulli variables with parameter p. This fact is the basis of
a hypothesis test, a "proportion ztest”, for the value of pusing xin, the sample
proportion and estimator of p, in a common test statistic.
For example, suppose one randomly samples n people out of a large population
and ask them whether they agree with a certain statement. The proportion of people
who agree will of course depend on the sample. If groups of n people were sampled
repeatedly and truly randomly, the proportions would follow an approximate normal
distribution with mean equal to the true proportion p of agreement in the population and
with standard deviation o = p(t p)
Poisson approximation
The binomial distribution converges towards the Poisson distribution as the number of
trials goes to infinity while the product np remains fixed. Therefore the Poisson
distribution with parameter A= np can be used as an approximation to B(n,p) of the
binomial distribution if nis sufficiently large and p is sufficiently small. According to two
ules of thumb, this approximation is good ifn 220 andp<0.05, or ifn 100
and np 5 10,
Limiting distributions
Poisson limit theorem: As n approaches = and p approaches 0 while np remains fixed
at A> 0 or at least np approaches A> 0, then the Binomial(n, p) distribution approaches
the Poisson distribution with expected value A
de Moivre-Laplace theorem: As n approaches = while p remains fixed, the distribution
of
X=n)
vinp(tp)
approaches the normal distribution with expected value 0 and variance 1. This result is
sometimes loosely stated by saying that the distribution of X is asymptotically
normal with expected value np and variance np(1 ~ p). This result is a specific case of
the central limit theorem.
Beta distribution
Beta distributions provide a family of conjugate prior probability distributions for binomial
distributions in Bayesian inference. The domain of the beta distribution can be viewed
as a probability, and in fact the beta distribution is often used to describe the distribution
of a probability value p:
op) = 2 py
PRP" Ba 8)
Using Excel to compute the binomial distribution
‘Suppose an experiment has the following characteristics
69
Notes70
Notes
Statistics for management
The experiment consists of n independent trials, each with two mutually exclusive
outcomes (success and failure)for each trial the probability of success is p (and so the
probability of failure is 1 ~)
Each such trial is called a Bernoulll trial, Letx'be the discrete random variable
‘whose value is the number of successes inntrials. Then the probability distribution
function [Link] called the binomial distribution, 6(n, »), and is defined as follows:
FQ) = C(n,x)p* (1 — py"
where C(n, x)= *!9—%)! and nl = n(n—t)(n-2)-3-2-1
(n, x) can be calculated by using the Excel function COMBIN(”,).
Observation: Figure below shows a graph of the probability density
funetion for (10, .26).
Binomial Distribution (n = 20, p = .25)
0 12.3 4 5 6 7 8 9 10111213 1615 16 17 18 19 20
Figure 3.5: Binomial distribution
That the graph looks a lot like the normal distribution is not a coincidence.
Property
Mean = npVar = np(1—p)
Excel Function: Excel provides the following functions regarding the binomial
distribution:
BINOMDIST(x, », p, cum) wheren= the number of trials, p
success for each trial and cum takes the value TRUE or FALSE,
the probability of
BINOMDIST(x, n, p, FALSE) = probability density function Ax) value atxfor the
binomial distribution s(n, p), ie. the probabilty that there are: successes inn trials
where the probability of success on any trial isp.
BINOMDIST(x, n, p, TRUE) = cumulative probability distribution r(x) value atx for
the binomial distribution 2(n, p), i.e. the probability that there are at most x successes
in n trials where the probability of success on any trial isp.
‘Suppose we want to find out the probability of 530 or more successes out of 1000
trials ifthe true probability of success on any trial was 50%,Probability Distributions
We want to compute P(X > 530), but Excel will only compute probabilities of the
form P(X530) = 1- P(X <529), we compute P(X < 529) using
the BINOMDIST function
Enter 29 for Number_s
1000 for Trials
5 for Probability_s
‘TRUE for Cumulative (FALSE will give P(x = §29))
P(X > 530) = 1 - P(X < 529) = 1 - 0.969 = 0.031
w Bs] c¢ | oO ea
4 [PEROMOSTER 100.5 TRUE)
2
3) [snows
ja) ‘Numbers [529 |= 529
fs: ‘Wal [ec |= 100
7 |, Probabaity_s [5 US
[| || cumtatefece ——__J= ue
3 J
10) = 0.96e800402
12 | ene te ta om ero oa.
12 Cumulative is 2 logea vaive: For the cumulative distribution function, use TRUE; for
13 theory mss fat, wa PASE
14, | Bl ramdreut-ossmonz (eT) _ con
Figure 3.6: Use of BINOMDIST function
CRITBINOM(n, p, 1 —«) = critical value; Le. the minimum value of xsuch that F(x) =
‘1-a, where Fis the cumulative binomial distribution function for B(n,p)
Excel 2010/2013 provide the following additional functions: [Link]. which is
equivalent to BINOMDIST, and [Link], which is equivalent to CRITBINOM
Excel 2013 introduces the following new function (where x s y
[Link](n, p, x,y) = the probability there are between xand y
successes (inclusive) in n trials where the probability of success on any trial is p|
Thus, [Link](n, p, xy) = BINOMDIST\y,n, p, TRUE) -
BINOMDIST(x-1,n, p, TRUE) ifx> 0 and [Link](a, p.0. y) =
BINOMDISTYy, n, p, TRUE). The y parameter may be omitted, in which case
[Link](), p, x) = BINOMDIST(x, n, p, FALSE),
Example: What is the probability that if you throw a die 10 times it will come up six 4
times?
We can model this problem using the binomial distribution 5(10, 1/6) as follows
‘1) r
1) = c(10,4)(Z) (1-3) = 0054266
Altematively the problem can be solved using the Excel function
BINOMDIST(4, 10, 1/6, FALSE) = 0.054266,
The exact binomial distribution
What is the chance of exactly 16 heads out of 20 tosses?
71
Notes72
Notes
Statistics for management
If we assume that the coin toss is fair and the results are recorded properly, the
results will follow what is called a binomial distribution. The equation that describes the
binomial distribution is built-in to Excel:
=BINOMDIST(16,20,0.5, FALSE)
That formula answers this question: What is the chance of getting exactly 16
‘successes’ out of 20 tries, when the probability of success is 0.5 (since 50% of fair coin
tosses are heads)? The answer is 0.46%, or about one time in 200.
The cumulative binomial distribution
The chance of observing 16 heads out of twenty coin flips is about 1 in 200. That's
pretty rare, But itis the answer to the wrong question. If we had observed 17 heads, we
would have been even more surprised. So we need to add to the probabilly we
calculated the chance of observing 17, 18, 19 or 20 heads. One way to do this is to use
a formula similar to the one shown above (but changing "16' to the other values) and
‘adding up the probabilities. Another way is to use this Excel formula:
=1-BINOMDIST(15,20,0.5,TRUE)
With the last argument to the function set to True, that function retums the
probability of getting 15 or fewer successes out of 20 tries when the probability of
success is 0.5. Subtract that result from 1 to get the probability of getting 16 or more
successes. So to switch from calculating an exact probability to a cumulative one, we
had to change the last argument to Excel's function from False to True, and also had to
change the first value from 16 to 15
The answer is 0.59%,
Newer functions in Excel 2010 and later
Microsoft has created a new set of statistical functions introduced in Excel 2010. All of
these use two (or more) word function names separated by period. The example at the
top of this page is written as:
=[Link](16,20,0.5, FALSE)
In some cases, the newer functions are more accurate than the older ones, so it is,
sensible to use them,
3.4 Poisson Distribution
The Poisson distribution, is named after French mathematician Siméon Denis Poisson,
is a discrete probability distribution that expresses the probability of a given number of
events occurring in a fixed interval of time andior space if these events occur with a
known average rate and independently of the time since the last event. The Poisson
distribution can also be used for the number of events in other specified intervals such
as distance, area or volume,
For instance. an individual keeping track of the amount of mail they receive each
day may notice that they receive an average number of 4 letters per day. If receiving
any particular piece of mail doesn't affect the arrival times of future pieces of mail, ie., if
pieces of mail from a wide range of sources arrive independently of one another, then a
reasonable assumption is that the number of pieces of mail received per day obeys a
Poisson distribution.
Other examples that may follow a Poisson: the number of phone calls received by a
call center per hour, the number of decay events per second from a radioactive source,
or the number of pedicabs in queue in a particular street in a given hour of a day.
The Poisson distribution is popular for modeling the number of times an event
‘occurs in an interval of time or spaceProbability Distributions
Examples
‘The Poisson distribution may be useful to model events such as
'* The number of goals scored in a World Cup soccer match
'* The number of meteors greater than 1 meter diameter that strike earth per year
‘® The number of occurrences of the DNA sequence "ACGT” in a gene
‘* The number of patients arriving in an emergency room between 11 and 12 pm
‘Assumptions: When is the Poisson distribution an appropriate model?
The Poisson distribution is an appropriate model if the following assumptions are
true.
‘* Kis the number of times an event occurs in an interval and K can take values 0, 1,
2,
'* The occurrence of one event does not affect the probability that a second event will
‘occur. That is, events occur independently
‘© The rate at which events occur is constant. The rate cannot be higher in some
intervals and lower in other intervals.
© Two events cannot occur at exactly the same instant,
‘© The probability of an event in an interval is proportional to the length of the interval.
‘© If these conditions are true, then K is a Poisson random variable, and the
distribution of K is a Poisson distribution,
Probability of events for a Poisson distribution
‘An event can occur 0, 1, 2, ... times in an interval. The average number of events in an
interval is designated 2. (lambda). Lambda is the event rate, also called the rate
parameter. The probability of observing k events in an interval is given by the equation
ye
P(k events in interval) =
where
© 2. is the average number of events per interval
@ is the number 2.71828... (Euler's number) the base of the natural logs
k takes values 0, 1, 2,
Ktis the factorial of k= K* (K-1)* (K-2)...° 274
This equation is the probability mass function (PMF) for a Poisson distribution.
Examples of probability for Poisson distributions
On a particular river, overflow floods occur once every 100 years on average. Calculate
the probability of k = 0, 1, 2, 3, 4, 5, or 6 overfiow floods in a 100-year interval,
‘assuming the Poisson model is appropriate.
Because the average event rate is one overflow flood per 100 years, lambda
wer _te!
P(k overflow floods in 100 years)
Pe
O overfiow floods in 100 years)
73
Notes74
Notes
Statistics for management
P(k = 2 overflow floods in 100 years) 184
a 2
The table below gives the probability for 0 to 6 overflow floods in a 100 year period.
Table 3.1: probability for 0 to 6 overflow floods in a 100 year period.
| PU overtow foods in 100 years)
0 | 0368
1 [0368
o.te4
0.061
0.003
0.0005
2
3
4|oo1s
5
6
Ugarte and colleagues report that the average number of goals in a World Cup
soccer match is approximately 2.5 and the Poisson model is appropriate.
Because the average event rate is 2.5 goals per match, lambda = 2.5,
P(k goals in a match) = 25@ zs
P{k = O goals in a maten 2ee™ < 0.082
P(k = 1 goal in a match) = 2 ue ee 288 * 20.205,
P{k = 2 goals in amatch) = 22> - 628 _o 267
2I 2
The table below gives the probability for 0 to 7 goals in a match.
Table 3.2: Probably for 0 to 7 goals ina match
k | P(k goals in a World Cup soccer match)
0 | 0.082
1 | 0.205
0.287
0.213
0.138
0.087
0.028
7| 0.010
Once in an interval events: The special case of lambda = 1 and k
‘Suppose that astronomers estimate that large meteors (above a certain size) hit the
earth on average once every 100 years (lambda = 1 event per 100 years), and that theProbabiity Distributions
number of meteor hits follows a Poisson distribution. What is the probability of k = 0
‘meteor hits in the next 100 years?
fe
P{k = 0 meteor hits in next 100 years) = > ==
0.37
Under these assumptions, the probability that no large meteors hit the earth in the
next 100 years is p=0.37. The remaining 1 - 0.37 = 0.63 is the probability of 1, 2. 3, or
larger meteor hits in the next 100 years. In an example above, an overfiow flood
occurred once every 100 years (lambda = 1). The probability of no overfiow floods in
100 years was p = 0.37, by the same calculation.
In general, if an event occurs once per interval (lambda = 1), and the events follow
a Poisson distribution, then P(k = 0 events in next interval) = 0.37
As it happens, P(exactly one event in next interval) = 0.37, as shown in the table for
overflow floods.
Examples that violate the Poisson assumptions
The number of students who arrive at the student union per minute will ikely not
follow a Poisson distribution, because the rate is not constant (low rate during class
time, high rate between class times) and the arrivals of individual students are not
independent (students tend to come in groups).
The number of magnitude 5 earthquakes per year in California may not follow a
Poisson distribution if one large earthquake increases the probability of aftershocks of
similar magnitude.
Among patients admitted to the intensive care unit of a hospital, the number of days
that the patients spend in the ICU is not Poisson distributed because the number of
days cannot be zero. The distribution may be modeled using a Zero-truncated Poisson
distribution,
Count distributions in which the number of intervals with zero events is higher than
predicted by a Poisson model may be modeled using a Zero-inflated model.
Poisson regression and Negative binomial regression
Poisson regression and Negative binomial regression are useful for analyses where
the dependent (response) variable is the count (0, 1, 2, ...) of the number of events or
occurrences in an interval
‘The Excel POISSON Function
‘The Excel POISSON function calculates the Poisson Probability Mass Function or the
Cumulative Poisson Probability Function for a supplied set of parameters.
The format of the function is:
POISSON( x, mean, cumulative )
Where the function arguments are
75
Notes
Das könnte Ihnen auch gefallen