Statistical Analysis Engr. Reynante M. Co Hypothesis Testing Introduction In as much as hypothesis is a form of statement and the truth/ validity or certainty of any statement is questionable, it is imperative that such a statement must be tested significantly in order to ascertain its truth or validity. Having tested the statement to be valid or invalid; true or false; one is able to enunciate his judgment or decision. Thus, this chapter deals with the definition of hypothesis, steps in testing hypothesis as well as its application in the field of business. Hypothesis Testing Some types of questions to be discussed are: 1. Is there a significant difference between performance of U.E. graduates in the October CPA board examination and May CPA board examination? 2. Are there more than five percent of 500 pieces of children’s wear produced and defective? 3. Is there a significant difference in the proportion of consumers who purchased Ariel powder soap before advertising campaign in television and the proportion who purchased it after advertising campaign? 4. Is there a significant difference in the mean life span between the Eveready and National batteries? 5. Is the mean grade of Business Administration students of the University of the East enrolled in Hypothesis Testing Definition of Hypothesis Hypothesis is simply a statement that something is true. It is a tentative explanation, a claim, or assertion about people, objects, or event. Examples of hypotheses are: 1. There is no significant relationship between the mathematics attitude and competency levels of second year accountancy students of the University of the East. 2. The percentage of shoppers who buy their favorite toothpaste regardless of price is not 25% 3. The mean monthly allowance of all students of the University of the East is at least Php 5,000. 4. Ninety-five percent of the government employees filed their income tax return on time. Such statements are subjected to statistical testing in order to determine whether it is true or false. If the statement is true, then it is accepted. On the contrary if the statement is false, it is rejected Hypothesis Testing Definition of Hypothesis Testing Hypothesis testing is a procedure in making decisions based on a sample evidence or probability theory used to determine whether the hypothesis is accepted or rejected. If the statement is found reasonable then, the hypothesis is accepted, otherwise rejected. Hypothesis Testing Two Types of Hypothesis 1. Null hypothesis is denoted by Ho. The capital letter H stands for hypothesis and the subscript zero implies “no difference.” This is usually a designated by not or no term in the null hypothesis, which means there is no change. 2. Alternative hypothesis is a hypothesis to be considered as an alternate to the null hypothesis. The symbol Ha and read as” H sub a” is used to stand for alternative hypothesis. The alternative hypothesis will be accepted if the sample data provide us with evidence that the null hypothesis is false. In short, the rejection of null hypothesis implies that the alternative hypothesis is accepted. Hypothesis Testing Example Is there a significant difference between the performance of U.E. graduates in the October CPA board examination and May CPA board examination? Null hypothesis Ho: There is no significant difference between the performance of U.E. graduates in the October CPA board examination and May CPA board examination. Alternative hypothesis Ha: There is a significant difference between the performance of U.E. graduates in the October CPA board examination and May CPA board examination. Hypothesis Testing Types of errors Error is one if the many things man is afraid to commit. Even in real life situation, we would hardly come out with a decision immediately because of our fear to commit an error. The same is true in hypothesis testing; there is also a possibility of committing an error in deciding whether to accept or reject the hypothesis. This is because partial information obtained from the sample is used to draw conclusion about the entire population. Definition of Type I and Type II Errors Type I error: Rejecting the null hypothesis when in fact the null hypothesis is true. Type II error: Not rejecting the null hypothesis when in fact the null hypothesis is false. The probability of committing a type I error is the probability of rejecting the true null hypothesis. In other words, it is the probability that the test statistic will be in the rejection region if, in fact, the null hypothesis is true. The probability of type I error is called the level of significance of the hypothesis test and is denoted by the Greek letter α (alpha). Hypothesis Testing One-tailed and Two-tailed Tests On way of determining the type of test used in hypothesis testing is based on how the alternative hypothesis is formulated. A one-tailed test is used when the alternative hypothesis is directional which means that the value of the measures is either greater than (>) or less than (<) the other measure. A one-tailed test is a hypothesis test for which the rejection region lies at only one tail of the distribution. One-tailed test is classified as left-tailed test or right-tailed test. If the population mean (๐) is less than the specified value of ๐ฅาง then it is a left-tailed test for which the alternative hypothesis can be expressed as ๐ < ๐ฅาง . It is a right-tailed test if the population mean (๐) is greater than the specified value of ๐ฅาง for which the alternative hypothesis can be expressed as ๐ > ๐ฅาง . Hypothesis Testing A two-tailed test is used when the alternative hypothesis is non-directional which means that the values of two measures of the same kind are not equal. A two-tailed test has a not equal sign (๏น) in the alternative hypothesis. When the population mean (๐) is not equal to specified value of x, then the alternative hypothesis can be expressed as ๐ 1 ๏น ๐ 2. A two-tailed test is a hypothesis test for which the rejection region lies on both end tails of distribution, one on the left and one on the right. Hypothesis Testing Hypothesis Testing Some Terminologies to Remember Test Statistic: The statistic used as a basis for deciding whether the null hypothesis should be rejected. Rejection region: The set of values of the test statistic that leads to ejection of the null hypothesis. Non-rejection region: The set of values of the test statistic that leads to non-rejection of the null hypothesis. Critical value: The values of the test statistic that separate the rejection and non-rejection regions. Hypothesis Testing A Hypothesis Testing Procedure 1. Formulate the null and alternative hypothesis. 2. Decide the level of significance, α. 3. Choose the appropriate test statistic. 4. Establish the critical region. 5. Compute the value of the statistical test. 6. Decide whether to accept or reject the null hypothesis. 7. Draw a conclusion. Hypothesis Testing In this section and the succeeding sections, we are going to discuss testing hypothesis that involve a single population mean. There are two categories involved in testing hypothesis between means; a large sample (n ๏ณ 30) and small sample (n <30) cases. In testing hypothesis, z-test and tdistribution may be used depending on the number of cases involved. Hypothesis Testing A. Hypothesis About Means (Comparing Sample Mean and Population Means) 1. ๐ฅาง − ๐ ๐ง= ๐ ๐ 2. ๐ฅาง − ๐ ๐ง= ๐ ๐ Where: z = z-test value เดฅ = sample mean ๐ ๐ = population mean or claimed mean in Ho ๏ณ = population standard deviation s = sample standard deviation n = number of cases greater than or equal to 30 Hypothesis Testing A Small Sample Mean Test When the population standard deviation is unknown and the sample size is less than 30, the z test is not appropriate for testing hypothesis involving means. A different test, called the t test, is used. The t test The t test is a statistical test for the mean of a population and is used when the population is normally distributed, ๏ณ is unknown, and n < 30. ๐ฅาง − ๐ ๐ก= ๐ ๐ The degrees of freedom are d.f. = n – 1. For a one-tailed test, find α (level of significance) by looking at the top row of table and finding the appropriate column. Find the degrees of freedom by looking down the left hand column. Hypothesis Testing Example: Problem 1: The treasurer of certain university claims that the mean monthly salary of their college professor is P21,750 with a standard deviation of Php6, 000. A researcher takes a random sample of 75 college professors were found to have a mean monthly salary of P19,375.00. Do the 75 college professors have lower salaries than the rest? Test the claim at α = .05 level of significance. Apply the different steps in testing hypothesis to solve the given problem. Hypothesis Testing 1. Ho: There is no significant difference between the salaries of 75 college professors from the rest. ๐ = P21,750 Ha: There is a significant difference between the salaries of 75 college professors from the rest. ๐ < P21,750 2. α = 0.05 3. one-tailed test (left tailed test) 4. ztab = -1.645 Hypothesis Testing Hypothesis Testing 5. Given: ๐ = P21,750 เดฅ = P19,375 ๐ ๏ณ = P6,000 n = 75 ๐๐๐๐๐ ๐๐๐๐๐ เดฅ ๐−๐ = ๏ณ ๐ ๐๐, ๐๐๐ − ๐๐, ๐๐๐ = ๐, ๐๐๐ ๐๐ −๐, ๐๐๐ ๐๐๐๐๐ = ๐, ๐๐๐ ๐. ๐๐๐๐๐๐๐๐๐ −๐, ๐๐๐ ๐๐๐๐๐ = ๐๐๐. ๐๐๐๐๐๐ ๐๐๐๐๐ = −๐. ๐๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = −๐. ๐๐ Hypothesis Testing 6. Since zcomp > ztab ( /-3.43/ > /-1.645/ ) Ho, rejected 7. Ha: There is a significant difference on the salaries of 75 college professors from the rest. Hypothesis Testing Example: Problem 2: The labor department claims that the average starting salary for surveyors in Mindanao is P24,000 per month. A sample of 10 surveyors has a mean of P23,220 and a standard deviation of P400. Is there enough evidence to reject the agency’s claim at α = 0.05? Hypothesis Testing 1. Ho: There is no significant difference between the starting salaries of 10 surveyors from the rest. ๐ = P24,000 Ha: There is a significant difference between the starting salaries of 10 surveyors from the rest. ๐ < P24,000 2. α = 0.05 3. one-tailed test (left tailed test) 4. ttab = -1.833 (df = 10-1 = 9) Hypothesis Testing 5. Given: ๐ = P24,000 เดฅ = P23,220 ๐ s = P400 n = 10 ๐๐๐๐๐ ๐๐๐๐๐ เดฅ ๐−๐ = ๐ ๐ ๐๐, ๐๐๐ − ๐๐, ๐๐๐ = ๐๐๐ ๐๐ −๐๐๐ ๐๐๐๐๐ = ๐๐๐ ๐. ๐๐๐๐๐๐๐๐ −๐๐๐ ๐๐๐๐๐ = ๐๐๐. ๐๐๐๐๐๐๐ ๐๐๐๐๐ = −๐. ๐๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = −๐. ๐๐ Hypothesis Testing 6. Since tcomp > ttab ( /-6.17/ > /-1.833/ ) Ho, rejected 7. Ha: There is a significant difference between the starting salaries of 10 surveyors from the rest. Hypothesis Testing Example: Problem 3: Cris Elevators, Inc claims that the average cost of elevator installation and repairs is P228,760. A sample of 60 repairs has an average of P227,880. The standard deviation of the sample is P3000. At α = 0.05, is there enough evidence to reject the company’s claim? Hypothesis Testing 1. Ho: There is no significant difference between the cost of 60 elevator installations and repairs from the rest. ๐ = P228,760 Ha: There is a significant difference between the cost of 60 elevator installations and repairs from the rest. ๐ < P228,760 2. α = 0.05 3. one-tailed test (left tailed test) 4. ztab = -1.645 Hypothesis Testing Hypothesis Testing 5. Given: ๐ = P228,760 เดฅ = P227,880 ๐ s = P3,000 n = 60 ๐๐๐๐๐ ๐๐๐๐๐ เดฅ ๐−๐ = ๐ ๐ ๐๐๐, ๐๐๐ − ๐๐๐, ๐๐๐ = ๐, ๐๐๐ ๐๐ −๐๐๐ ๐๐๐๐๐ = ๐, ๐๐๐ ๐. ๐๐๐๐๐๐๐๐๐ −๐๐๐ ๐๐๐๐๐ = ๐๐๐. ๐๐๐๐๐๐๐ ๐๐๐๐๐ = −๐. ๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = −๐. ๐๐ Hypothesis Testing 6. Since zcomp > ztab ( /-2.27/ > /-1.645/ ) Ho, rejected 7. Ha: There is a significant difference between the cost of 60 elevator installations and repairs from the rest. Hypothesis Testing Example: Problem 4: George Food Company maker of ready-toeat meal claims that the average caloric content of its meals is 780, the standard deviation is 25. A researcher tested 15 meals and found that the average number of calories was 803. Is there enough evidence to reject the claim at α = 0.01? Assume the variable is normally distributed. Hypothesis Testing 1. Ho: There is no significant difference between the caloric content of 15 meals from the rest. ๐ = 780 Ha: There is a significant difference between the caloric content of 15 meals from the rest. ๐ > 780 2. α = 0.01 3. one-tailed test (right tailed test) 4. ttab = 2.624 (df = 15-1 = 14) Hypothesis Testing 5. Given: ๐ = 780 เดฅ = 803 ๐ s = 25 n = 15 ๐๐๐๐๐ เดฅ ๐−๐ = ๐ ๐ ๐๐๐๐๐ ๐๐๐ − ๐๐๐ = ๐๐ ๐๐ ๐๐ ๐๐๐๐๐ = ๐๐ ๐. ๐๐๐๐๐๐๐๐ ๐๐ ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐๐ ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = ๐. ๐๐ Hypothesis Testing 6. Since tcomp > ttab ( 3.56 > 2.624 ) Ho, rejected 7. Ha: There is a significant difference between the caloric content of 15 meals from the rest. Hypothesis Testing Assignment: Problem 5: Anna Garcia, the manager of EG Manufacturing Company believes that the average daily wages of the employees is below P300. A sample of 22 employees has a mean daily wage of P285. The standard deviation of all the salary is P35. Assume the variable is normally distributed. At α = 0.01, is there enough evidence to support the manager’s claim? Hypothesis Testing Assignment: Problem 6: Ilagan rattan Chairs and Tables claims that the average number of chairs rented in a party is 240 chairs. A sample of 35 rentals has an average of 210 chairs with standard deviation of 20. At α = 0.05, is there enough evidence to reject its Ilagan’s claim? Thank You! Hypothesis Testing B. Difference Between Means ( Sample Mean) ๐ง= ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 ๐1 + ๐2 ๐ก= ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 + ๐1 ๐2 Where: z = z-test value t = t-test value ๐ฅ1 = mean of the first sample ๐ฅ2 = mean of the second sample ๐ 1 = standard deviation of the first sample ๐ 2 = standard deviation of the second sample ๐1 = first sample size ๐2 = second sample size Hypothesis Testing Example: Problem 1: A sample of 70 observations is selected from a normal population. The sample mean is 2.78 and the sample standard deviation is 0.83. Another sample of 58 observation is selected from normal population. The mean sample is 2.63 and the sample standard deviation is 0.75. Test the hypothesis using ๏ก = 0.05 level of significance. Hypothesis Testing 1. Ho: There is no significant difference between the two sample mean. ๐ฅ1 = ๐ฅ2 Ha: There is a significant difference between the two sample mean. ๐ฅ1 ≠ ๐ฅ2 2. α = 0.05 3. Two-tailed test 4. ztab = ±1.96 Hypothesis Testing Hypothesis Testing 5. Given: ๐ฅ1= 2.78 ๐ฅ2 = 2.63 ๐ 1 = 0.83 ๐ 2 = 0.75 ๐1 = 70 ๐2 = 58 ๐๐๐๐๐ = ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 ๐1 + ๐2 ๐๐๐๐๐ = 2.78 − 2.63 0.832 0.752 70 + 58 ๐๐๐๐๐ = ๐๐๐๐๐ = ๐๐๐๐๐ = 0.15 0.6889 0.5625 70 + 58 0.15 0.009984143 + 0.00969828 0.15 0.019539704 0.15 ๐๐๐๐๐ = 0.13978449 ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = ๐. ๐๐ Hypothesis Testing 6. Since zcomp < ztab ( 1.07 < 1.96 ) Ho, accepted 7. Ho: There is no significant difference between the two sample mean Hypothesis Testing Example: Problem 2: An agronomist randomly selected 20 matured calamansi trees of one variety and have a mean height of 10.8 feet with a standard deviation of 1.25 feet, while 12 randomly selected calamansi trees of another variety have a mean height of 9.6 feet with a standard deviation of 1.45 feet. Test whether the difference between the two sample is significant. Use ๏ก = 0.05. Hypothesis Testing 1. Ho: There is no significant difference between the two sample mean. ๐ฅ1 = ๐ฅ2 Ha: There is a significant difference between the two sample mean. ๐ฅ1 ≠ ๐ฅ2 df = ๐1 + ๐2 -2 2. α = 0.05 df = 20+ 12 - 2 3. Two-tailed test df = 32 - 2 4. ttab = ± 1.697 df = 30 Hypothesis Testing 5. Given: ๐ฅ1= 10.8 ๐ฅ2 = 9.6 ๐ 1 = 1.25 ๐ 2 = 1.45 ๐1 = 20 ๐2 = 12 ๐๐๐๐๐ = ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 ๐1 + ๐2 ๐๐๐๐๐ = 10.8 − 9.6 1.252 1.452 20 + 12 ๐๐๐๐๐ = ๐๐๐๐๐ = ๐๐๐๐๐ = 1.2 1.5625 2.1025 20 + 12 1.2 0.078125 + 0.17520833 1.2 0.25333333 1.2 ๐๐๐๐๐ = 0.5033223 ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = ๐. ๐๐ Hypothesis Testing 6. Since tcomp > ttab ( 2.38 > 1.697 ) Ho, rejected 7. Ha: There is a significant difference between the two sample mean. Hypothesis Testing Example: Problem 3: The average credit card debt for a recent year was P43,000. Three years earlier the average credit card debt was P41,890. Assume sample sizes of 50 were used and the standard deviations of both samples are P7,810. Is there enough evidence to believe that the average credit card debt has increased? Use ๏ก = 0.01. Hypothesis Testing 1. Ho: There is no significant difference between the two sample mean. ๐ฅ1 = ๐ฅ2 Ha: There is a significant difference between the two sample mean. ๐ฅ1 ≠ ๐ฅ2 2. α = 0.01 3. Two-tailed test 4. ztab = ±๐.575 Hypothesis Testing Hypothesis Testing 5. Given: ๐ฅ1= 43,000 ๐ฅ2 = 41,890 ๐๐๐๐๐ = ๐ 1 = 7,810 ๐ 2 = 7,810 ๐2 = 50 ๐1 = 50 ๐ = ๐๐๐๐๐ = ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 ๐1 + ๐2 ๐๐๐๐๐ = 43,000 − 41,890 7,8102 7,1802 + 50 50 ๐๐๐๐ ๐๐๐๐๐ = 1,110 60,996,100 60,996,100 + 50 50 1,110 1,219,922 + 1,219,922 1,110 2,439,844 1,110 ๐๐๐๐๐ = 1,562 ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐ or ๐๐๐๐๐ = ๐. ๐๐ Hypothesis Testing 6. Since zcomp < ztab ( 0.71 < 2.575 ) Ho, accepted 7. Ho: There is no significant difference between the two sample mean Hypothesis Testing Problem 4: A new drug is proposed to lower total cholesterol. A randomized controlled trial is designed to evaluate the efficacy of the medication in lowering cholesterol. Thirty participants are enrolled in the trial and are randomly assigned to receive either the new drug or a placebo. The participants do not know which treatment they are assigned. Each participant is asked to take the assigned treatment for 6 weeks. At the end of 6 weeks, each patient's total cholesterol level is measured and the sample statistics are as follows. Treatment Sample Size Mean Standard Deviation New Drug 15 195.9 28.7 Placebo 15 217.4 30.3 Is there statistical evidence of a reduction in mean total cholesterol in patients taking the new drug for 6 weeks as compared to participants taking placebo? Hypothesis Testing 1. Ho: There is no significant difference between the two sample mean. ๐ฅ1 = ๐ฅ2 Ha: There is a significant difference between the two sample mean. ๐ฅ1 ≠ ๐ฅ2 df = ๐1 + ๐2 -2 2. α = 0.05 df = 15+ 15 - 2 3. Two-tailed test df = 30 - 2 4. ttab = ± 1.701 df = 28 Hypothesis Testing 5. Given: ๐ฅ1= 217.4 ๐ฅ2 = 195.9 ๐ 2 = 28.7 ๐ 1 = 30.3 ๐2 = 15 ๐1 = 15 ๐๐๐๐๐ = ๐ฅ1 − ๐ฅ2 ๐ 12 ๐ 22 ๐1 + ๐2 ๐๐๐๐๐ = 217.4 − 195.9 30.32 28.72 + 15 15 ๐๐๐๐๐ = ๐๐๐๐๐ = ๐๐๐๐๐ = 21.5 919.09 823.69 + 15 15 21.5 61.206 + 54.91266667 21.5 116.11866667 21.5 ๐๐๐๐๐ = 10.77583717 ๐๐๐๐๐ = ๐. ๐๐๐๐๐๐๐๐ or ๐๐๐๐๐ = ๐. ๐๐ Hypothesis Testing 6. Since tcomp > ttab ( 2.00 > 1.701 ) Ho, rejected 7. Ha: There is a significant difference between the two sample mean. Thank You!