Statistics for Beginners in Excel – Binomial Distribution

(Basic Statistics for Citizen Data Scientist)

Binomial Distribution

Definition 1: Suppose an experiment has the following characteristics:

  • 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 – p)

Each such trial is called a Bernoulli trial. Let x be the discrete random variable whose value is the number of successes in n trials. Then the probability distribution function for x is called the binomial distributionB(n, p), and is defined as follows:

Binomial distribution formula

where C(n, x) = frac{n!}{x!(n-x)!} and n! = n(n–1)(n–2)⋯3∙2∙1 .

C(n, x) can be calculated by using the Excel function COMBIN(n,x).

Observation: Figure 1 shows a graph of the probability density function for B(20, .25).

 

Figure 1 Binomial distribution

 

That the graph looks a lot like the normal distribution is not a coincidence

Property 1:
image506image507

Excel Function: Excel provides the following functions regarding the binomial distribution:

BINOMDIST(x, n, p, cum) where n = the number of trials, p = the probability of success for each trial and cum takes the value TRUE or FALSE.

BINOMDIST(x, n, p,  FALSE) = probability density function f(x) value at x for the binomial distribution B(n, p), i.e. the probability that there are x successes in n trials where the probability of success on any trial is p.

BINOMDIST(x, n, p, TRUE) = cumulative probability distribution F(x) value at x for the binomial distribution B(n, p), i.e. the probability that there are at most x successes in n trials where the probability of success on any trial is p.

CRITBINOM(n, p, 1 – α) = critical value; i.e. the minimum value of x such that F(x) ≥ 1 – α, where F is the cumulative binomial distribution function for B(n, p)

Excel 2010/2013 provide the following additional functions: BINOM.DIST, which is equivalent to BINOMDIST, and BINOM.INV, which is equivalent to CRITBINOM.

Excel 2013 introduces the following new function (where x ≤ y ≤ n):

BINOM.DIST.RANGE(n, p, x, y) = the probability there are between x and y successes (inclusive) in n trials where the probability of success on any trial is p

Thus, BINOM.DIST.RANGE(n, p, x, y) = BINOMDIST(y, n, p, TRUE) – BINOMDIST(x–1, np, TRUE) if x > 0 and BINOM.DIST.RANGE(n, p, 0, y) = BINOMDIST(y, n, p, TRUE). The y parameter may be omitted, in which case BINOM.DIST.RANGE(n, p, x) = BINOMDIST(x, n, p, FALSE).

Example 1: 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 B(10, 1/6) as follows

image515

Alternatively the problem can be solved using the Excel function:

BINOMDIST(4, 10, 1/6, FALSE) = 0.054266

 

Statistics with R for Business Analysts – Binomial Distribution

 

Statistics for Beginners in Excel – Binomial Distribution

Personal Career & Learning Guide for Data Analyst, Data Engineer and Data Scientist

Applied Machine Learning & Data Science Projects and Coding Recipes for Beginners

A list of FREE programming examples together with eTutorials & eBooks @ SETScholars

95% Discount on “Projects & Recipes, tutorials, ebooks”

Projects and Coding Recipes, eTutorials and eBooks: The best All-in-One resources for Data Analyst, Data Scientist, Machine Learning Engineer and Software Developer

Topics included: Classification, Clustering, Regression, Forecasting, Algorithms, Data Structures, Data Analytics & Data Science, Deep Learning, Machine Learning, Programming Languages and Software Tools & Packages.
(Discount is valid for limited time only)

Disclaimer: The information and code presented within this recipe/tutorial is only for educational and coaching purposes for beginners and developers. Anyone can practice and apply the recipe/tutorial presented here, but the reader is taking full responsibility for his/her actions. The author (content curator) of this recipe (code / program) has made every effort to ensure the accuracy of the information was correct at time of publication. The author (content curator) does not assume and hereby disclaims any liability to any party for any loss, damage, or disruption caused by errors or omissions, whether such errors or omissions result from accident, negligence, or any other cause. The information presented here could also be found in public knowledge domains.

Learn by Coding: v-Tutorials on Applied Machine Learning and Data Science for Beginners

Please do not waste your valuable time by watching videos, rather use end-to-end (Python and R) recipes from Professional Data Scientists to practice coding, and land the most demandable jobs in the fields of Predictive analytics & AI (Machine Learning and Data Science).

The objective is to guide the developers & analysts to “Learn how to Code” for Applied AI using end-to-end coding solutions, and unlock the world of opportunities!