CHAPTER 7 Tests for the Population Mean - Sections: 7.1 & 7.2 1. 2. 3. 4. -- Tests about the mean sigma given -- Tests for the mean with sigma not given -- Matched pairs t procedures -- Comparing the means of two populations (independent samples) Hypotheses Testing About The Mean (mu): Single Population With (sigma) Given NULL HYPOTHESIS Ho : o ONE SAMPLE ZSTATISTIC ALTERNATIVE HYPOTHESIS REJECT Ho AT LEVEL IF: P-VALUE Ha : o zobs z* P[Zzobs] Ha : o zobs z* P[Z - zobs] Ha : zobs z* OR zobs z* 2P[Z |zobs|] Notation and Conditions 1. The Z-statistic has the Standard Normal distribution, provided the sample is taken from a normal population OR n 30. 2. zobs is the observed value of the statistic computed from the sample data. 3. z* or z*/2 is the critical z-value based on the given (one-sided alternative) or /2 (two-sided alternative). TEST ABOUT THE MEAN OF A SINGLE POPULATION ( Known) EXAMPLE A company that produces snack foods uses a machine to package 454 oz bags of peanuts. We will assume that the net weights are normally distributed with mean 454 oz and that the standard deviation of all such weights is 7.8 oz. To test whether the machine is working properly, we check the weights of 25 bags. The weights are as follows: 465 468 447 456 433 456 438 454 456 454 463 435 447 450 450 449 446 447 442 447 444 449 456 446 452 At the 10% level of significance, does the sample provide sufficient evidence to conclude that the packaging machine is not working properly? SOLUTION: Step 1. Population parameter under investigation: = True mean weight of a bag of peanuts packaged by the machine. Null Hypothesis Ho : = 454 oz Alternative Hypothesis Ha : 454 Step 2. Test statistic: Here we can use the one-sample Z-statistic because the population standard deviation is given. Step 3. Decision Rule: Reject Ho with a = 0.10 if: zobs z = 1.645 OR zobs - z = - 1.645 Step 4. Drawing the conclusion based on the available data. For the 25 bags whose weights we have, the sample mean = 450 therefore, Since -2.56 falls inside the rejection region, the test rejects the null hypothesis. Our conclusion should be that the true mean weight of a bag of peanuts packaged by the machine is not equal to 454 oz. Therefore the packaging machine is not working properly. Step 5 Computing the P-value P-Value = 2*P[Z > |-2.56|] = 2*(.0052) = 0.0105 or 1.05% Using the TI-83 to carry out the test Enter the data into L1 > STAT > TESTS > 1:Z-Test Hypotheses Testing About The Mean (mu): Single Population With (sigma) Not Given NULL HYPOTHESIS Ho : o ONE SAMPLE TSTATISTIC ALTERNATIVE HYPOTHESIS REJECT Ho AT LEVEL IF: P-VALUE Ha : o tobs t* P[Ttobs] Ha : o tobs t* P[T - tobs] Ha : tobs t* OR tobs t* 2P[T |tobs|] Notation and Conditions 1. The T-statistic has the student t-distribution with df = n - 1 provided random sample is from a normal population OR n 2. tobs is the observed value of the statistic, which is computed from the sample data. 3. t* or t*/2 is the critical t-value based on the given (one-sided alternative) or /2 (twosided alternative). TEST ABOUT THE MEAN OF A SINGLE POPULATION (Not known) EXAMPLE The following figures show the amount of coffee (in ounces) filled by a machine in six randomly picked jars. 15.7 15.9 16.3 16.2 15.7 15.9 At the 2.5% level of significance, is the true mean amount of coffee filled in a jar less than 16 ounces? Assume a normal distribution for the amount of coffee filled in a jar. SOLUTION: Step 1 Population parameter under investigation: = True mean amount of coffee filled in a jar by the machine. Null Hypothesis Ho : = 16 oz Alternative Hypothesis Ha : 16 oz Step 2. Test statistic: Because the population standard deviation is not given, we use the one-sample T-statistic. Step 3. Decision Rule: Reject Ho with = 0 .025 if: tobs t = -2.571 To find twe use table D with df = 5) Step 4. Drawing the conclusion based on the available data. For the 6 jars whose weights we have, the sample mean deviation s = 0.251 oz. = 15.95 oz and the sample standard Therefore, Since -0.4879 falls outside the rejection region, the test does not reject the null hypothesis. Our conclusion should be that the true mean amount of coffee filled in a jar by the machine is not less than 16 oz. Step 5. Computing the P-value (a) Using Table D In the row with df = 5 of Table D, look for the two t-values the bracket the absolute value of the test statistic (i.e., tobs ). Hera that value is |-0.4879| or 0.4879. Because the value 0.4879 of tobs is smaller than the lowest t-value of 0.727 we find in row 5 of the table, the p-value = P[T < -0.4879] = P[T > 0.4879] must be larger than 0.25 (or 25%), the Upper-tail probability p for t = 0.727. (b) Using the TI-83 Use the tcdf( ) function found on the 2nd|DISTR screen of the TI-83. This function works like the normalcdf ( ) function for computing normal probabilities. To compute a probability using tcdf( a, b, df) = P[ a < T < b] where T follows the t-distribution. df = the degrees of freedom. In our case, tcdf(-100, -0.4879, 5) = 0.3231 or 32.31%. Using the TI-83 to carry out the test Enter the data into L1 > STAT > TESTS > 2:T-Test Comparing Two Treatments: Matched Pairs T-Procedures (Before & After) NULL HYPOTHESIS Ho : D TEST STATISTIC ALTERNATIVE HYPOTHESIS REJECT Ho AT LEVEL P-VALUE IF: Ha : D tobs t* P[Ttobs] Ha : D tobs t* P[T - tobs] Ha : D tobs t* OR tobs t* 2P[T |tobs|] Notation and Conditions 1. The T-statistic has the student t-distribution with df = n - 1 provided random sample is from a normal population OR n . 2. tobs is the observed value of the statistic, which is computed from the sample data. 3. t* or t*/2 is the critical t-value based on the given (one-sided alternative) or /2 (twosided alternative). Difference in population means using the paired t-Test (Dependent samples) EXAMPLE. Is it safe for an individual to drive after drinking two beers? To test whether consuming alcohol impairs driving ability, the DMV conducted the following experiment. Seven volunteers were asked to drive through an obstacle course prior to consuming any alcohol and again after drinking two beers. Driving ability was measured by recording the total reaction time (in seconds) of a driver in avoiding the various obstacles on the course. The data are given below. Driver Reaction time w/o alcohol Reaction time w alcohol Difference (After - Before) 1 8.82 10.61 1.79 2 6.62 8.18 1.56 3 9.84 12.24 2.4 4 10.81 13.45 2.64 5 9.20 8.88 -0.32 6 11.67 10.88 -0.79 7 4.42 5.38 0.96 At the 5% level of significance, is it true that consumption of two beers impairs driving ability? Assume differences between reaction times before & after are normally distributed. SOLUTION: In this type of test we compute the difference D = after - before (we could compute the difference "before - after" if we wanted) and test the null hypothesis Ho: D = 0 against one of the alternatives: Ha: D 0 Ha: D 0 Ha: D ≠ 0 Step 1. Population parameter under investigation: D = True mean difference between "after - before". Null Hypothesis Ho : D = 0 Alternative Hypothesis Ha : D0 (i.e., mean reaction time "after" is larger than mean reaction time "before") If we can reject the null hypothesis, we would prove that the true mean of all differences "after before" is greater than zero. i.e., that the reaction time "after" is greater than the reaction time "before". Step 2. Test statistic: Because the differences are normally distributed, the sample statistic has the student tdistribution with degrees of freedom df = 6. Step 3. Decision Rule: Reject Ho with = 0 .05 if: tobs t We find tusing table D with df = 7 - 1 = 6 Step 4. Drawing the conclusion based on the available data. For the 7 volunteers who took part in this experiment, the sample mean difference "after before" and sample standard deviation of these differences were: = 1.177143 sec. and s = 1.31122 sec. Therefore, Since 2.375 falls inside the rejection region, our test rejects the null hypothesis. Our conclusion should be that the true mean difference in reaction times "after - before" is greater than 0. Therefore the test, at this level, has shown that after drinking two beers drivers do take longer to react. Step 5 Computing the P-value (a) Using table D The two t-values in table D the bracket tobs = 2.375 in row 6 are 1.943 & 2.447. The Upper-tale probabilities that correspond to these two vales are .05 & .025. Since 1.943 < 2.375 < 2.447 ==> .025 < P[t >2.375] < .05 (b) Using the tcdf( ) function of TI-83 P[t >2.375] = tcdf(2.375, 100, 6) = 0.0276 or 2.76% Using the TI-83 to carry out the test Enter the data (differences) into L1 > STAT > TESTS > 2:T-Test Comparing The Means of Two Populations: Two Independent Samples NULL HYPOTHESIS ALTERNATIVE HYPOTHESIS Ho : TWO SAMPLE T-STATISTIC Ha : REJECT Ho AT LEVEL IF: P-VALUE tobs t* P[Ttobs] Ha : tobs t* P[T - tobs] Ha : tobs t* OR tobs t* 2P[T |tobs|] Notation and Conditions 1. The T-statistic has the student t-distribution with df* = the smaller of n1 - 1 or n2 - 1, provided the samples come from two normal populations (or that eache sample size is greater than 30) normal population OR n 2. tobs is the observed value of the statistic, which is computed from the sample data. 3. t* or t*/2 is the critical t-value based on the given (one-sided alternative) or /2 (twosided alternative). (*) When the sample sizes are large, the two sample t-procedures are fairly accurate with df = the smaller of n1-1 or n2-1. With small sample sizes it is recommended that t*be computed using the t-distribution with degrees of freedom calculated using the formula: COMPARING THE MEANS AND OF TWO POPULATIONS (INDEPENDENT LARGE SAMPLES) EXAMPLE. When 100 raw commercial apples of Variety A and 150 of Variety B were tested for their iron content (in milligrams), the following information was obtained. Sample Mean (in milligrams) Sample Standard Deviation Variety A 0.32 0.08 Variety B 0.29 0.05 At the 5% level of significance, do the two varieties of apples differ in their iron content? SOLUTION: Step 1. Population parameters under investigation: = True mean iron content of apples of variety A. = True mean iron content of apples of variety B. Null Hypothesis Ho : = Alternative Hypothesis Ha : Step 2. Test statistic: Because both sample sizes are large, the standard normal distribution Z is a good approximation for the distribution of the T-statistic. i.e., The distribution of T is approximately normal with mean 0 & standard deviation 1. Step 3. Decision Rule: Reject Ho with = 0 .05 if: tobs z = 1.960 OR tobs - z = - 1.960 Step 4. Drawing the conclusion based on the available data. Since 3.34 falls inside the rejection region our test rejects the null hypothesis. The mean iron content in the two varieties of apples is different. Step 5. Computing the p-value P-value = 2*P[Z > 3.34] = 0.0004 or 0.04% Using the TI-83 to carry out the test STAT > TESTS > 4:2-SampTTest...
© Copyright 2024