Docsity
Docsity

Prepare for your exams
Prepare for your exams

Study with the several resources on Docsity


Earn points to download
Earn points to download

Earn points by helping other students or get them with a premium plan


Guidelines and tips
Guidelines and tips

Tests and Confidence Intervals for Two Means, Lecture notes of Statistics

Analysis allowing variances to be different ... Y to test if the two population means are equal- ie, if ... Confidence intervals for the difference 1.

Typology: Lecture notes

2022/2023

Uploaded on 02/28/2023

jugnu900
jugnu900 🇺🇸

4.4

(7)

236 documents

1 / 9

Toggle sidebar

Related documents


Partial preview of the text

Download Tests and Confidence Intervals for Two Means and more Lecture notes Statistics in PDF only on Docsity! 1 Statistics 102 Lecture 2 L. Brown & L. Zhao Spring 2007 Tests and Confidence Intervals for Two Means Read: Sections 2.7 and 2.8 of Dielman • Do advertisements help to increase store sales? • Data from two independent samples Analysis assuming equal variances Analysis allowing variances to be different • From paired samples 2 Example: The Effect of an Ad Campaign on Store Sales A national chain of clothing stores wishes to investigate the effect of an intensive in- store ad campaign on store sales. They begin with a RANDOM sample of 28 stores. In 13 of these stores they run the ad campaign. In the remaining 15 they do not. Here are side-by-side boxplots for the weekly sales (in $1,000) in these stores. S a le s 30 40 50 60 70 80 90 100 with Campaign without Campaign ID 3 Summary Statistics from JMP Sample Measure With Campaign Without Campaign Mean 1Y = 62.85 2Y = 60.35 Std Dev s1 = 20.03 s2 = 18.39 n n1 = 13 n2 = 15 Std Error Mean 5.55 4.75 Upper 95% Mean 75.0 70.5 Lower 95% Mean 50.7 50.2 Formulas: 1 1 1 11 1 n i i Y Y n , etc. and 1 22 1 1 1 11 1 1 n i i s Y Y n Need to use sample means 1 2andY Y to test if the two population means are equal- ie, if 1 2= Notice the two population standard deviations 1 2and are unknown too. 4 Basic Statistical Setting: • Two random samples Populations assumed to be normal: With population means 1 2and With population standard deviations 1 2 and Independent samples with sample sizes 1 2 and n n Statistics computed from the samples: Sample means 1 2andY Y Sample standard deviations 1 2ands s • Goal = comparisons of the two population means - primarily a. Tests of 0 1 2:H [or of 0 1 2:H or of 0 1 2:H ] or b. Confidence intervals for the difference 1 2 9 t-tests (JMP printout) A. Assume 1 2= t-Test Difference t-Test DF Prob>|t| Estimate 2.49 0.343 26 0.7341 Std Error 7.26 Lower 95% -12.43 Upper 95% 17.42 Assuming equal variances B. Don’t assume 1 2= Welch Anova testing Means Equal, allowing Std's Not Equal F Ratio DF Num DF Den* Prob>F* 0.1164 1 24.66 0.7359 t-Test 0.341 *Here, “Prob>F” is the P-value. Also, = “DFDen” = 24.66. Note that in such a table 2 2.341 .1164t F In JMP: Use Analyze Fit Y by X platform. For test A use “Means/ANOVA/pooled t” button. For test B use “UnEqual Variances” button and ignore output you don’t need. 10 Confidence Intervals (JMP printout) A. Assume 1 2= Std Error = 7.26 (from t-Test table) DF = 1 2 2 13 15 2 26n n (or see DF in t-Test table) For 95% CI 2;26 2.056t (from Table B.2, or from JMP) 95% CI: 2.49 2.056 7.26 2.49 14.93 OR read the result from JMP: (-12.43, 17.42) You can get other %-age CIs by using Table B.2 or in JMP with the button, “Set Alpha Level”. B. Don’t assume 1 2= Std Error: This isn’t directly available in JMP. You need to calculate from the formula and Summary Table or work backward from 1 2Y Y in Summary Table via 1 2 2.49 7.31 ' .341 Y Y SE Welch s t . DF: 24.66 [ ]24 2; 2.064t 24 (from Table B.2). Or 2; 2.061t 24.66 from JMP 95% CI: 2.49 2.06 7.31 2.49 14.96 If exact t-values are not available, use 2; 2DFt so long as DF 20. 11 Matched Pairs analysis Actually, the sampling method here for choosing stores was more sophisticated than the random sampling scheme assumed above. What was actually done is that 14 pairs of stores were chosen - 28 stores in all. The two stores in each pair were pretty well matched as to overall size and usual weekly sales and demographic patterns of customers.1 One store in each pair was designated to receive the ad campaign; the other to not receive it. Unfortunately, for one pair the designated ad-store did not receive its advertising materials in time to run the campaign. Thus 13 stores actually ran the campaign and 15 did not. 1. This type of Matched-Pairs design, where the matching is performed by the statistician/analyst on the basis of additional variables (such as size and usual weekly sales) is called a Case-Control study. 12 Here is the complete data: Pair With Without Difference 1 67.2 65.3 1.9 2 59.4 54.7 4.7 3 80.1 81.3 -1.2 4 47.6 39.8 7.8 5 97.8 92.5 5.3 6 38.4 37.9 0.5 7 57.3 52.4 4.9 8 75.2 69.9 5.3 9 94.7 89 5.7 10 64.3 58.4 5.9 11 31.7 33 -1.3 12 49.3 41.7 7.6 13 54 53.6 0.4 14 * 63.2 * 14 * 72.6 * 13 Matched Pairs Test The matched-pair method tests whether 1 = 2 after taking into account store size, etc. Look at the pairwise differences, and use them to test H0: difference = 0 versus Ha: difference 0. In doing this test we’ll have to ignore the results from the two stores in Pair 14, since neither of them had the ad campaign. Given the sample mean and standard deviation of the differences you should be able to compute the relevant t-Test statistic, the p-value, and the 100(1- )% CI. But JMP will (also) do this for you: 14 JMP Output Variable: Differences Moments Mean 3.66 Std Dev 3.19 Std Error Mean 0.88 Upper 95% Mean 5.58 Lower 95% Mean 1.73 N 13 Test Mean=value Hypothesized Value 0 Actual Estimate 3.65 t Test Test Statistic 4.14 Prob > |t| 0.0014 Conclusion: Taking into account the store sizes, etc. an ad campaign does improve store sales (with P-value .0014) by between $1,730 and $5,580 per week (95% CI).