Science, Tech, Math › Math Hypothesis Test Example Learn more about calculation of probability of type I and type II errors Share Flipboard Email Print C.K.Taylor Math Statistics Statistics Tutorials Formulas Probability & Games Descriptive Statistics Inferential Statistics Applications Of Statistics Math Tutorials Geometry Arithmetic Pre Algebra & Algebra Exponential Decay Functions Worksheets By Grade Resources View More By Courtney Taylor Professor of Mathematics Ph.D., Mathematics, Purdue University M.S., Mathematics, Purdue University B.A., Mathematics, Physics, and Chemistry, Anderson University Courtney K. Taylor, Ph.D., is a professor of mathematics at Anderson University and the author of "An Introduction to Abstract Algebra." our editorial process Courtney Taylor Updated February 05, 2018 An important part of inferential statistics is hypothesis testing. As with learning anything related to mathematics, it is helpful to work through several examples. The following examines an example of a hypothesis test, and calculates the probability of type I and type II errors. We will assume that the simple conditions hold. More specifically we will assume that we have a simple random sample from a population that is either normally distributed or has a large enough sample size that we can apply the central limit theorem. We will also assume that we know the population standard deviation. Statement of the Problem A bag of potato chips is packaged by weight. A total of nine bags are purchased, weighed and the mean weight of these nine bags is 10.5 ounces. Suppose that the standard deviation of the population of all such bags of chips is 0.6 ounces. The stated weight on all packages is 11 ounces. Set a level of significance at 0.01. Question 1 Does the sample support the hypothesis that true population mean is less than 11 ounces? We have a lower tailed test. This is seen by the statement of our null and alternative hypotheses: H0 : μ=11.Ha : μ < 11. The test statistic is calculated by the formula z = (x-bar - μ0)/(σ/√n) = (10.5 - 11)/(0.6/√ 9) = -0.5/0.2 = -2.5. We now need to determine how likely this value of z is due to chance alone. By using a table of z-scores we see that the probability that z is less than or equal to -2.5 is 0.0062. Since this p-value is less than the significance level, we reject the null hypothesis and accept the alternative hypothesis. The mean weight of all bags of chips is less than 11 ounces. Question 2 What is the probability of a type I error? A type I error occurs when we reject a null hypothesis that is true. The probability of such an error is equal to the significance level. In this case, we have a level of significance equal to 0.01, thus this is the probability of a type I error. Question 3 If the population mean is actually 10.75 ounces, what is the probability of a Type II error? We begin by reformulating our decision rule in terms of the sample mean. For a significance level of 0.01, we reject the null hypothesis when z < -2.33. By plugging this value into the formula for the test statistics, we reject the null hypothesis when (x-bar – 11)/(0.6/√ 9) < -2.33. Equivalently we reject the null hypothesis when 11 – 2.33(0.2) > x-bar, or when x-bar is less than 10.534. We fail to reject the null hypothesis for x-bar greater than or equal to 10.534. If the true population mean is 10.75, then the probability that x-bar is greater than or equal to 10.534 is equivalent to the probability that z is greater than or equal to -0.22. This probability, which is the probability of a type II error, is equal to 0.587.