Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Probabilistic context-free grammar wikipedia , lookup
Infinite monkey theorem wikipedia , lookup
Random variable wikipedia , lookup
Probability box wikipedia , lookup
Birthday problem wikipedia , lookup
Conditioning (probability) wikipedia , lookup
Inductive probability wikipedia , lookup
Law of large numbers wikipedia , lookup
Binomial Distribution We begin our study on the Binomial Distribution with an introduction to Bernoulli trials. Jakob Bernoulli was a mathematician who advanced the understanding of probability theory. Today we associate his name most often with Bernoulli trials, a probability term describing events with exactly two possible outcomes, such as heads and tails. In Bernoulli trials the probability remains constant from trial to trial, and trials are independent of one another. If we add to this another condition – a fixed number of trials - we now meet the conditions of a special type of setting known as a “binomial setting”. If an event is part of a binomial setting then the probability can be found using a special formula. A series of random variables from this setting formed into a distribution is known as a “binomial distribution We can now determine if an event follows a binomial setting if we combine the Bernoulli trials and add a condition that the number of trials be fixed. A situation is binomial if: • Each observation (trial) has only two possible outcomes, called success and failure • The probability of success, we’ll call it p, is the same for each observation (trial). • Each observation (trial) is independent. • The number of observations (trials) is fixed. If the event is binomial, then we can create a random variable distribution (remember that from Module 7?) and use that distribution to solve problems. Consider the random event with two possible outcomes, such as heads and tails, from tossing a coin four times. Each toss is independent of every other toss and probability is constant (i.e., the probability of Heads is the same each toss). Also, there are a fixed number of tosses (four) which means that there is a fixed number of trials. So, the event “tossing a coin” meets the condition of a binomial setting. Suppose we define X to be the number of heads in a series of 4 tosses. Let’s make a distribution (table) of the random variable and each outcome X 0 1 2 3 4 p(x) Do you see why we use the numbers 0 through 4? We are interested in the number of heads in four tosses. It is possible that there are no (0) heads out of four, or only 1 head out of four, or only 2 heads out of four, etc. Notice also that the random variables are filled in but the probabilities are not? Can we find those probabilities? Well, let’s find them using the concepts we learned from Chapter 6. We are tossing four coins so the sample space looks like: HHHH HTHH THHT THHH HHHT HHTH HTTH TTHH HHTT THTH TTHT TTTH HTTT HTHT THTT TTTT So, there are 16 possible combinations. How many of the sixteen have no heads? Only one, so P(0) = 1/16 = 0.0625. How many of the sixteen have only one head? Four meet that condition, so P(3) = 4/16 = 0.25. We can extend that process to come up with all of the probabilities. X 0 1 2 3 4 p(x) 0.0625 0.2500 0.375 0.2500 0.0625 Notice this is a legitimate probability distribution because 1) every probability is between 0 and 1 and 2) the sum of the probabilities is 1. It was also possible to find each probability by using a formula known as the binomial probability formula. This formula is based around a way of counting known as “combinations”. You may have studied them in previous math classes. If not, then you may want to look it up on your own in a math book or on an internet website. It is beyond the scope of this class to teach that material. The formula for finding the probability of any given random variable k is n k P( X k ) p (1 p) ( n k ) k Where n represents the number of observations in the setting, k represents the random variable of interest, p represents the probability of success and (1-p) represents the probability of failure. Also, n is the symbol for “n choose k”. It represents the combination. k So, in the example above we could have found P(X= 0) using the formula as follows: n k P( X k ) p (1 p) ( nk ) k 4 (0.5) 0 (1 0.5) ( 40 ) 0 (1)(1)(0.0625) 0.0625 HINT: you can always find 4 0 n k by using your calculator. For example, to get you type in 4, then MATH, then arrow over to PRB, then arrow down to 3, then press ENTER, then 0, then press ENTER. You should see that The answer is 1. We can follow the same method to get all of our probabilities through use of the formula. I can almost hear you say, “that’s complicated!” I tell you that I agree! One thing that makes the binomial formula so nice to use is that the graphing calculator has this formula programmed already. And, truthfully, the formula is good to know and you may get a question about using it on a test (or even the AP Test) but it is not something that will kill your score by itself if you don’t know that much about it. Your calculator will do all of the calculating for you. The trick is in knowing how to use it. Let’s get all of the probabilities from the table above by using the calculator. Go into L1 and enter {0,1,2,3,4}. Now press <2nd> <DISTR> <0:binompdf(> Now type 4,0.5,L1)L2. Now check the values in L2. What you just did was create probabilities for the coin flip problem from above….all in one table. Your finished work should look like this: We can also use this same process to find a single value. Suppose we have a binomial situation where we have six observations (trials) and our probability of success is 0.2. Suppose also that we are interested in finding the probability at 3 (i.e., P(X=3)). To find the binomial probability for n=6, p=.2, X=3, use the command binompdf(6,.2,3). The probability is .08192. Notice that the general way to find the binomial probability P(X=k) you use the command binompdf(n,p,k). See that we can make a single calculation readily using binompdf. Pdf stands for probability density function. When dealing with discrete distributions like the binomial, a calculation of a pdf will give us a probability at exactly one random variable. Sometimes we need to know the sum of two or more probabilities. For example, what if we changes our probability above from P(X=3) to P(X < 3). Notice that we are now interested in the probability of getting less than three, rather than exactly 3. When this type of problem arises we can use a cdf with the binomial distribution, but the calculator defines it a little differently. It sums all the probabilities for X=0 up to X= the given value of X. Let’s create a table using the “n=6, p=.2, X=3,” binomial information we were given earlier. X p(x) 0 1 2 3 4 0.2621 0.3932 0.2458 0.0820 0.0154 5 6 0.0015 0.00006 (notice the probability values do not add to precisely 1, that is because they have all been rounded) To find P(X< 3) what we want to do is add P(X = 0) with P(x = 1) and P(X = 2). We can let our calculator do this by using the binomcdf command. To do this press 2nd, then Vars, then scroll to binomcdf, then press ENTER and type in 6, 0.2 and 2. Why “2”? Because the binomcdf command will always add up the probabilities from the lowest random variable in the distribution through the last one of interest. We are interested in finding P(X < 3) so “X=3” is not included in our table