Chapter 2 The Binomial Distribution

advertisement
Chapter 2
The Binomial Distribution
Course Website: www.math.mun.ca/~sneddon/st2500
These handouts are modifications of lab notes prepared by Lauren Granter.
Minitab can be used to compute probabilities for many distributions. During our next
two lab sessions, we will look in detail at one discrete and one continuous distribution as
examples: the binomial and normal distributions.
2.1
Binomial Distribution
Recall our notation from class. If x comes from a binomial distribution, we can write
x ∼ bin(n, p).
Minitab can compute probabilities in two forms when dealing with the binomial distribution:
1. A probability p(x).
2. A cumulative probability: P (x ≤ value), where value is some number.
This means a problem in another form (such as P (x > 12)) would have to be rewritten
in such a way so that we can use one of the two forms above.
2.1.1
Find Probabilities and Cumulative Probabilities
EX: It’s a long-standing belief that business students hate stats. In fact, it’s often assumed
that 80% of business students hate stats. Suppose a random sample of 37 business students
is selected. What is the probability that:
1. 20 of them hate stats?
2. at most 30 of them hate stats?
1
3. at least 15 of them hate stats?
4. more than 21, but less than 29, hate stats?
First, we should verify (you would only write this down if asked in a question) why this
is a binomial problem. It is because it satisfies the four conditions discussed in class: (1) we
have a fixed number of observations (n = 37); (2) there are only 2 outcomes (hate stats or
not); (3) we know P(Hate stats) = 0.8, and it is the same for each person; (4) the subjects
are independent, since we have a random sample.
If we let
x = number that hate stats, then x ∼ bin(37, 0.8)
Let’s look at each part of the example.
1. 20 of them hate stats. This means we need to find P (x = 20). We do this as follows:
(a) Click the following menus Calc - Probability Distributions - Binomial
(b) Select Probability at the top,
(c) Plug in 37 as Number of Trials (this is n) and 0.8 as Probability of Success
(this is p).
(d) Select Input constant at the bottom and plug in 20 in the space after it.
(e) Click OK.
We get the following output in the Session window:
Probability Density Function
Binomial with n = 37 and p = 0.8
x
20
P( X = x )
0.0002404
This tells us that P (x = 20) = p(20) = 0.0002404.
2. at most 30 of them hate stats.
at most 30 means there could be 30, or something less than that. So we need to find
P (x ≤ 30). This is a cumulative probability. We do this as follows:
(a) Click the following menus Calc - Probability Distributions - Binomial
(b) Select Cumulative Probability at the top,
(c) Plug in 37 as Number of Trials (this is n) and 0.8 as Probability of Success
(this is p).
2
(d) Select Input constant at the bottom and plug in 30 in the space after it,
(e) Click OK.
We get the following results in the Session window:
Cumulative Distribution Function
Binomial with n = 37 and p = 0.8
x
30
P( X <= x )
0.630172
So P (x ≤ 30) = 0.630172.
3. at least 15 of them hate stats.
at least 15 means there could be 15, or something more than that. So we need to
find P (x ≥ 15).
Problem: This is not in one of the two forms that Minitab needs, as stated on p. 1.
We will need to rewrite P (x ≥ 15) in a different way to make Minitab happy. How
will we do that? We’ll leave some space to fill in the details.
3
4. more than 21, but less than 29, hate stats?
This may be the trickiest one yet. We need the probability of falling between two
numbers: P (21 < x < 29). Again, it’s not in one of the two forms that Minitab needs.
How will we solve it?
Again, we’ll leave some space to solve it together in the lab.
2.1.2
Plotting the Binomial Distribution
In class we mentioned that a discrete probability distribution can be expressed as a graph,
table or formula. For the binomial distribution we have focused on the formula
P (x) =
n!
px (1 − p)n−x
x!(n − x)!
We can also look at a graph of a binomial distribution to see what the probability
distribution looks like, and to see how it changes with n and p.
We’ll look at the following cases:
1. Suppose x ∼ bin(10, 0.6).
First, under C1, type in the numbers 0, 1, . . . , 10 and label this column x. This represents all the values x can take on for a binomial distribution with n = 10. Next, we’ll
find the probability of each of these values happening. We do this almost the same
way as before:
(a) Click the following menus Calc - Probability Distributions - Binomial
(b) Select Probability at the top,
(c) Plug in 10 as Number of Trials and 0.6 as Probability of Success.
4
(d) Select Input column, use the mouse button to active the box beside it, then
click on C1 and Select.
(e) In the Optional storage box, type in C2.
(f) Click OK.
In C2, what we have listed is P (x = 0), P (x = 1),. . ., P (x = 10). Now we can
construct a bar chart of the x and P (x) values. We do this as follows:
(a) Click the following menus Graph - Bar Chart
(b) Under Bars represent, choose Values from a table, choose the picture marked
Simple, and hit OK.
(c) For Graph Variables, select C2, and for Categorical Variable, select C1,
then hit OK.
What do we see? We see the largest bar is at x = 6, and the entire graph may be
slightly skewed left.
Now try the following cases on your own. You can write in the space below what you
observe in the graphs.
2. x ∼ bin(10, 0.2).
3. x ∼ bin(15, 0.3).
4. x ∼ bin(15, 0.7).
5
Download