Business Statistics Unit 8

Introduction to Hypothesis Testing

One Sample Tests

Introduction


In this unit you will learn the basic procedural steps to conduct a hypothesis test.  Hypothesis testing simply involves developing a hypothesis and by using statistical testing techniques, you test to see if the hypothesis is correct or incorrect.  In this unit we will apply hypothesis testing techniques to situations where we have a sample and are trying to make assumptions about a population.  We will use many of the statistical tests that we have learned in previous units to test means, percentages/proportions, variances and standard deviations.

Basic Thoughts and Terms


A hypothesis is simply a statement that is made about a population.  For example, we might be studying the percentage of defective parts that are made every day in a production process.  Our hypothesis might state:  The percentage of defective parts produced during a day's production cycle is equal to 3%.  We would then take a sample from the day's production and determine if the percentage of defective parts is less than, greater than, or equal to 3% based upon the sample.  Where does the 3% come from?  Often a business will have a goal or standard in regards to the production of a part.  In this example the goal is to have 3% defects or less.  Therefore we state our hypothesis as the percentage of defective parts produced during the day's production cycle is equal to 3%.

Hypothesis testing consists of using two different hypotheses for each problem being studied.  The first hypothesis is called the null hypothesis and it uses the symbol H0.  There is also a second hypothesis called the alternative hypothesis and it uses the symbol H1.  The alternative hypothesis is selected when the null hypothesis is not true.  In our previous example. the null hypothesis was:  H0 :  The percentage of defective parts produced during the day's production cycle is equal to 3%.  Since we are interested in having even fewer defective parts, our alternative hypothesis would be:  H1:  The percentage of defective parts produced during the day's production is less than 3%.

Notice that the null hypothesis is stated that the percentage of defective parts is equal to stated value.  For all null hypotheses this will always be true.  You state that a value is equal to some stated objective or amount.  Please note that some textbooks will state the null hypothesis as an equal to, or a less than/equal to or greater than/equal to if a one-tail test is being conducted.  For our purposes here, we will always set up the null hypothesis as being equal to some value.

For the alternative hypothesis, it's value will be stated as a less than, greater than, or not equal to a stated objective or amount.  In our previous example we indicated that the alternative hypothesis was less than 3%.

Lets look at another example.  Suppose you are the quality control manager of a cell phone manufacturer and you are in charge of producing screens for the cell phones.  The screens must be exactly 3 inches wide to fit in the phones.  You manufacture thousands of screens each day so you take a sample of 100 screens and test them to see if they are 3 inches wide.  How would you set up your hypothesis test?

The null hypothesis is:  H0:  The cell phone screens equal 3 inches.  The alternative hypothesis is:  H1:  The cell phone screens are not equal to three inches.

You may have noticed a few differences from the first example testing defective parts and the second example testing cell phone screens.  One item that needs to be noticed is that in the first example, the alternative hypothesis only addressed if the number of defects was less than 3%.  It was not concerned if the number of defects was more than 3%.  When the alternative hypothesis is only concerned with a less than or greater than situation, it is called a one tail test.  The probability values for a one tail test are different than the probability values for a two tail test when you are using a normal distribution.  You are able to determine if you have a one tail or two tail test by looking at the alternative hypothesis.

In the second example, the alternative hypothesis stated that the cell phone screens are not equal to three inches.  This means that they could be larger or smaller than three inches.  This is a two tail test because we could possibly have values above and below the hypothesized value of 3 inches.

Please review the information presented so far before proceeding.  Do you understand what a hypothesis test is, how its constructed, and the difference between a one tail and two tail test?  If not, please review the first part of this presentation again and also review your textbook before proceeding.

Procedural Steps Using Hypothesis Testing


