Survey
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project
Chapter 10, sections 1 and 4 Two-sample Hypothesis Testing • Test hypotheses for the difference between two independent population means (standard deviations known or unknown) • Use the F table to find critical F values • Complete an F test for the difference between two variances Difference Between Two Means Goal: Test hypothesis or form a confidence interval for the difference between two population means, μ1 – μ2. Assumptions: • Different data sources-- populations are Unrelated and Independent • two samples are randomly and independently drawn from these populations. • Sample selected from one population has no effect on the sample selected from the other population • population distributions are normal or both sample sizes are 30 Sample 1 : X 1, S1, n1 Population 1 : 1, 1 Sample 2 : X 2, S2 , n2 Population 2 : 2, 2 Possible Hypotheses Are: Two-tail test: Upper-tail test: H0: μ1 = μ2 H1: μ1 ≠ μ2 H0: μ1 ≤ μ2 H1: μ1 > μ2 i.e., H0: μ1 – μ2 = 0 H1: μ1 – μ2 ≠ 0 i.e., H0: μ1 – μ2 ≤ 0 H1: μ1 – μ2 > 0 Lower-tail test: H0: μ1 μ2 H1: μ1 < μ2 i.e., H0: μ1 – μ2 0 H1: μ1 – μ2 < 0 • Population standard deviations are known, σ1 and σ2 known, use Z test. • The test statistic for μ1 – μ2 , based on sample sample means, ( X X ) is: X Z 1 1 2 X μ μ 2 1 σ σ n n 2 2 2 1 2 1 2 Standard Error of the pooled population, σ • The Confidence interval for μ1 – μ2 is: ( 1 2) X1 X 2 2 2 σ1 σ2 Z n1 n2 X1X 2 σ1 and σ2 Unknown Assumptions: Samples are randomly and independently drawn Populations are normally distributed or both sample sizes are at least 30 Population variances are unknown but assumed equal, σ1 and σ2 unknown, but known to be equal The population variances are assumed equal, so use the two sample standard deviations and pool them to estimate σ The test Statistic for μ1 – μ2 has a t distribution with a degree of freedom of (n1+n2-2): X t 1 X 2 μ1 μ2 1 1 S p n1 n2 2 • Where: 2 Sp n 1 1 S 1 n2 1 S 2 (n1 1 ) ( n2 1) 2 2 • The confidence interval for μ1 – μ2 is: ( 1 2 ) X 1 X 2 t n1 n 2 - 2 1 1 S n1 n 2 2 p • Example: • Last week you were given a sample of 69 beer, 54 are U.S.-made and 15 are foreign-made. Additional information were provided with respect to price, calories, and percent alcohol content. • Let’s assume the two populations are unrelated, independent, and approximately normally distributed with equal variance • Assume that the two samples are independently drawn. Samples Information: Price($) Calories %Alcohol Content NON U.S. Sample Mean Std Deviation Sample size Variance 5.86 0.90 15 $0.82 138.60 27.61 15 $762.40 4.13 1.74 15 $3.04 Mean Std Deviation Sample size Variance 4.71 1.48 54 2.18 143.39 30.67 54 940.73 4.50 1.53 54 2.35 U.S. Sample • Questions: 1. Is there evidence of a difference in mean calories of us and non-U.S. beers? 2. What is the 95% confidence interval for the difference in mean calories? 3. Are conclusions in 1 and 2 consistent? 4. U.S. beers have about 10% more alcohol than non-U.S. beers. 5. Is the assumption of equal population variances, that you used for 1 and 4 a valid assumption? 6. Is there evidence that there is less variation in price of imported beers than price of domestic beers Hypothesis Tests for Variances • Test of two population variances • Hypotheses: H0: σ12 = σ22 H1: σ12 ≠ σ22 H0: σ12 / σ22=1 H1: σ12 / σ22≠1 H0: σ12 σ22 H1: σ12 < σ22 H0: σ12 / σ22 1 H1: σ12 / σ22 <1 Lower-tail test H0: σ12 ≤ σ22 H1: σ12 > σ22 H0: σ12 / σ22 ≤1 H1: σ12 / σ22 >1 Upper-tail test Two-tail test • The test statistic from samples is 2 F(n 1 1 ), ( n 2 1 ), S1 2 S2 S12 = Variance of Sample 1 n1 - 1 = numerator degrees of freedom S22 = Variance of Sample 2 n2 - 1 = denominator degrees of freedom • F-Distribution can take values from 0 to infinity • It is a right-skewed distribution 1. Finding the critical lower and upper tail values 2. Find FU from the F table for n1 – 1 numerator and n2 – 1 denominator degrees of freedom 3. Find FL using the formula: • FL 1 FU* Where FU* is from the F table with n2 – 1 numerator and n1 – 1 denominator degrees of freedom (i.e., switch the d.f. from FU) /2 /2 Do not reject H0 0 H0: σ12 = σ22 H1: σ12 ≠ σ22 F FL FU