• Study Resource
• Explore

Survey

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Transcript
```3.6 Binomial probabilities
3.6.1 Binomial probabilities and random variables.
Binomial probabilities occur when we repeatedly do something that has two possible outcomes and we
count the number of times that one or the other outcome occurs.
Example 3.6.1. A bank customer has two options.
1.
Go into the bank
= g
2.
Use the drive through service = d
Suppose the probability that a customer goes into the bank is Pr{g} = 0.6 and the probability that the
customer uses the drive through service is Pr{d} = 0.4. Furthermore, suppose whether one customer
drives goes in is independent of what all the other customers do. Suppose we observe the next four
customers.
a.
What is the probability that exactly 2 of them go into the bank?
b.
More generally, what is the probability that exactly k of them go into the bank?
c.
What is the probability that at least 2 of them go into the bank?
d.
More generally, what is the probability that at least k of them go into the bank?
These are typical questions involving binomial probabilities. In order to answer these, let
X1, ..., Xn
=
a sequence of independent random variables each with two possible outcomes that we
take to be the numbers 1 and 0. Suppose that each of the random variables has the
same probability distribution.
We shall call 1 a success and 0 a failure and the observations of the value of any of the random variables a
trial. The probability of a success is the same for any trial. In Example 3.6.1 we have n = 4 and a success is
the customer going in and a failure is any customer driving through. Thus g corresponds to 1 and d
corresponds to 0 and Xk = 1 if the kth custormer goes in and Xk = 0 if the kth customer drives through.
(x1, ..., xn) =
{ X1 = x1, ..., Xn = xn } = a sequence of n values each of which could be 1 or 0. This
is a possible outcome of observing the outcomes of the n trials X1, ..., Xn. There
are 2n possible sequences.
In Example 3.6.1 where n = 4 there are 16 possible sequences, namely
0000
0001
0010
0011
0100
0101
0110
0111
1000
1001
1010
1011
1100
1101
1110
1111
p
=
Pr{Xk = 1} = the probability of success in any trial, i.e. the probability that any of
the random variables Xk takes on the value 1. In Example 3.6.1 one has
p = 0.6.
q
=
1 – p = Pr{Xk = 0} = the probability of failure in any trial, i.e. the probability that
any of the random variables Xk takes on the value 0. In Example 3.6.1 one
has q = 0.6.
3.6 - 1
Pr{ x1, ..., xn }
Pr{ X1 = x1, ..., Xn = xn } = Pr{X1 = x1} ... Pr{Xn = xn} = the probability
=
of an outcome (x1, ..., xn)
k n-k
pq
=
p (1 – p )n-k = the probability Pr{ x1, ..., xn } of any particular outcome (x1, ..., xn)
k
which has k successes and n – k failures. For example, in Example 3.6.1
one has Pr{ 1011 } = (0.6)3(0.4)
(nk )
=
n!
= Cn,k = the number of possible outcomes (x1, ..., xn) that has k of the
k! (n-k)!
values 1 and n-k of the values 0. This is also called the number of possible
combinations of n things taken k at a time or the binomial coefficient of n
things taken k at a time. See below for a derivation of this formula. In the
context of Example 3.6.1 the different outcomes where 2 or the 4 customers
4
4!
go in are 0011, 0101, 0110, 1001, 1010 and 1100. So 2  =
= 6.
2! (4-2)!
N
=
X1 + ... + Xn = the number of successes in n trials, i.e. the number of times the
outcome is 1 in the n observations X1, ..., Xn. N is a binomial random
variable.
n
k
( )p q
k n-k
=
n
k
( )p (1 – p )
k
n-k
= b(k; n, p) = Pr{ N = k } = the probability of k successes in n
trials. These are called binomial probabilities. This is the probability mass
function of N.
k
Fk
= F(k; n, p) = Pr{ N  k } = b0 + b1 + ... + bk =
 ( )p (1 – p )
n
j
j
n-j
= the
j=0
probability of no more than k successes in n trials. These is the cumulative
distribution function of N. In question a in Example 3.6.1 we want 1 - F54 ,
in question b we want 1 - Fk-1.
The answer to question a in Example 3.6.1 is
4
b2 = 2 (0.6)2(0.4)2 = 6(0.36)(0.16) = 0.3024).
4
The answer to b is bk = k (0.6)k(0.4)4-k. The answer to c is
4
4
4
b2 + b3 +b4 = 2 (0.6)2(0.4)2 + 3 (0.6)3(0.4)1 + 4 (0.6)4(0.4)0
= 6(0.36)(0.16) + 4(0.216)(0.4) + 0.1296 = 0.3024 + 0.3456 + 0.1296 = 0.777
Note that the mean of the binomial random variable N is
E(N) = E(X1 + ... + Xn) = E(X1) + ... + E(Xn) = np
since for each k we have
E(Xk) = 0 * Pr{Xk = 0} + 1 Pr{Xk = 1} = p
3.6 - 2
Problem 3.6.2. Suppose that customers that go into the bank require 2 minutes of time to service and
customers that drive through require 1 minute of time to service. What is the average time to serve 100
customers?
Example . A bakery is deciding how many loaves of its special raisin bread to bake each day. It costs
them 50 cents a loaf to make and they sell it retail for \$2.00 a loaf. Any loaves that are unsold at the
end of the day can be sold to a wholesaler for 20 cents a loaf. The bakery estimates that they have 50
customers each day and the probability that any particular customer will buy the raisin bread is 10%.
Furthermore, whether one customer buys the raisin bread is independent of whether any of the other
customers buy it. Treat this as a single period inventory problem to determine the optimal number of
loaves to bake each day.
The retail price r = 2, the wholesale price w = 0.5 and the salvage price s = 0.2. Let N be the number of
loaves they sell. N is a binomial random variable with n = 50
and p = 0.01. So the probability mass function of N is fk =
(50k )(0.1) (0.9)
k
n-k
and the cumulative distribution function is
k
Fk =
 fj. We should bake y loaves where y is the first value
j=0
such that Fy 
r-w
= 5/6  0.833. From the table at the right
r-s
k
0
1
2
3
4
5
6
7
8
9
10
fk
0.00515378
0.0286321
0.0779429
0.138565
0.180905
0.184925
0.154104
0.107628
0.0642779
0.0333293
0.0151833
Fk
0.00515378
0.0337859
0.111729
0.250294
0.431198
0.616123
0.770227
0.877855
0.942133
0.975462
0.990645
the first y such that Fy exceeds 5/6 is y = 7. So the bakery
should bake 7 loaves each day.
(n )
In order to derive the formula for k , we first need a brief discussion of permutations.
3.6.1 Permutations.
Sometimes when we make k observations (i1, ..., ik) we are only interested in the case where i1, ..., ik are all
distinct.
Example 3.6.2. How many 3 letter words can we make where all 3 letters are distinct? We can count
them as follows. We can choose the first letter arbitrarily. There are 26 possible choices. For each
choice of the first letter, there are 25 choices for the second letter if it is to be different from the first.
So there are (26) (25) two letter words where the 2 letters are different. For each of these we can
choose a third letter in 24 different ways so it is different from the first two. This gives
(26) (25) (24) = 15,600 three letter words which have all 3 letters distinct.
This example illustrates the following counting formula. Suppose we have n objects x1, ..., xn and we form
a vector (i1, ..., ik) using k of these where k  n. We are interested in the number of such vectors where
i1, ...ik are all distinct. Arguing as above, we see that the number of such vectors is n (n-1)...(n-k+1). This
number can be written as n!/(n-k)! and is called the number of permutations of n things taken k at a time.
Sometimes it is denoted by P(n,k). Thus
3.6 - 3
(1)
P(n,k) =
n!
(n-k)!
= number of ways of selecting k different items in order from n objects
= number of permutations of n things taken k at a time
An important special case is where k = n. A vector (i1, ..., in) which uses all of x1, ..., xn exactly once is just
a rearrangement of x1, ..., xn and is often called a permuatation of x1, ..., xn. The number of different
permuatations of x1, ..., xn is n!.
Example 3.6.3. Suppose a room has 17 people. What is the probability that the people have birthdays
which are all distinct?
We shall simplify the problem by assuming that none of them have birthdays which fall on February
29. If we number the people in some fashion from 1 to 17, then the birthdays of the 17 people can be
represented by a vector (b1, ..., b17), where each bi is the birthday of the i-th person and can have any of
365 values. So there are 36517 possible outcomes and we assume they are all equally likely. The
birthdays being all distinct corresponds to b1, ..., b17 being all distinct. By the paragraph above, the
number of vectors (b1, ..., b17) with this property is (365) (364) ... (349). So the probability that they
(365) (364) ... (349)
are all distinct is
= 0.685.
36517
Problem 3.6.2. A license plate has 3 letters followed by 3 digits. What is the probability that two or
more of the letters or digits are the same?
3.6.3 Combinations.
Here we are interested in the number of ways we can select k different objects from a set of n objects
without regard to order. Here is an example that illustrates this.
Example 3.6.4. How many ways can you choose 3 different letters from the 5 letters A, B, C, D, E? In
this case we can list the different ways as follows
ABC
ABE
ACE
BCD
BDE
ABD
ACD
BCE
CDE
In contrast, there are (5)(4)(3) = 60 three letter words which we can form using 3 different letters chosen
from A, B, C, D, E. There is a relationship between the 60 three letter words and the 10 ways to choose 3
letters from 5. Suppose we choose 3 letters from A, B, C, D, E. For example we might choose B, D, and E.
Then there are 3! = 6 different ways we can rearrange these to form 3 letter words with all letters different
(namely BDE, BED, DBE, DEB, EBD, EDB). Similarly, each choice of 3 letters from A, B, C, D, E gives
rise to 6 different 3 letter words. So
# different 3 letter words with all letters different =
3.6 - 4
(# ways to choose 3 letters) (# permutations of 3 letters)
i.e.
60 = (10) (6).
More generally suppose we want to count the number of different ways of selecting a set of k different
objects {i1, ..., ik} from a set of n items {x1, ..., xn}. In the last section this quantity was called the number
(n ) or C(n,k). It is also called the binomial
of combinations of n things taken k at a time and denoted by k
coefficient of n things taken k at a time. This is related to the number of different ways of selecting a vector
(i1, ..., ik) where i1, ..., ik are different elements of {x1, ..., xn}. Arguing as above, we have
# different vectors = (# ways to choose k objects) (# permutations of k objects)
i.e.
n!
= (# ways to choose k objects) = k!
(n-k)!
So,
(2)
(nk )
=
n!
= number of ways of selecting k objects from n
k! (n-k)!
= number of combinations of n things taken k at a time
Example 3.6.5. The Michigan State Lottery has a game called Super Lotto where six different balls
are drawn at random from a set of 47 balls numbered 1, 2, ..., 47. By (7.5), there are
47 = 47! = 47*46*45*44*43*42 = 10,737,573
6
6! 41!
6*5*4*3*2
ways to do this. Prior to the drawing, people may select their own set of six different numbers from the
numbers 1, 2, ..., 47. If their set of six numbers matches the ones drawn by the state, they win a big
prize. If we assume that each group of six different numbers is equally likely, then the probability of
winning is 1/10,737,573.
3.6 - 5
```
Document related concepts

Law of large numbers wikipedia, lookup

Elementary mathematics wikipedia, lookup

Inductive probability wikipedia, lookup

Birthday problem wikipedia, lookup

Foundations of statistics wikipedia, lookup

Negative binomial distribution wikipedia, lookup