Hypothesis testing involves following specific steps to test the hypothesis and determine whether or not we should accept or reject the hypothesis.  You will notice that specific terms are used to describe each step of the process.  Different textbooks and instructors often use a different number of steps by combining and/or dividing individual steps.  The process we are going to use is called the Traditional Five Step Process for statistical hypothesis testing.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  In this unit we will be working with tests of means, percentages, variances, and standard deviations.  For a hypothesis test of means the null hypothesis follows this general format:    H0:  µ = a stated amount or value.  The alternative hypothesis is stated as:  H1:  µ > a stated amount or value; µ < a stated amount or value: or µ ≠ to a stated amount or value.  Depending upon the nature of the test you select one of the choices for the alternative hypothesis but not all three. Later on you will be given examples for hypothesis tests of percentages, variances, and standard deviations.

  2. Find the critical value (s).  Finding the critical value (s) depends upon the level of significance, the test distribution used, and whether you have a one or two tail test.  The level of significance uses the symbol α called alpha.  Common levels of significance include .05, .01, and .10.  In this unit we will be using the z, t, and Х2 (pronounced chi-square) distributions.  You determine the test distribution by looking at the problem and finding out if you are testing means, percentages/proportions, variances, or standard deviations.  For a test of means, you will either use a z or a t distribution depending upon the sample size and if the population standard deviation is known.  For a test of percentages, you will always use a z distribution.  For a test of variance or standard deviation, the Х2 distribution is used.  The rejection region or critical value is the numerical amount that you will use to determine if you should reject the null hypothesis or not.  It is your table or computed value based upon if you are conducting a one tail or two tail test, the level of significance and if you are using a t or Х2 distribution, the degrees of freedom.  For the Х2 distribution we will be conducting some additional calculations which are explained later in this unit.  Once you have your critical values, you need to understand how to use them.  The best way to use your critical values is to develop a decision rule that guides you.  The decision rule is simply a statement that indicates based upon the calculations that you will conduct in step 3, what decision you are going to make.  The decision rule compares your calculated value in step 3 with the critical value from step 2 and tells you whether you should fail to reject the null hypothesis or reject it.  The decision rule is often stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 is >, <, or both > and <, the calculated value from step 4, otherwise we fail to reject H0.  The exact format of the decision rule depends upon if you are conducting a one tail or two tail test, and the type of test statistic used.  Specific examples that apply for each situation are given later on to help you better understand the structure of the decision rule.  Note that if we accept the null hypothesis this is stated in hypothesis testing as we fail to reject the null hypothesis.  The terminology can be confusing but it is required.

  3. Compute the test statistic.  This is the step where you conduct your actual computations based upon the problem you have been given and the type of test statistic you are using.  For example, if you are conducting a statistical test of means using the z distribution your formula for the test statistic is:

        Test statistic for Z

Similar to the calculations you did in a previous unit, the formula indicates you take the sample mean and subtract from it the hypothesized value of the mean, and then divide by the standard error.  For each type of test you conduct, you will be using a different formula for the test statistic.  Please refer to the examples given later in this unit for the formula that applies to the specific situation and statistical test being conducted.

  1. Make your statistical decision to reject or fail to reject the null hypothesis.  For this step you compare your calculated test statistic value from step 3 to the value contained in your decision rule from step 2 and make your decision.  There are two possible decisions that can be stated:  Reject H0 in favor of H1, or Fail to reject H0.  In addition you need to understand what rejecting the null hypothesis or failing to reject the null hypothesis means in relation to your problem.  In other words, if we are determining whether or not the cell phone screens are the proper size or not, by rejecting the null hypothesis that is an indication that the cell phone screens are NOT the proper size.

  1. Summarize the results.  For this step you state what decision should be made in relation to the question that was posed in the problem.  For example if you rejected the null hypothesis, it might indicate that the cell phone screens were not the proper size and the production process needs to be examined.

Please review the five step process and make sure you are comfortable with the various steps.  Now we are going to apply them!

Listed below are the common critical values for the z distribution.

Significance Two-Tail One-Tail
.01 2.575 2.33
.05 1.96 1.645
.10 1.645 1.28

Situation 1 - Classical Two-Tailed or One-Tailed Test of Means When the Population Standard Deviation (σ) is Known, or the Sample Size is ≥ 30


For this situation, we are comparing a sample mean to a hypothesized population mean value using a two or one tail test when the population standard deviation (σ) is known or the sample size is greater than or equal to 30.  We will use a sample problem to illustrate how the five step process is applied to this situation.

The sales manager for the western region of a cell phone company reported that the average weekly sales of cell phones for his region was 1,250 during the past year.  The vice president of sales for the company is concerned that the number being reported by the sales manager is incorrect.  A random sample of 10 different weeks sales were selected and it was found that the average sales for the 10 weeks selected was 1,200 cell phones.  If we use a level of significance of α = .05, and our population standard deviation (σ) is equal to 60, what should the vice president of sales conclude?  Test the hypothesis at the .05 level that the sales are equal to 1,250.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  µ = 1,250 cell phones sold.  The alternative hypothesis should be stated as:  H1:  µ ≠ 1,250 cell phones sold.  Notice that since this is a two tail test, we use the = and the ≠ symbols.  Our alternative hypothesis indicates that the number of cell phones being sold could be higher or lower than our mean.  Why is this a two tail test?  Because the vice president is concerned about the number being 1,250 or not.  Therefore he is concerned that the actual number of cell phones sold could be higher or lower than the hypothesized mean value of 1,250.

  2. Find the critical value (s).  Our level of significance (alpha) is .05, we are using a z distribution, and we have a two tail test.  The amount of error, our alpha, which is equal to .05, could occur on both sides of mean in a two tail test.  Therefore in order to properly determine the critical value, we divide our alpha by 2.  .05 / 2 = .025 in each tail of our normal distribution.  To find the critical value now, you subtract .025 from .500 which gives you a value of .4750.  This is the probability you use to find the critical value if you use the tables in the textbook.  Using the z table, find the closest z value for a probability of .4750.  You should find that a z of 1.96 has a probability of .4750.  Therefore we will use both 1.96 and -1.96 as our critical values for z.  Since we have a two tail test, our decision rule for this problem is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 is > 1.96 or < -1.96, otherwise we fail to reject H0.  Our decision rules states that when we calculate a value of z based upon the sample, if that calculated value is larger than 1.96 or smaller than -1.96, we will reject the null hypothesis.  If the calculated value of z is between -1.96 and 1.96, we fail to reject the null hypothesis.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic z based upon our sample data.  For a two tail test of means when the population standard deviation is known, we use the following formula:

        Test statistic for Z test of means

        For the denominator in the formula, the standard error is equal to:

          Standard error of the mean formula

