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.

Calculating Type I Error and Type II Error of Hypothesis Testing using R

In statistical hypothesis testing, there are usually two types of errors that the process will encounter, namely Type I and type II errors. Type I error (α) refers to the probability of rejection of a Null Hypothesis (H0) when actually it is true, and if a false Null hypothesis is missed to reject when an Alternative Hypothesis (H1) is true, then a type II error (ß) occurs.

Using Weibull distribution in R programming

Weibull distribution, named after Swedish mathematician Waloddi Weibull, is a continuous distribution which is widely used to model the distribution of random time between events. Exponential distribution, which is used to model the random time until next event occurs and have so-called memoryless feature or constant failure rate. In order to relax this memoryless condition, analysts may use either Gamma distribution or Weibull distribution instead.

Creating data frames in R using data.frame()

Data frames are the most widely used data structures in R programming. Unlike each element in vector/matrix/array must have same data mode, a data frame can store data elements with different mode or type in one object. For example, a data frame of family information can have numeric (e.g. age, income), character (e.g. name), and logical (work/not work) data types. Data frames in R act somewhat similar as a spredsheet in Microsoft Excel, where each row represents each observation or subject and each column refers to each variable or attribute.