Calculating The Power of a Test in Hypothesis Testing with R

In hypothesis testing, the analyst has chance to commit both Type I and Type II errors. The Type I error (α) refers to the probability of wrongly rejecting a true Null hypothesis – H0, while the Type II error (ß) represents the probability that failing to reject a false H0. The value of 1- ß is called the Power of Test in hypothesis testing. Its value says the ability of correctly rejecting a false H0, under the specified Null hypothesis – H0 and Alternative hypothesis – H1.