Using the formula above, we simply fill in the information based upon the sample data and our hypothesized mean value.  Therefore, we will have for our sample mean the value of 1,200, for the hypothesized mean value we use 1,250, and to find the standard error, we simply take the population standard deviation of 60 and divide it by the square root of our sample size of 10.  1,200 - 1,250 / (60/√10) = -50 / 18.9737 = -2.6352.  Our calculated test statistic value is -2.6352.

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of -2.6352 is less than -1.96, we reject the null hypothesis. 
     

  2. Summarize the results.  In relation to our problem, rejecting the null hypothesis indicates that the actual mean number of cell phones sold is not equal to the stated mean of 1,250.  Therefore the sales manager may be making an incorrect statement based upon the sample taken.

Ready for another example?


A well known manufacturer of ball point pens is concerned about the amount of ink filled into pens that are manufactured.  Each pen is supposed to have exactly 1.2 ounces of ink although its OK for them to have more ink since there is plenty of room.  Customers have been complaining that the pens are running out of ink too soon and that there is not enough ink in each pen.  The pen company takes a random sample of 100 pens produced during a day and measures the amount of ink in each pen.  The average amount of ink in each pen in the sample was 1.18 ounces and the population standard deviation is .05 ounces.  Based upon the sample, do you believe the customers are correct?  Use a level of significance of .05.  Test hypothesis at the .05 level that the pens have less than 1.2 ounces of ink on average.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  µ = 1.2 ounces.  Note that we are not setting up the null hypothesis to contain a greater than or equal to sign.  This was explained earlier that for our purposes here, all null hypotheses will contain the equal to statement.  The alternative hypothesis should be stated as:  H1:  µ < 1.2 ounces.  In this problem we are concerned about the actual ounces of ink being less than 1.2 ounces, so it is a one tail test of means.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  We will use a z distribution to test our hypothesis.  To find the critical value you must first recognize that the amount of error, our alpha, which is equal to .05, only occurs on one side of mean in a one tail test.  For all one tail tests, you do not divide alpha, our error, by 2.  Subtracting .05 from .5000 gives us .4500 which is the probability we use to find the z value in the z table.  Using the z table, find the closest z value for a probability of .4500.  You should notice that two probabilities are exactly the same distance from .4500.  A probability of .4495 has a z value of 1.64, and the probability of .4505 has a z value of 1.65.  Which one do we choose?  Neither.  Since our probability of .4500 is exactly the same distance from the two closest probabilities in the table, we can calculate a more precise z value by adding the two z values together (1.64 + 1.65) and dividing the sum by 2.  Therefore we find that the z value for a probability of .4500 equal 1.645.  Since we have a one tail test and are only concerned with values less than our hypothesized value, the actual critical value we will use is -1.645.  Our decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -1.645, otherwise we fail to reject H0.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic z based upon our sample data.  For a one tail test of means when the population standard deviation is known, we use the following formula:

        Test statistic for z - test of means

Using the formula above, we simply fill in the information based upon the sample data and our hypothesized mean value.  Therefore, we will have for our sample mean the value of 1.18, for the hypothesized mean value we use 1.20, and to find the standard error, we simply take the population standard deviation of .05 and divide it by the square root of our sample size of 100.  1.18 - 1.20 / (.05/√100) = -.02 / .005 = -4.00.  Our calculated test statistic value is -4.00.

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of -4.00 is less than -1.645, we reject the null hypothesis. 
     

  2. In relation to our problem, rejecting the null hypothesis indicates that the actual mean amount of ink in the pens produced is less than the hypothesized mean of 1.20 ounces.  Therefore the customers have a valid complaint based upon the sample taken and the statistics used.

