Download presentation
Presentation is loading. Please wait.
Published byJanice Price Modified over 8 years ago
1
1 2 Sample Tests – Small Samples 1.Small sample, independent groups a. Test of equality of population variances b. If variances are equal, t-test c. If variances are not equal, Wilcoxon Rank Sum Test 2. Examples
2
2 1b. Small samples, independent groups We now turn to the case of comparing means for two independent, small samples (ns < 30). * There are 2 ways to do this – depending upon whether the two population variances are equal or different. * In order to know which method we should use, we have to test the hypothesis H 0 : 1 2 = 2 2 * So for small, independent samples, there are always 2 steps– test the variances, then test the means.
3
3 1b. Small samples, independent groups VERY IMPORTANT POINT: * We can only use the independent groups t-test when the two population variances are equal. * We must not assume that 1 2 = 2 2. * We must test H 0 : 1 2 = 2 2. * The test of hypothesis about the two population variances uses the ratio F= ( 1 2 / 2 2 ).
4
4 1b. Small samples, independent groups On an exam, you must test the hypothesis of equal variances before doing the independent groups t- test! If H 0 : 1 2 = 2 2 is rejected, we use the Wilcoxon Rank Sum test instead of the t-test. Note: before t-test only; not before Z test.
5
5 Test of hypothesis of equal variances Notes: * Next slide shows a formal statement of test of hypothesis about two population variances. * Both one-tailed and two-tailed tests are shown. * When you test equality of variances before doing small sample, independent groups t-test, always do a two-tailed test. * One-tailed test of equality of variances has other uses.
6
6 Test of hypothesis of equal variances H 0 : 1 2 = 2 2 H A : 1 2 < 2 2 H A : 1 2 ≠ 2 2 or 1 2 > 2 2 Test statistic:F =S 1 2 S 2 2
7
7 Test of hypothesis of equal variances Rejection region: One-tailedTwo-tailed: F > F α F > F α/2 d.f. = (n 1 – 1), (n 2 – 1) (See note on next slide.)
8
8 α α given in F table is value for upper tail. Since the F distribution is not symmetric, we have to compute critical F for lower tail.
9
9 Computing critical F values for lower tail Critical F for upper tail of distribution is found in Table VII, using α and d.f. Critical F for lower tail of distribution: 1 F α, n2-1, n1-1 Note that d.f. are inverted!
10
10 1b. Small samples, independent groups Now – back to our t-test. * If you do NOT reject H 0 in the test of equality of variances, then you can pool the two sample variances: S p 2 = (n 1 -1)s 1 2 + (n 2 -1)s 2 2 n 1 + n 2 - 2
11
11 1b. Small samples, independent groups H 0 : 1 – 2 = D 0 H A : 1 – 2 > D 0 H A : 1 – 2 ≠ D 0 or: 1 – 2 < D 0 Test statistic:t = – D 0 X1X1 X2X2 ( ) S p 2 1 1 n 1 n 2 ()
12
12 1b. Small samples, independent groups Rejection region: One-tailed:Two-tailed: t t α/2 or t > t α
13
13 1b. Small samples, independent groups Wilcoxon Rank Sum Test * first, combine the two samples and rank order all the observations. * smallest number has rank 1, largest number has rank N (= sum of n 1 and n 2 ). * separate samples and add up the ranks for the smaller sample. (If n 1 = n 2, choose either one.) * test statistic : rank sum T for smaller sample.
14
14 1b. Small samples, independent groups Wilcoxon – One-tailed Hypotheses: H 0 : Prob. distributions for 2 sampled populations are identical. H A : Prob. distribution for Population A shifted to right of distribution for Population B. (Note: could be to the left, but must be one or the other, not both.)
15
15 1b. Small samples, independent groups Wilcoxon – Two-tailed Hypotheses: H 0 : Prob. distributions for 2 sampled populations are identical. H A : Prob. distribution for Population A shifted to right or left of distribution for Population B.
16
16 1b. Small samples, independent groups Wilcoxon – Rejection region: (With Sample taken from Population A being smaller than sample for Population B) – reject H 0 if T A ≥ T U or T A ≤ T L
17
17 1b. Small samples, independent groups Wilcoxon for n 1 ≥ 10 and n 2 ≥ 10: Test statistic: Z = T A – n 1 (n 1 + n 2 + 1) 2 n 1 n 2 (n 1 + n 2 + 1) 12
18
18 Wilcoxon for n 1 ≥ 10 and n 2 ≥ 10 Rejection region: One-tailedTwo-tailed Z > Z α │Z│ > Z α/2 Note: use this only when n 1 ≥ 10 and n 2 ≥ 10
19
19 Example 1 A retail store sales consultant is asked to determine whether customers at stores which require memberships spend more on average than customers at ordinary stores where you don’t have to buy a membership to shop. She surveys as group of 7 randomly selected customers leaving no-membership-required stores and 8 different randomly selected customers leaving membersip-required stores, recording the amount of their purchases shown on their sales receipts. The data are shown below. Is there evidence that customers at the membership-required stores, on average, spend more money on a single trip to the store than customers at no-membership-required stores? (α =.05)
20
20 Example 1 Amount spent No membership required Membership required 4144 2836 3835 3243 243936 2950 37
21
21 Example 1 This question involves a test of hypothesis about 2 population means, using the means of two small, independent samples. Thus, the first step is the test of hypothesis about the population variances, σ 1 2 and σ 2 2.
22
22 Example 1 No membership required: X = 32.57 σ 2 = 7646 – 7426.29= 36.62 6 Membership required: X = 40.0 σ 2 = 12992 – 12800= 27.42 7
23
23 Example 1 H O : σ 1 2 = σ 2 2 H A : σ 1 2 ≠ σ 2 2 F critical = F (6, 7,.025) = 5.12 (from table) F obt = 36.62= 1.355 < 5.12 27.42 Therefore, we can do a t-test.
24
24 Example 1 H O : μ non 2 = μ mem 2 H A : μ non 2 < μ mem 2 t critical = t (n – 2, α) = t (13,.05) = 1.771 s 2 p = 6 (36.62) + 7 (27.42) = 31.67 13
25
25 Example 1 t obt = 40 – 32.57 31.67 + 31.67 7 8 = 7.43 4.524 + 3.959 = 7.43= 2.55 reject H O. 2.913
26
26 Example 2 Many people are confused about the distinction between Cajun and Creole cooking. One possible distinction is that Cajun food contains more cayenne and other peppers and is thus “hotter” than Creole food. To test this hypothesis, the “heat” (measured in Scoville Units) of random samples of Cajun and Creole dishes is compared, yielding the data on the next slide. Do these data support the hypothesis that Cajun dishes are hotter than Creole dishes (α =.05)?
27
27 Example 2 Scoville Heat Units Cajun DishesCreole Dishes 35003100 42004700 41002700 47003500 42002000 37053100 41001550
28
28 Example 2 Cajun: σ 2 = 890592.8572 = 148432.14 6 Membership required: σ 2 = 66334999.98 = 1055833.33 7
29
29 Example 2 H O : σ 1 2 = σ 2 2 H A : σ 1 2 ≠ σ 2 2 F critical = F (6, 6,.025) = 5.82 (from table) F obt = 1055833.33 = 7.11 > 5.82 148432.14 Therefore, we cannot do a t-test. We do a Wilcoxon.
30
30 Example 2 H O : Cajun distribution and Creole distribution are identical. H A : Cajun distribution is shifted to the right relative to the Creole distribution. Test statistic: T (rank sum total) for Cajun dishes T critical: T U = 66 or T L = 39
31
31 Example 2 Scoville Heat Units Cajun RankCreole Rank 3500 6.53100 4.5 4200 11.54700 13.5 4100 9.52700 3 4700 13.53500 6.5 4200 11.52000 2 3705 83100 4.5 4100 9.51550 1 70 35
32
32 Example 2 Check accuracy of rank sum total T: T A + T B = 105 = n*(n+1) = 14*15 = 105 2 2 T A > T U = 70. Reject H O – Cajun dishes are hotter than Creole dishes.
33
33
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.