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
COMPARING MEANS: INDEPENDENT SAMPLES 1ST sample: x1, x2, …, xm from population with mean µx; 2nd sample: y1, y2, …, yn from population with mean µy; GOAL: Determine if µx = µy based on the two samples. Test Ho: µx = µy vs Ha: µx ≠ µy or Ha: µx > µy or Ha: µx < µy Procedure depends on what can we assume about variability of the populations: σx and σy. CASE1. σx and σy are known. CASE2. σx and σy are not known, but may be assumed equal σx=σy CASE3. σx and σy are not known, and can not be assumed equal. Test statistics are developed for each of the 3 cases. COMPARING MEANS: INDEPENDENT SAMPLES CASE 1: σx and σy known Test on significance level α. STEP1. Ho: µx = µy STEP 2. Test statistic: vs Ha: µx ≠ µy or z= x−y σ x2 m + σ 2 y Ha: µx > µy . n Under the Ho, the test statistic has standard normal distribution. STEP 3. Critical value? For one-sided test zα, for two-sided zα/2 . STEP 4. DECISION-critical/rejection region(s) depends on Ha. Ha: µ ≠ µo Reject Ho if |z|> zα/2; Ha: µ > µo Reject Ho if z > zα; Ha: µ < µo Reject Ho if z < - zα. STEP 5. Answer the question in the problem. COMPARING MEANS: INDEPENDENT SAMPLES CASE 2: σx and σy not known, but assumed equal. STEP 2. Test statistic: where s 2p t= x−y , 1 1 + sp m n is a pooled estimate of the common variance 1 2 2 s = ( m 1) s ( n 1) s − + − { x y }. m+n−2 2 p Under the Ho, the test statistic has t distribution with df = m+n-2. STEP 3. Critical value? One-sided test tα, two-sided tα/2 . STEP 4. DECISION-critical/rejection region(s) depends on Ha. Ha: µ ≠ µo Reject Ho if |t|> tα/2; Ha: µ > µo Reject Ho if t > tα; Ha: µ < µo Reject Ho if t < - tα. COMPARING MEANS: INDEPENDENT SAMPLES CASE 3: σx and σy not known, and may not be assumed equal. STEP 2. Test statistic: t= x−y 2 y . sx2 s + m n Under Ho, the degrees of freedom for the t distribution may be approximated by df=min(m-1, n-1). STEP 3. Critical value? One-sided test tα, two-sided tα/2 . STEP 4. DECISION-critical/rejection region(s) depends on Ha. Ha: µ ≠ µo Reject Ho if |t|> tα/2; Ha: µ > µo Reject Ho if t > tα; Ha: µ < µo Reject Ho if t < - tα. EXAMPLE1 A medication for blood pressure was administered to a group of 13 randomly selected patients with elevated blood pressure while a group of 15 was given a placebo. At the end of 3 months, the following data was obtained on their Systolic Blood Pressure. Control group, x: n=15, sample mean = 180, s=50 Treated group, y: m=13, sample mean =150, s=30. Test if the treatment has been effective. Assume the variances are the same in both groups and use α=0.01. Soln. Let µx= mean blood pressure for the control group; µy= mean blood pressure for the treatment group. x Then, n=15, = 180, sx=50, m=13, equality of variances/st.dev. σx=σy y =150, sy =30. Assumed EXAMPLE1 contd. STEP1. Ho: µx = µy (medicine not effective) vs Ha: µx > µy (med. effective) STEP 2. Pooled variance: s 2p = (m − 1) sx2 + (n − 1) s y2 m+n−2 (15 − 1)502 + (13 − 1)302 = = 1761.54. 15 + 13 − 2 Standard deviation s p = s 2p = 1761.54 = 41.97 Test statistic: t= x−y 180 − 150 = = 1.8863. 1 1 1 1 41.97 + + sp 15 13 m n STEP 3. Critical value=t0.01=2.479, df=26. STEP 4. t=1.8863 not > 2.479, do not reject Ho. STEP 5. Not enough evidence to conclude that the medicine is effective. (1-α)100% CONFIDENCE INTERVAL FOR (µx- µy) CASE 1: σx and σy known ( x − y ) ± zα /2 σ x2 m + σ y2 n . CASE 2: σx and σy not known, but assumed equal. ( x − y ) ± tα /2 s p 1 1 + . m n Use t distribution with df=m+n-2. CASE 3: σx and σy not known, and may not be assumed equal. ( x − y ) ± tα / 2 Use t distribution with df=min(m-1, n-1). 2 sx2 s y + . m n EXAMPLE1 contd. Construct a 95% CI for the difference in the means of blood pressures for the two groups (µx - µy). Soln. We already know n=15, sy =30, sp=41.97. x = 180, sx=50, m=13, y =150, CASE 2. 95% CI, so α=0.05, so α/2=0.025, t(26)0.025 = 2.056. 95% CI is: (180 − 150) ± (2.056)(41.97) 1 1 + = (−2.7, 62.7). 13 15 NOTE: The interval contains zero. Intuitively, that conforms our decision that there is no difference in means between the medicine and the placebo. MINITAB EXERCISE Is there a significant difference between test scores on the 1st and 2nd test? Use data in example176.xls (see class web site). MINITAB EXAMPLE contd. Two Sample T-Test and Confidence Interval Two sample T for exm1 vs exm2 Boxplots of exm1 and exm2 (means are indicated by solid circles) N Mean StDev SE Mean exm1 30 77.2 10.5 1.9 exm2 30 69.0 21.9 4.0 100 90 80 70 60 50 40 30 20 exm1 95% CI for mu exm1 - mu exm2: ( -0.8, 17.1) T-Test mu exm1 = mu exm2 (vs not =): T = 1.85 P = 0.072 DF = 41 exm2