Is it getting any clearer?  Want to see another example?  Ok, here's one more before we check out the next situation.


A medical instrument company manufactures drill bits for dentists.  Many different types of drill bits are made based upon the type of drilling being conducted.  For a particular drill bit model, called the DB127A, the company is required to make the drill bit exactly 1.75 inches long in order for the drill bit to function properly.  To ensure that the bits are being produced properly, the quality control manager randomly selects a sample from each production cycle and measures the bits using a computer based laser measuring device.  The most recent sample contains the following information:  Sample size = 50, sample mean = 1.751, sample standard deviation = .002.  Using a significance level of .01, do the drill bits meet the required specifications?  Test the hypothesis at the .01 level of significance that the population mean equals 1.75 inches.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  µ = 1.75 inches.  The alternative hypothesis should be stated as:  H1:  µ 1.75 inches.  In this problem we are concerned if the drill bits are longer or shorter than 1.75 inches.  Therefore we have a two tail test.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .01 because our problem indicated that was the value to use.  The z distribution continues to be used because we have a test of means and our sample size is ≥ 30.  To find the critical values you must first recognize that the amount of error, our alpha, which is equal to .01, could occur on both sides of mean in a two tail test.  For all two tail tests of means, you divide alpha, our error, by 2.  This gives us the probability of error for each tail of .005.  Now to find the z value we simply subtract .005 from .5000 and we get .4950.  Looking at the z table, the closest probability to .4950 has two possible answers.  There is a probability of .4949 and a probability of .4951 in the table.  Which one do we choose?  Neither.  Since our probability of .4950 is exactly the same distance from the two closest probabilities in the table, we can calculate a more precise z value by adding the two z values together (2.57 + 2.58) and dividing the sum by 2.  Therefore we find that the z value for a probability of .4950 equals 2.575.  Since we have a two tail test and are concerned with values less than and greater than our hypothesized value, the actual critical values we will use is -2.575 and 2.575.  The decision rule for this problem is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -2.575 or > 2.575, otherwise we fail to reject H0

  3. Compute the test statistic.  For this step we calculate the value of the test statistic z based upon our sample data.  For a two tail test of means when the population standard deviation is unknown and the sample size is ≥ 30, we use the following formula:

        Test statistic for z - test of means with estimated standard error    

Notice that the formula indicates that for the denominator we need to find the estimated standard error.  The formula for this is given below:

                Formula for the estimated standard error of the mean

Using the formula above, we simply fill in the information based upon the sample data and our hypothesized mean value.  Therefore, we will have for our sample mean the value of 1.751, for the hypothesized mean value we use 1.75, and to find the estimated standard error, we simply take the sample standard deviation of .002 and divide it by the square root of the sample size of 50.  1.751 - 1.75 / (.002/√50) = .001/ .00028 = 3.5714.  Our calculated test statistic value is 3.5714.

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of 3.5714 is greater than 2.575, we reject the null hypothesis. 
     

  2. Summarize the results.  Looking back at our problem by rejecting the null hypothesis you are stating that the drill bits do not meet the necessary size.  Even though our sample drill bit size was 1.751 it still was not close enough to the required 1.75 inches to be acceptable.  The quality control manager should not allow the bits to be shipped and needs to review the manufacturing process.

Situation 2 - Classical Two-Tailed or One-Tailed Test of Means When the Population Standard Deviation (σ) is Unknown and the Sample Size < 30 - the t distribution


What's different here?  The population standard deviation is unknown and since the sample size is less than 30, we must use the t distribution for our test statistic in step three.  We will use a sample problem to illustrate how the five step process is applied to this situation.  Let's use the dentist drill problem again and make one change that relates to the sample size.

A medical instrument company manufactures drill bits for dentists.  Many different types of drill bits are made based upon the type of drilling being conducted.  For a particular drill bit model, called the DB127A, the company is required to make the drill bit exactly 1.75 inches long in order for the drill bit to function properly.  To ensure that the bits are being produced properly, the quality control manager randomly selects a sample for each production cycle and measures the bits using a computer based laser measuring device.  The most recent sample contains the following information:  Sample size = 20, sample mean = 1.751, sample standard deviation = .002.  Using a significance level of .01, do the drill bits meet the required specifications?  Test the hypothesis at the .01 level of significance that the population mean equals 1.75 inches.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  µ = 1.75 inches.  The alternative hypothesis should be stated as:  H1:  µ 1.75 inches.  In this problem we are concerned if the drill bits are longer or shorter than 1.75 inches.  Therefore we have a two tail test.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .01 because our problem indicated that was the value to use.  For a two tail tests of means where the population standard deviation is unknown and the sample size is < 30, the t distribution is used to test the hypothesis.  To find the critical values you must first recognize that the amount of error, our alpha, which is equal to .01, could occur on both sides of mean in a two tail test.  For all two tail tests of means, you divide alpha, our error, by 2.  This gives us the probability of error for each tail of .005.  Now to find the t value we use the t table and find the column of t values for the .005 column.  However we still need one more piece of information, the degrees of freedom.  The degrees of freedom are equal to n - 1, so we take 20 - 1 = 19 degrees of freedom.  Looking at the t table, in the t.005 column, with 19 degrees of freedom, our critical value for t equals 2.861.  Since we have a two tail test and are concerned with values less than and greater than our hypothesized value, the actual critical values we will use is -2.861 and 2.861.  The decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -2.861 or > 2.861, otherwise we fail to reject H0.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic t based upon our sample data.  For a two tail test of means when the population standard deviation is unknown and the sample size is < 30, we use the following formula:

        Test statistic formula for t test of means

