Statistics for Beginners in Excel – Hypothesis Testing for Binomial Distribution

(Basic Statistics for Citizen Data Scientist)

Hypothesis Testing for Binomial Distribution

Example 1: Suppose you have a die and suspect that it is biased towards the number three, and so run an experiment in which you throw the die 10 times and count that the number three comes up 4 times. Determine whether the die is biased.

Define x = the number of times the number three occurs in 10 trials. This random variable has the binomial distribution  where π is the population parameter corresponding to the probability of success on any trial. We use the following null and alternative hypotheses:

H0π ≤ 1/6; i.e. the die is not biased towards the number 3
H1π > 1/6

Setting α = .05, we have

P(x ≥ 4) = 1–BINOM.DIST(3, 10, 1/6, TRUE) =  0.069728 > 0.05 = α.

and so we cannot reject the null hypothesis that the die is not biased towards the number 3 with 95% confidence.

Example 2: We suspect that a coin is biased towards heads. When we toss the coin 9 times, how many heads need to come up before we are confident that the coin is biased towards heads?

We use the following null and alternative hypotheses:

H0π ≤ .5
H1π > .5

Using a confidence level of 95% (i.e. α = .05), we calculate

BINOM.INV(n, p, 1–α) = BINOM.INV(9, .5, .95) = 7

which means that if 8 or more heads come up then we are 95% confident that the coin is biased towards heads, and so can reject the null hypothesis.

We confirm this conclusion by noting that P(x ≥ 8) = 1–BINOM.DIST(7, 9, .5, TRUE) =  0.01953 < 0.05 = α, while P(x ≥ 7) = 1–BINOM.DIST(6, 9, .5, TRUE) = .08984 > .05.

Example 3: Historically a factory has been able to produce a very specialized nano-technology component with 35% reliability, i.e. 35% of the components passed its quality assurance requirements. They have now changed their manufacturing process and hope that this has improved the reliability. To test this, they took a sample of 24 components produced using the new process and found that 13 components passed the quality assurance test. Does this show a significant improvement over the old process?

We use a one-tailed test with null and alternative hypotheses:

H0p ≤ .35
H1p > .35

p-value = 1–BINOM.DIST(12, 24, .35, TRUE) = .04225 < .05 = α

and so conclude with 95% confidence that the new process shows a significant improvement.

 

Statistics for Beginners in Excel – Binomial Distribution

 

Statistics for Beginners in Excel – Hypothesis Testing for 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!