Binomial DistributionR Tip of the dayIntroductionBinomial distributionUsing the distributionDependence on n and pMean and standard deviationMore ExamplesRelated DistributionsGeometric DistributionHypergeometric DistributionSummaryAdditional problemsIntroductory Statistics LecturesBinomial DistributionFinding the probability of x successes in n trials.Anthony TanbakuchiDepartment of MathematicsPima Community CollegeRedistribution of this material is prohibitedwithout written permission of the author© 2009(Compile date: Tue May 19 14:49:27 2009)Contents1 Binomial Distribution 11.1 R Tip of the day . . . . 11.2 Introduction . . . . . . . 21.3 Binomial distribution . . 2Using the distribution . 3Dependence on n and p 4Mean and standard de-viation . . . . . . 5More Examples . . . . . 81.4 Related Distributions . . 9Geometric Distribution . 9Hypergeometric Distri-bution . . . . . . 91.5 Summary . . . . . . . . 101.6 Additional problems . . 101 Binomial Distribution1.1 R Tip of the dayCalculating with RIf you use R to do a statistical calculation, use the following steps:1. Determine which equation(s) you need to use.2. Define variables in R with data for all the variables in your equation.3. Type the equation into R.Example 1. Given x = {4, 2, 7, 8}, find q =√¯x − sR: x = c ( 4 , 2 , 7 , 8 )R: x . bar = mean ( x )R: s = sd ( x )R: q = s q r t ( x . bar − s )R: q[ 1 ] 1 . 5 7 9 912 of 12 1.2 Introduction1.2 IntroductionQuestion 1. For our class, 10 students wear corrective lenses and 8 do not.Find the probability of randomly selecting 4 students with replacement and 3of the 4 wear corrective lenses.1.3 Binomial distributionBinomial distribution.Definition 1.1The probability of x successes in n trials with p probability of successis given by the binomial probability distribution:P (x |n, p) =nCxpxq(n−x)(1)wherenCxis the number of ways you can choose x successes and n−xfailures in any order. The probability of failure is q = 1 − p.Anthony Tanbakuchi MAT167Binomial Distribution 3 of 12Requirements:1. Fixed number of trials n.2. Independent trials: p remains constant for each trial.If sampling w/o replacement & n/N ≤ 0.05 treat as independent.3. Trial has 2 possible outcomes. (Y/N, T/F, blue/not blue)USING THE DISTRIBUTIONCalculating binomial probabilityA slightly different question.For our class, 10 students wear corrective lenses and 8 do not. Find the prob-ability of randomly selecting 10 students with replacement and 9 of the 10 donot wear corrective lenses.Question 2. What does success represent?Question 3. Determine what the parameters are: x, n, pTwo methods to compute probability1. Use equation.2. Use R function dbinom() .Recall:Combinations:choose(n,x)FindsnCxR CommandQuestion 4. Write out the equation to solve the problem.Question 5. Use R as a calculator to solve the problem.Anthony Tanbakuchi MAT1674 of 12 1.3 Binomial distributionQuestion 6. Would it be unusual to observe 9 out of 10 students in our classnot wearing corrective lenses?Binomial distribution:dbinom(x, n, p)Finds the probability of x successes in n trials with p probabilityfor individual success.R CommandQuestion 7. Use the binomial distribution function in R to solve the problem.DEPENDENCE ON N AND PBinomial Distribution: dependence on nPlot of binomial distribution with varying n, fixed p = 0.5.Anthony Tanbakuchi MAT167Binomial Distribution 5 of 120 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 5,, p == 0.5))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 10,, p == 0.5))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 20,, p == 0.5))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 30,, p == 0.5))xPbinom((x))Binomial Distribution: dependence on pPlot of binomial distribution with fixed n = 20, varying p.0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 20,, p == 0.05))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 20,, p == 0.1))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 20,, p == 0.5))xPbinom((x))0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 20,, p == 0.95))xPbinom((x))MEAN AND STANDARD DEVIATIONMean of binomial distribution. Definition 1.2Anthony Tanbakuchi MAT1676 of 12 1.3 Binomial distributionµ =kXi=1xi· P (xi)=nXx=0x ·nCx· pxq(n−x)= npmean binomial µ = np (2)Represents the mean number of successes x in n trials.standard deviation of binomial distribution.Definition 1.3σ =vuutkXi=1(xi− µ)2· P (xi)=vuutnXx=0(x − µ)2·nCx· pxq(n−x)=√npqstandard deviation binomial σ =√npq (3)Represents the standard deviation of number of successes x in ntrials.Again, for our class, 10 students wear corrective lenses and 8 do not. Answerthe following questions if we randomly selecting 10 students with replacementand success represents not wearing corrective lenses..Question 8. Find the mean µ of the binomial distribution.Question 9. What does the mean represent?Anthony Tanbakuchi MAT167Binomial Distribution 7 of 12Question 10. Find the standard deviation σ of the binomial distribution.Question 11. What does the standard deviation represent?Question 12. What would be the usual number of successes we would expectusing the Empirical Rule?Visualizing µ and σ0 5 10 15 20 25 300.0 0.1 0.2 0.3 0.4Pbinom((x,, n == 10,, p == 0.44444))xPbinom((x))Anthony Tanbakuchi MAT1678 of 12 1.3 Binomial distributionMORE EXAMPLESDetermine if the binomial distribution applies to the following questions:Question 13. Find the probability of 3 left handed students when randomlyselecting 10 students from a class of 100 where 12 of them are left handedwithout replacement.Question 14. Find the probability of 3 left handed students when randomlyselecting 5 students from a class of 100 where 12 of them are left handed withoutreplacement.Question 15. 2% of Americans are ambidextrous. Find the probability of 3ambidextrous students when randomly selecting 10 students from a class of100 without replacement.Example 2 (A worked out problem.). 2% of Americans are ambidextrous. Findthe probability of 3 ambidextrous students when randomly selecting 10 studentsfrom a class of 100 without replacement.(1) Binomial distribution applies (2) Find parameters.R: x = 3R: n = 10R: p = 0 . 02(3) Use the binomial distribution functionR: dbinom (x , n , p )[ 1 ] 0. 000 83 34Example 3 (A worked out problem.). For our previous example, what is theprobability of 3 or less ambidextrous students in 10?(1) Binomial
View Full Document