Using the formula above, we simply fill in the information based upon the sample data and our hypothesized mean value.  Therefore, we will have for our sample mean the value of 1.751, for the hypothesized mean value we use 1.75, and to find the estimated standard error, we simply take the sample standard deviation of .002 and divide it by the square root of the sample size of 20.  1.751 - 1.75 / (.002/√20) = .001/ .00045 = 2.22.  Our calculated test statistic value is 2.22.

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of 2.22 is less than 2.861, we fail to reject the null hypothesis. 
     

  2. Summarize the results.  Looking back at our problem by failing to reject the null hypothesis you are stating that the drill bits do meet the necessary size.  Notice that by using a t distribution, the test statistic and the critical value changes which could have an impact as to whether we reject the null hypothesis or not if our calculated value was closer to the critical value of t.

What?  You want another example of a hypothesis test of means using the t distribution?  You got it!


In a recent random sample survey of car fleet buyers, 24 respondents to the survey indicated on their satisfaction surveys an average of 8.75 out of 10 points in regards to satisfaction with their purchase.  The sample standard deviation was .60.  If the goal of the satisfaction program was to have an average score of 8.85 out of 10 points, was the goal met based upon our sample data?  Test using a .05 level of significance.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  µ = 8.85 points.  The alternative hypothesis should be stated as:  H1:  µ < 8.85 points.  In this problem we are concerned only if the survey average is below 8.85 points.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  For a one tail test of means where the population standard deviation is unknown and the sample size is < 30, the t distribution is used to test the hypothesis.  To find the critical values you must first recognize that the amount of error, our alpha, which is equal to .05, occurs on one side of mean in a one tail test.  In this situation, we are concerned with the area to the left of the mean.  Now to find the t value we use the t table and find the column of t values for the .05 column.  However we still need one more piece of information, the degrees of freedom.  The degrees of freedom are equal to n - 1, so we take 24 - 1 = 23 degrees of freedom.  Looking at the t table, in the t.05 column, with 23 degrees of freedom, our critical value for t equals 1.714.  Since we have a one tail test and are concerned only with values less than our hypothesized value, the actual critical value we will use is -1.714.  The decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -1.714, otherwise we fail to reject H0.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic t based upon our sample data.  For a two tail test of means when the population standard deviation is unknown and the sample size is < 30, we use the following formula:

        Test statistic formula for t test of means

Using the formula above, we simply fill in the information based upon the sample data and our hypothesized mean value.  Therefore, we will have for our sample mean the value of 8.75, for the hypothesized mean value we use 8.85, and to find the estimated standard error, we simply take the sample standard deviation of .60 and divide it by the square root of the sample size of 24.  8.75 - 8.85 / (.60/√24) = -.10/ 12.2475 = -.0082.  Our calculated test statistic value is -.0082.

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of -.0082 is not less than -1.714, we fail to reject the null hypothesis. 
     

  2. Summarize the results.  Looking back at our problem by failing to reject the null hypothesis you are stating that even though the average sample survey was actually lower than our target average of 8.85, it was not a statistically significant difference.  The test indicates we are meeting our goal.



NOTE:  THIS CONCLUDES THE REQUIRED DISCUSSION FOR THIS UNIT.  YOU ARE NOT REQUIRED TO LEARN HYPOTHESIS TESTING FOR PERCENTAGES/PROPORTIONS AND FOR VARIANCES/STANDARD DEVIATIONS.



Situation 3 - Two-Tailed and One-Tailed Test of Percentages/Proportions


When we are testing using percentages, we will always use the z distribution.  Two important differences exist when you are hypothesis testing using percentages.  First, you will need to calculate the standard error of the percentage.  The formula for the standard error of the percentage is given below:

Formula for the standard error of the percentage

Notice that this formula may be slightly different than the one in your textbook.  Sometimes the symbol for π, the population percentage or proportion is represented by a p.  When this occurs the sample percentage p is called p "hat".  Also the symbol q can be used in place of (100 - π).

Second, during step 3, the calculations for the test statistic are different.  The formula below is used for the test statistic when we hypothesis test percentages or proportions:

Test statistic for z - percentages

If you prefer you can combine the two formulas together using the setup given in your textbook.

This formula solves for the standard error and the test statistic Z at the same time.  It can be used for either a percentage or a proportion problem.  Here, p with the "hat" over it is called your sample percentage or proportion, and the plain p is called your hypothesized percentage or proportion value.  Again p + q is equal to 1 (proportion) or 100 (percentage).

A medical supply company manufactures pregnancy test kits for sale to the public.  Although steps have been taken to improve the quality and reliability of the testing kits, it is known that 3% of the test kits do not work properly.  The production department recently instituted several changes in manufacturing to improve reliability and a random sample of 250 kits was taken from the weekly production.  All of the kits were tested and it was found that 5 were defective.  Did the changes in manufacturing reduce the percentage of test kits that do not function properly?  Test the hypothesis at the .05 level of significance that the population percentage is less than 3 percent.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  π = 3 percent.  The alternative hypothesis should be stated as:  H1:   π < 3 percent.  In this problem we are concerned about the actual percentage of test kits that do not work properly being less than 3 percent, therefore we have a one tail test of percentages.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  For all one and two tail tests of percentages, the z distribution is used.  This is a one tail test where all of our error, .05, is located in the left tail of the normal distribution.  Using the normal distribution tables, our critical value is equal to -1.645.  The decision rule should be stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -1.645, otherwise we fail to reject H0.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic z based upon our sample data.  For a one tail test of percentages, we use the following formulas to find the standard error of the percentage and z:

        Formula for the standard error of the percentage

          Test statistic for z - percentages

Using the formulas above, we simply fill in the information based upon the sample data and our hypothesized population percentage.  Therefore, we will have for our sample percentage the value of 5 / 250 which equals 2%, for the hypothesized percentage value we use 3%, and to find the standard error, we use the formula for finding the standard error of the percentage.  Therefore, our standard error is equal to:

√3(100 - 3)/250 = √1.164 = 1.0789

Solving for our test statistic z, we get the following:

2 - 3 / 1.0789 = -0.9269

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of -0.9269 is not less than -1.645, we fail to reject the null hypothesis. 
     

  2. Summarize the resultsThere has not been a statistically significant change in the percentage of kits that function properly.  You might be asking yourself:  "but, the percentage dropped from 3 to 2, why is that not significant?"  The answer is that based upon the level of significance chosen and the size of the sample, the changes were not significant enough.  A larger sample or a different level of significance could provide you with a different answer.

Let's do another example this time using a two tail test of percentages.


An insurance company manager claims that 80% of her clients are never involved in auto accidents because of the special accident avoidance program she offers.  The manager conducts a random sample of 200 customers and finds that 172 customers were not involved in auto accidents.  Is the manager's claim still true?  Test at the .05 level of significance that the population percentage is equal to 80%.

First we need to determine if this is a one or two tail test.  Since we are testing to see if the manager's claim is true or not, this is a two tail test of percentages. 

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  π = 80 percent.  The alternative hypothesis should be stated as:  H1:   π ≠ 80 percent.  In this problem we are concerned about the actual percentage being higher or lower than the stated 80 percent, therefore we have a two tail test of percentages.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  For all one and two tail tests of percentages, the normal distribution is used.  This is a two tail test where all of our error, .05, is divided equally between both tails of the normal distribution.  We have a probability of .025 in each tail.  Therefore the probability we use to find the critical value of z is equal to .475.  Using the normal distribution tables, our critical value is equal to 1.96 and -1.96.  The decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 < -1.96 or > 1.96, otherwise we fail to reject H0

  3. Compute the test statistic.  For this step we calculate the value of the test statistic z based upon our sample data.  For a two tail test of percentages, we use the following formulas to find the standard error of the percentage and z:

        Formula for the standard error of the percentage

          Test statistic for z - percentages

Using the formulas above, we simply fill in the information based upon the sample data and our hypothesized population percentage.  Therefore, we will have for our sample percentage the value of 172/200 which equals 86%, for the hypothesized percentage value we use 80%, and to find the standard error, we use the formula for finding the standard error of the percentage.  Therefore, our standard error is equal to:

√80(100 - 80)/200 = √8.0 = 2.8284

Solving for our test statistic z, we get the following:

86 - 80 / 2.8284 = 2.1213

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated test statistic value of 2.1213 is greater than 1.96, we reject the null hypothesis. 
     

  2. Summarize the results.  The actual percentage of customers who have not been in auto accidents is statistically higher than the 80% being stated by the manager.  The manager is actually understating her success.

Situation 4 - Two Tailed and One Tailed Tests of Variances and Standard Deviations - The Chi-Square Distribution


Whenever we are looking for a variance or standard deviation, we use the Chi-square distribution to compute our test statistic.  The population once again needs to be normally distributed, and we use the five step process to test the hypothesis. 

A sub-contractor for a major aircraft manufacturer is required to meet certain specifications for the parts it produces.  This company produces the bolts that holds engines to the aircraft.  In addition to specific size, strength and weight requirements for the bolts, the company is required to have the standard deviation for the size of the bolts to not exceed .01 inch.  The new quality control manager at the company is concerned that one of the production shifts is frequently producing bolts that are above and below the necessary requirement.  During a given week, the quality control manager takes a random sample of 25 bolts produced and finds that the standard deviation is .012 inch.  Is there a problem with one of the production shifts meeting the standard?  Test using the .05 level of significance that the standard deviation equals .01 inch.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  σ = .01 inch.  The alternative hypothesis should be stated as:  H1:   σ ≠ .01 inch.  Why is this a two-tail test?  Because we are concerned about the standard deviation being above or below the goal of .01 inch in order to compare the work of this shift with all other shifts.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  For all one and two tail tests of variances or standard deviations, the Chi-square distribution is used.  Using the Chi-square tables, our rejection areas occur in both tails.  Therefore we need to take our .05 level of significance and divide it by two.  Now we can go to the Chi-square table, and look first under the .025 column.  Since our sample size is 25, our degrees of freedom is equal to n - 1 which is 24.  Our first value from the table is 39.40.  To find the second value we subtract .025 from 1 and we get .975.  Using the .975 column and 24 degrees of freedom in our table, the value is 12.40.  Now we have our two critical values.  For a two tail test our decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 is > 39.40 or < 12.40, otherwise we fail to reject H0

  3. Compute the test statistic.  For this step we calculate the value of the test statistic X2 based upon our sample data. The test statistic formula is:

Test statistic - variance or standard deviation

As you examine this formula notice that it specifically refers to the sample variance and  hypothesized variance values.  If a problem gives you standard deviations instead of variances, you will need to square the value of any standard deviation in order to solve the test statistic.  If the problem gives you variances, then you do not need to square the values since they are already variances.  Be careful about this!

For our sample problem, we have been given the standard deviation for the sample, and we are solving for the standard deviation.  Here is how we calculate the test statistic for our sample problem:

X2= (25 - 1)(.012)2 / (.01)2 = .003456 / .0001 = 34.56

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated value for the test statistic equals 34.56, it is not greater than 39.40 or less than 12.40.  Therefore we fail to reject our null hypothesis. 
     

  2. Summarize the results.  The production shift's standard deviation is within acceptable limits.  There are no problems with any of the production shifts.

Let's look at another problem that requires us to use the Chi-square distribution to test the hypothesis.


A lab technician is required to test a random sample of each day's production of chocolate bars.  Each chocolate bar is required to have a weight of 3.0 ounces with a variance that is at or below .05 ounces.  A random sample of 30 chocolate bars is obtained and the weight of each bar is measured.  The sample variance was determined to be .051 ounces.  At the .05 level of significance, test to determine if the chocolate bars have a variance more than .05 ounces.

Notice that for this problem, we are testing for the variance.  In addition, the sample variance has been provided.  Also you should notice that this is a one tail test because the lab technician is not concerned if the variance is below .05, only if the variance is above .05.

  1. State the null and alternative hypothesis.  The first step is to properly state the null and alternative hypotheses.  The null hypothesis for this problem should be stated as:  H0:  σ2 = .05 ounces.  The alternative hypothesis should be stated as:  H1:   σ2 > .05 ounces.  This is a one tail test because we are only concerned if the variance is above .05 ounces.

  2. Find the critical value (s).  The level of significance uses the symbol α called alpha.  Here α = .05 because our problem indicated that was the value to use.  For all one and two tail tests of variances or standard deviations, the Chi-square distribution is used.  Using the Chi-square tables, our rejection area only occurs in the right tail since we have a one tail test and are using the greater than sign in our alternative hypothesis.  Therefore we use our .05 level of significance, and use the .05 column in the Chi-square table.  Since our sample size is 30, our degrees of freedom is equal to n - 1 which is 29.  The critical value from the table is 42.60.  For a one tail test our decision rule is stated as:  Reject H0 in favor of H1 if our calculated test statistic from step 3 is > 42.60,  otherwise we fail to reject H0.  The greater than symbol (>) is used here because we were concerned only about variances above .05 ounces.

  3. Compute the test statistic.  For this step we calculate the value of the test statistic X2 based upon our sample data. The test statistic formula is:

Test statistic - variance or standard deviation

As you examine this formula notice that it specifically refers to the sample variance and  hypothesized variance values.  If a problem gives you standard deviations instead of variances, you will need to square the value of any standard deviation in order to solve the test statistic.  If the problem gives you variances, then you do not need to square the values since they are already variances.  Be careful about this!

For our sample problem, we have been given the variance for the sample, and we are solving for the variance.  Here is how we calculate the test statistic for our sample problem:

X2= (30 - 1)(.051) / (.05) = 1.479 / .05 = 29.58

  1. Make your statistical decision to reject or not reject the null hypothesis.  Since our calculated value for the test statistic equals 29.58, it is not greater than 42.60.  Therefore we fail to reject our null hypothesis. 

  2. Summarize the resultsThe chocolate bars are within the specified limits for the variance.  There is not a statistically  significant difference.

One thing to keep in mind whenever you are testing for variance or standard deviation is to use the proper values in the formula.  Depending upon the type of problem, you may need to square some of the values you are given.  Look at the formula and remember it requires variance values.  Then look at your problem and determine whether or not you have been given variance values.

Testing using p Values


Many computer based programs provide statistical tests that generate p values in place of critical values.  In order to make a proper decision, you need to understand how to compare the p value to your level of significance in order to make a decision.  The process is quite simple:

  1. If your calculated p value is greater than the level of significance (alpha), you do not reject the null hypothesis.

  2. If your calculated p value is less than or equal to the level of significance (alpha), you reject the null hypothesis.

For example, let's say you are testing to see if the sample mean of 3.50 is equal to a hypothesized population mean of 3.52.  The selected level of significance is .05.  The computer produces a p value of .0145.  What is your decision?  Since the null hypothesis for this problem would be stated as:  H0:  µ = 3.52, and the alternative hypothesis would be stated as:  H1:  µ ≠ 3.52, and our p value is less than the level of significance, we reject the null hypothesis in favor of the alternative hypothesis.  We will get a chance to see p values in action in later units when we learn about ANOVA and regression analysis.


Here is a help sheet to guide you through each assignment.

Chapter/Unit 8 Hypothesis Testing
 Analyzing a Hypothesis Test Problem

 Is the problem a test of a mean, percentage/proportion, or a variance/standard deviation?

 Is the problem a two-tail or one tail test?

 If the problem is a one-tail test, is it greater than or less than?

Step 1.  State the null (H0) and alternative (H1) hypotheses.  For a two tail test, use the = sign for the null hypothesis and use the ≠ sign for the alternative hypothesis.  For a one tail test, use the = sign for the null hypothesis and use either the > or < sign for the alternative hypothesis.  Note:  Some textbooks for one tail tests do not use the = sign for the null hypothesis.  They will use either ≥ or ≤ in the null hypothesis.

Step 2.  Find the critical value (s).  These are the z, t, or X2 values from the tables that correspond to the significance and whether it is a one-tail or two-tail test.  If you are working with a mean or percentage/proportion problem and have a two-tail test, you will have a positive and negative number for your z or t critical values.  Both the t and X2 require you to find the degrees of freedom first in order to use the table.  Optional but suggested:  state the decision rule.  Remember your decision rules states the conditions upon which you will reject the null (H0) hypothesis in step 4.

Step 3.  Compute the test statistic using the appropriate formula.  For a mean or percentage/proportion problem, you will need to calculate the standard error first and then calculate the test statistic value.  Also remember that for a variance or standard deviation problem, the formula insists upon having a variance value in the numerator and in the denominator, even if you are solving for a standard deviation.

Step 4.  Make your statistical decision to reject or fail to reject the null hypothesis (H0).

Step 5.  Summarize your results.  Based upon your decision in step 4, what impact does your decision have on the problem?  For example, for this step you might indicate that a shipment should be rejected because the parts are too small; the sample was within the required specifications so the shipment should be accepted, etc.

Assignment


The homework problems for unit 8 can be found by going to the Course Documents link in Blackboard, and clicking on the link for Unit 8.  Look for the Unit 8 - Assignment link.  Once you have completed your homework assignment, you will need to post your answers on Blackboard®.  Once you have signed into Blackboard, simply go to the Unit 8 - Assignment 8 - Post Answers Here link and post your answers.  Immediate feedback is provided once you have completed the posting of all of your answers and clicked on submit.  Make sure you print the entire submitted homework assignment to assist you with quizzes and tests.

 

©2007,2006, 2005, 2004 by E.H. McKay, III.  Version 4.0

Some Images ©2006, 2004 by Clipart.com.