business statistics (bk/iba) tutorial 3 full...
TRANSCRIPT
BS 1 Tutorial 3
Business Statistics (BK/IBA)
Tutorial 3 โ Full solutions
Instruction
In a tutorial session of 2 hours, we will obviously not be able to discuss all questions. Therefore, the
following procedure applies:
โข we expect students to prepare all exercises in advance;
โข we will discuss only a selection of exercises;
โข exercises that were not discussed during class are nevertheless part of the course;
โข students can indicate their wish list of exercises to be discussed during the session;
โข teachers may invite students to answer questions, orally or on the blackboard.
We further understand that your time is limited, and in particular that your time between lecture and
tutorial may be limited. In case you have no time to prepare everything, we kindly advise you to give
priority to the exercises that are indicated with the icon. This does not mean that the other questions
are not relevant!
5A ๐๐: estimates, confidence intervals, and tests
Q1 (based on Doane & Seward, 4/E, 8.57)
The weights of 20 oranges (in ounces) are shown below.
(Data are from a project by statistics student Julie Gillman.)
5.50 6.25 6.25 6.50 6.50 7.00 7.00 7.00 7.50 7.50
7.75 8.00 8.00 8.50 8.50 9.00 9.00 9.25 10.00 10.50
a. Check that ๏ฟฝ๏ฟฝ = 7.7750 and ๐ = 1.3325.
b. Construct a 95 percent confidence interval for the population standard deviation. Note: Scale
was only accurate to the nearest 1/4 ounce.
Sol (๐โ1)๐ 2
๐๐ข2 < ๐2 <
(๐โ1)๐ 2
๐๐2 so
(20โ1)1.33252
32.852< ๐2 <
(20โ1)1.33252
8.907 so 1.0269 < ๐2 < 3.788
Extra Take the square root of the lower and upper CI values given to get the CI for the standard
deviation of the population.
Q2 (Doane & Seward, 4/E, Minicase 9.63)
A sample of size ๐ = 19 has variance ๐ 2 = 1.96. At ๐ผ = .05 in a right-tailed test, does this
sample contradict the hypothesis that ๐2 = 1.21?
Sol (i) ๐ป0: ๐2 โค 1.21; ๐ป1: ๐2 > 1.21; ๐ผ = 5%
(ii) Sample statistic: ๐2; reject for large values
(iii) Distribution test statistic under ๐ป0: (๐โ1)๐2
๐2 ~๐2(๐ โ 1)
Requirements: population must be normally distributed
(iv) Calculated test statistic: ๐๐๐๐๐2 = 29.16
Critical value: ๐๐๐๐๐ก2 (18; 0.05) = 28.87
Q1 1.0269<๐2
<3.788
Q2 reject ๐ป0 (there is reason to believe that the variance is larger than 1.21)
BS 2 Tutorial 3
(v) Decision: Reject the null hypothesis because ๐๐๐๐๐
2 > ๐๐๐๐๐ก2 and conclude there is reason to
believe that the variance is larger than 1.21.
Extra The requirement of a normally distributed population holds for any size, also for ๐ โฅ 30!
The formulation of the question is a bit awkward: there is an =-sign, suggesting two-sided, but
the sentence contains the word โright-tailedโ.
5B Median: non-parametric tests
Q1 (based on Doane & Seward, 4/E, Minicase 10.3)
The table below shows the results of a weight-loss contest sponsored by a local newspaper.
Participants came from all over the city, and were encouraged to compete over a 1-month
period.
Obs Name After (pounds) Before
(pounds)
Difference
1 Mickey 203.8 218.3 โ14.5
2 Teresa 179.3 189.3 โ10.0
3 Gary 211.3 226.3 โ15.0
4 Bradford 158.3 169.3 โ11.0
5 Diane 170.3 179.3 โ9.0
6 Elaine 174.8 183.3 โ8.5
7 Kim 164.8 175.8 โ11.0
8 Cathy 154.3 162.8 โ8.5
9 Abby 171.8 178.8 โ7.0
10 William 337.3 359.8 โ22.5
11 Margaret 175.3 182.3 โ7.0
12 Tom 198.8 211.3 โ12.5
At ๐ผ = .01, can we โproveโ the claim that the mean weight loss is more than 8 pounds? See the
SPSS output below. Do the test assuming that the differences are normally distributed.
BS 3 Tutorial 3
Sol a. Consider the vector of differences ๐ท. Five-step procedure:
(i) ๐ป0: ๐๐ท โฅ โ8; ๐ป1: ๐๐ท < โ8; ๐ผ = 0.01
(ii) Sample statistic ๏ฟฝ๏ฟฝ; reject for small values
(iii) Under ๐ป0, ๐ก =๏ฟฝ๏ฟฝโ๐๐ท
๐๐ท/โ๐~๐ก๐โ1 = ๐ก11; it was given what we could assume that the population
(of differences) is normally distributed
(iv) Calculated test statistic: โ11.375โ(โ8)
1.2630= โ2.6722; critical values: โ2.718
(v) Decision: do not reject ๐ป0 because ๐ก๐๐๐๐ > ๐ก๐๐๐๐ก and conclude that there is no reason to
doubt the hypothesis that ๐๐ท โฅ โ8.
Extra Note that the standard deviation of the differences is very much smaller than the standard
deviations of the individual variables!
Q2 (based on Doane & Seward, 4/E, Minicase 10.3)
We repeat the previous question, now assuming that the differences are symmetrically
distributed. Use the table and SPSS output below.
Q1 do not reject ๐ป0 (there is no reason to doubt the hypothesis that ๐๐ทโฅโ8.)
BS 4 Tutorial 3
Legend: Column 1: data, Column 2: sorted data, Column 3: data โ(โ8), Column 4: remove
zeros, Column 5: assign ranks to absolute values and give signs (note: 1 and 2 are equal 1.5,
3 and 4 and 5 are equal 4), Column 6: add positive ranks, Column 7: count signs for sign
test.
Sol Problem: ๏ฟฝ๏ฟฝ is no longer normally distributed because of the small sample size. Idea: subtract
โ8 from all differences. Then replace observations by ranks of absolute values and add sign
according to larger or smaller.
(i) ๐ป0: ๐๐ท โฅ โ8; ๐ป1: ๐๐ท < โ8 (mean ๐ or median ๐, but symmetry is given); ๐ผ = 0.01
(ii) Sample statistic: ๐ (Sum of positive Ranks); reject for small values (make graph under
๐ป1!)
(iii) Distribution test statistic under ๐ป0: ๐~? . Use Signed-Ranks table for critical values from
distribution!
Requirements: Differences are symmetrically distributed
(iv) Calculated test statistic: ๐๐๐๐๐ = 8
Critical values: 10 (the smaller one! One-tailed test)
(v) Decision: do reject ๐ป0 (but it is close), because ๐๐๐๐๐ = 8 โค ๐๐๐๐๐ก = 10. Conclude that
there is no evidence that the mean difference is larger than โ8.
Extra Note: if no table available or if we state that normal approximation must be used:
H0: ME = -8 TRUE TRUE TRUE
TRUE TRUE
xi xi Xi - -8 Xi - -8 Rank(|.|) Sign Test
-14,5 -22,5 -14,5 -14,5 -12 -12 -1
-10 -15 -7 -7 -11 -11 -1
-15 -14,5 -6,5 -6,5 -10 -10 -1
-11 -12,5 -4,5 -4,5 -9 -9 -1
-9 -11 -3 -3 -7,5 -7,5 -1
-8,5 -11 -3 -3 -7,5 -7,5 -1
-11 -10 -2 -2 -6 -6 -1
-8,5 -9 -1 -1 -4 -4 -1
-7 -8,5 -0,5 -0,5 -1,5 -1,5 -1
-22,5 -8,5 -0,5 -0,5 -1,5 -1,5 -1
-7 -7 1 1 4 4 1
-12,5 -7 1 1 4 4 1
8 70 2 10
Signed Ranks
Test
Xi - ME Rank|..|
Signed Ranks
Sign |..|
N Mean Rank Sum of Ranks
After - Negative Ranks 10 a 7,00 70,00Before Positive Ranks 2 b 4,00 8,00
Ties 0 c
Total 12 a. After < Before
b. After > Before
c. After = Before
Ranks
After-
Before
Z -2,432 a
Asymp. Sig. (2-tailed) ,015
a. Based on positive ranks
b. Wilcoxon Signed Ranks Test
Test Statisticsb
Q2 do not reject ๐ป0 (there is no evidence that the mean difference is larger than โ8.)
BS 5 Tutorial 3
(iii) Distribution (standardized) test statistic approximately under ๐ป0: ๐~๐(๐๐, ๐๐2 ) where
๐๐ =๐(๐+1)
4= 39 and ๐๐
2 =๐(๐+1)(2๐+1)
24= 162.5
Requirements: Differences are symmetrically distributed
(iv) Calculated test statistic: ๐ง๐๐๐๐ =8โ39
โ162.5= โ2.4318; etc.
Q3 (based on Doane & Seward, 4/E, Minicase 10.3)
We repeat the previous two questions, now not assuming that the differences are symmetrically
distributed, and testing ๐ป0: ๐๐ โฅ โ8. Use the table at Q3 and the SPSS output below.
Sol Problem: ๐ can no longer be used because of lack of symmetry. Idea: subtract โ8 from all
differences. Then replace observations by plus or minus sign according to larger or smaller.
(i) ๐ป0: ๐๐ท โฅ โ8; ๐ป1: ๐๐ท < โ8; ๐ผ = 0.01
(ii) Sample statistic: ๐ (= # plusses); reject for small values (make graph!)
(iii) Distribution test statistic under ๐ป0: ๐~๐ต๐๐(12,0.5).
(iv) Calculated test statistic: ๐๐๐๐๐ = 2
๐-value of this statistical problem: ๐๐=0.5(๐ โค 2) = 0.0193
(v) Decision: do not reject ๐ป0, because ๐-value > ๐ผ = 0.01; conclude that there is no evidence
that the median difference is larger than โ8.
6A Two ๐s or medians: comparisons
Q1 Shipments of meat, meat by-products, and other ingredients are mixed together in several filling
lines at a pet food factory. After the ingredients are thoroughly mixed, the pet food is placed in
eight-ounce cans. Descriptive statistics concerning fill weights from the two production Lines,
from two independent samples are given in the following table.
Assuming that the population variances are equal, at the 0.05 level of significance, is there
evidence of a difference between the mean weight of cans filled on the two lines?
Sol a. Use five steps with the equal-variance ๐ก-test.
(i) ๐ป0: ๐๐ด = ๐๐ต (where Populations: 1 = Line A, 2 = Line B) or ๐ป0: ๐๐ด = ๐๐ต; ๐ป1: ๐๐ด โ ๐๐ต (๐ผ =0.05)
(ii) Sample statistic:๐1 โ ๐2
. Reject for large and small values.
(iii) Distribution under ๐ป0: ๐ก =(๐1 โ๐2 )โ(๐1โ๐2)
โ๐๐2(
1
๐1+
1
๐2)
~๐ก๐1+๐2โ2 if we assume that population 1 is
normally distributed and population 2 is symmetrically distributed (โequal variancesโ is given).
(iv) ๐ก๐๐๐๐ =(๐ฅ1 โ๐ฅ2 )โ(๐1โ๐2)
โ๐ ๐2(
1
๐1+
1
๐2)
=(8.005โ7.997)โ0
โ7.26ร10โ5(1
11+
1
16)
=0.008
0.003337= 2.3972
because ๐ ๐2 =
(๐1โ1)๐ 12+(๐2โ1)๐ 2
2
(๐1โ1)+(๐2โ1)=
10โ (0.012)2+15โ (0.005)2
10+15= 7.26 ร 10โ5
๐ก๐๐๐๐ก(25) = ยฑ2.0595
Q3 do not reject ๐ป0 (there is no evidence that the median difference is larger than โ8.)
Q1 Reject ๐ป0 (mean weight from line A is larger)
BS 6 Tutorial 3
(v) Decision rule: If ๐ก๐๐๐๐ < โ2.0595 or ๐ก๐๐๐๐ > 2.0595, reject ๐ป0.
Since ๐ก๐๐๐๐ = 2.3972 > 2.0595 reject ๐ป0.
There is sufficient evidence of a difference in the mean weight of cans filled on the two lines.
Practical conclusion: mean weight from line A is larger (even if we have a two-sided test: reject
๐ป0 and give 1-sided practical conclusion).
Q2 The same problem as before, but now not assuming that the population variances are equal.
Sol Similar to Q1, except:
(iii) Distribution under ๐ป0: ๐ก =(๐1 โ๐2 )โ(๐1โ๐2)
โ๐1
2
๐1+
๐22
๐2
~๐ก๐๐
Now, ๐๐ =(
๐ 12
๐1+
๐ 22
๐2)
2
(๐ 1
2
๐1)
2
๐1โ1+
(๐ 2
2
๐2)
2
๐2โ1
= 12.41, so use ๐๐ = 12
Requirements: assume that population 1 is normally distributed (๐1 < 15) and that population
2 is symmetrically distributed (๐2 = 16 > 15). (We make no further assumptions about the
variances)
(iv) Calculations:
๐ก๐๐๐๐ =(๐ฅ1 โ๐ฅ2 )โ(๐1โ๐2)
โ๐ 1
2
๐1+
๐ 22
๐2
=0.008
0.003828= 2.0899
๐ก๐๐๐๐ก(12) = ยฑ2.1788
(v) Decision rule: use the approximation ๐๐ for the degrees of freedom in the ๐ก-distribution.
Since ๐ก๐๐๐๐ = 2.0899 < 2.1788 do not reject ๐ป0.
There is not sufficient evidence of a difference in the average weight of cans filled on the two
lines.
Q2 Do not reject ๐ป0 (there is not sufficient evidence of a difference in the average weight of
cans filled on the two lines)
BS 7 Tutorial 3
Extra Students have to be able to do this by hand and also from computer (SPSS) output!
Q3 Compare the results of the two previous questions.
Extra N.B. Equality of variances can be tested too (see later!).
It is essential that students are able to make this exercise with and without (SPSS) computer
output. (They should at least do the calculations once only from the table in the output!). In
exam papers we do not often ask to compute the degrees of freedom from the samples.
Q4 Same data as in Q1.
a. Assuming that the population variances are equal, find a 90% confidence interval for ๐๐ด โ๐๐ต.
b. Not assuming that the population variances are equal, find a 90% confidence interval for
๐๐ต โ ๐๐ด.
Sol a. Use: pooled variance
(๐ฅ๐ด โ ๐ฅ๐ต ) ยฑ ๐ก๐๐;0.05๐ ๐๐ด โ๐๐ต = (8.005 โ 7.997) ยฑ 1.708 ร 0.003337 โ [0.002299,0.1370]
b. Use: separate variance
(๐ฅ๐ต โ ๐ฅ๐ด ) ยฑ ๐ก๐๐;0.05๐ ๐๐ด โ๐๐ต = (7.997 โ 8.005) ยฑ 1.782 ร 0.003828 โ
[โ0.01482, โ0.001177]
Q5 (based on Doane & Seward, 4/E, 10.6)
Are womenโs feet getting bigger? Retailers in the last 20 years have had to increase their stock
of larger sizes. Wal-Mart Stores, Inc., and Payless ShoeSource, Inc., have been aggressive in
stocking larger sizes, and Nordstromโs reports that its larger sizes typically sell out first.
Assuming equal variances, at ๐ผ = .05, do these random shoe size samples of 12 randomly
chosen women in each age group show that womenโs shoe sizes are different for women born
in 1960 and women born in 1980? (See The Wall Street Journal, July 17, 2004.)
Born in 1980:
8 7.5 8.5 8.5 8 7.5 9.5 7.5 8 8 8.5 9
Born in 1960:
8.5 7.5 8 8 7.5 7.5 7.5 8 7 8 7 8
You may use the output from SPSS
Q3 The results from Q1 and Q2 are different. The results obtained from Q2 are perhaps more
reliable because the sample variances from both samples suggest (??) that the two
population variances are not likely to be equal (why not always use the separate variance
test? It has less power if the true variances are equal).
Q4 a. [0.002299,0.1370 b. [โ0.01482,โ0.001177]
BS 8 Tutorial 3
Sol Use the 5-steps procedure (including the assumptions)
Problem is two-sided with ๐ผ = 0.05 (although it was originally formulates as a one-sided
problem with ๐ผ = 0.025)
(i) ๐ป0: ๐1 = ๐2 (where Populations: 1 = 1980, 2 = 1960) or ๐ป0: ๐1980 โ ๐1960 = 0 (Mean shoe
size is the same.)
๐ป1: ๐_1 โ ๐2 (๐ผ = 0.05)
(ii) Sample statistic: ๐1 โ ๐2
; reject for large and small values.
(iii) Distribution under ๐ป0: ๐ก =(๐1 โ๐2 )โ(๐1โ๐2)
โ๐๐2(
1
๐1+
1
๐2)
~๐ก๐1+๐2โ2 = ๐ก22 (see output)
Requirements: both populations should be normally distributed (both ๐ < 15)
(iv) Computations:
๐ ๐2 =
(๐1โ1)๐ 12+(๐2โ1)๐ 2
2
(๐1โ1)+(๐2โ1)=
11(0.6201)2+11(0.4502)2
11+11= 0.2936
๐ ๐2 (
1
๐1+
1
๐2) = 0.2936 ร (
1
12+
1
12) = 0.04893 = (0.2212)2
๐ก๐๐๐๐ =(8.208โ7.708)โ0
0.2212= 2.260
๐-value = 0.0340 (see output)
(v) ๐-value = 0.0340 < 5%, so reject ๐ป0.
Decision: Since ๐ก๐๐๐๐ = 2.260 is outside the lower and upper critical bound of โ2.074 and
2.074, do reject ๐ป0. There is enough evidence to conclude that the mean shoe size is different.
One-sided โPost Hoc conclusionโ: Shoe Size has increased.
Q6 (based on Doane & Seward, 4/E, 16.B-2)
Q5 Reject ๐ป0 (there is enough evidence to conclude that the mean shoe size has increased)
BS 9 Tutorial 3
Below are data for two different regions, showing the number of days that kidney transplant
patients had to wait before a donor was found (๐๐ธ = 6 patients, ๐๐ = 8 patients).
East: 109 248 85 107 28 67
West: 137 93 52 191 236 205 92 133
Do not assume a normal distribution of waiting times.
Use Table 16.B1 to test the hypothesis of equal medians at ๐ผ = .05 Show the steps in your
analysis.
Sol Replace data by ranks: combine samples, rank them, and put ranks back in original sample.
(i) ๐ป0: ๐๐ธ = ๐๐; ๐ป1: ๐๐ธ โ ๐๐ (๐ผ = 5%)
(ii) Sample statistic: ๐๐ธ (sum of ranks from sample smallest sample, so from East); reject for
large and small values
(iii) Distribution test statistic under ๐ป0: directly from โWilcoxonโ table
Requirements: both distributions have similar shape
(iv) Calculated test statistic: The ranks for (smallest) sample (so sample ๐ธ) are 1, 3, 4, 7, 8 and
14, respectively; ๐๐ธ = 37 (so ๐๐ = 105 โ 37 = 68).
Critical values: ๐๐ธ = 6, ๐๐ = 8, ๐๐ธ(๐๐๐๐ก, ๐ฟ) = 29, ๐๐ธ(๐๐๐๐ก, ๐ ) = 61
(v) Decision: do not reject ๐ป0 because ๐๐ธ not in critical region; conclude there is no reason to
doubt the equality of the medians (or the means, because of similar shape of both distributions)
Q7 (based on Doane & Seward, 4/E, 16.B-2)
Use the data from Q6 and ๐ผ = 5%.
a. Test ๐ป0: ๐๐ โค ๐๐ธ against ๐ป1: ๐๐ > ๐๐ธ (where ๐ is median), using the tables on the
website
b. Use the normal approximation to answer the same question. Is your conclusion the same?
Sol a. ๐ป0: ๐๐ โค ๐๐ธ vs. ๐ป1: ๐๐ > ๐๐ธ, but we prefer to write ๐ป0: ๐๐ธ โฅ ๐๐ vs. ๐ป1: ๐๐ธ < ๐๐
(smallest sample first and take statistic ๐ธ1). Reject for small values of ๐๐ธ
(iv) Critical values: ๐๐ธ = 6, ๐๐ = 8, ๐๐ธ(๐๐๐๐ก) = 31
(v) Decision: do not reject ๐ป0 because ๐๐ธ > 31
b. Note: meant is to use the large sample distribution of ๐๐ธ (small sample, so normal
approximation for ๐๐ธ is not OK).
(ii) Sample statistic ๐๐ธ; reject for small values
(iii) Distribution test statistic under ๐ป0: approximately normal, see formula sheet
๐ =๐๐ธโ๐๐๐ธ
๐๐๐ธ
=๐๐ธโ
๐๐ธ(๐+1)
2
โ๐๐ธ๐๐(๐+1)
12
where ๐ = ๐๐ธ + ๐๐
Requirements: both distributions have similar shape. But check on ๐๐ธ and ๐๐ (both should be
more than 10) fails
(iv) Calculated test statistic:
๐๐ธ = 37 (so ๐๐ = 68). Further ๐๐๐ธ= 45 and ๐๐๐ธ
= 7.7460; ๐ง๐๐๐๐ =37โ45
7.7460= โ1.0328
Critical values: ๐ง๐๐๐๐ก = โ1.645
Q6 do not reject ๐ป0 (no reason to doubt the equality of the medians or means)
Q7 do not reject ๐ป0 (no reason to doubt that ๐๐โค๐๐ธ)
BS 10 Tutorial 3
๐-value of this statistical problem: 0.1508
(v) Do not reject ๐ป0, and conclude that there is no reason to doubt that ๐๐ โค ๐๐ธ
Q8 (based on Doane & Seward, 4/E, 16.B-1)
A trucking company wants to compare the number of miles driven by two delivery truck drivers
in one week on different days (๐1 = 5 days, ๐2 = 7 days). Do not assume that distances driven
are normally distributed.
Driver 1: 128 102 78 40 76
Driver 2: 97 158 112 112 216 316 112
a. Use Table 16.B1 to test the hypothesis of equal medians at ๐ผ = .05. Show the steps in your
analysis.
b. Perform a large-sample test using a normal approximation for the distribution of ๐1. Is your
conclusion the same?
Sol Replace data by ranks: combine samples, rank them, and put ranks back in original sample.
a. Five steps:
(i) ๐ป0: ๐1 = ๐2; ๐ป1: ๐1 โ ๐2 (๐ผ = 5%)
(ii) Sample statistic: ๐1 (=sum of ranks from sample โDriver 1โ); reject for large and small
values
Use 16.9 from Doane 4th edition.
(iii) Distribution test statistic under ๐ป0: directly from โWilcoxonโ table
Requirements: both distributions have similar shape
(iv) Calculated test statistic: The ranks for (smallest) sample 1 are 1, 2, 3, 5 and 9, respectively;
๐1 = 20 (so ๐2 = 78 โ 20 = 58).
Critical values: ๐1 = 5, ๐2 = 7, ๐1(๐๐๐๐ก, ๐ฟ) = 20 and ๐1(๐๐๐๐ก,๐ ) = 45
(v) Decision: reject ๐ป0 because ๐1 in the critical region (on the border) and conclude (but be
careful) that there is reason to doubt the equality of the medians or the means (if assumption of
similar shape of both distributions is reasonable)
Driver 1 Driver 2
128 9
102 5
78 3
40 1
76 2
97 4
158 10
112 7
112 7
216 11
316 12
112 7
20 58
Wilcoxon - Mann/Whitney Test
n sum of ranks
5 20 Driver 1
7 58 Group 2
12 78 total
32,500 expected value
6,158 standard deviation
-2,030 z
,0424 p-value (two-tailed)
Q8 reject ๐ป0 (there is reason to doubt the equality of the medians or means)
BS 11 Tutorial 3
b. Note: meant is to use the large sample distribution of ๐1 (or to use ๐1 โ ๐2, which we do not
recommend) (note: variance is unknown, so normal approximation for ๐1 is not OK).
(ii) Use ๐1
(iii) Distribution test statistic under ๐ป0: approximately normal, see formula sheet
๐ =๐1โ๐๐1
๐๐1
=๐1โ
๐1(๐+1)
2
โ๐1๐2(๐+1)
12
where ๐ = ๐1 + ๐2
Requirements: both distributions have similar shape. But check on ๐1 and ๐2 (both should be
more than 10) fails
(iv) Calculated test statistic: ๐1 = 20 (so ๐2 = 58). Further, ๐๐1= 32.5 and ๐๐1
= 6.158 and
๐ง๐๐๐๐ =20โ32.5
6.158= โ2.030
Critical values: ๐ง๐๐๐๐ก = ยฑ1.96
๐-value of this statistical problem: 2 ร 0.02118 = 0.04236
Extra The alternative approach, following chapter 16, not recommended, but given for completeness
(ii) Use ๐1 โ ๐2
(iii) Distribution test statistic under ๐ป0: approximately normal, see formula sheet
๐ =๐1 โ๐2 โ0
(๐1+๐2)โ๐1+๐2+1
12๐1๐2
Requirements: both distributions have similar shape. But check on ๐1 and ๐2 (both should be
more than 10) fails
(iv) Calculated test statistic: ๐1 =20
5= 4 and ๐2
=58
7= 8.2587 ๐๐1 โ๐2 = 2.111195
๐ง๐๐๐๐ =โ4.2857โ0
2.111195= โ2.030
Critical values: ๐ง๐๐๐๐ก = ยฑ1.96
๐-value of this statistical problem: 2 ร 0.02118 = 0.04236
Q9 (based on Doane & Seward, 4/E, 16.7)
Bob and Tom are โpaper investors.โ They each โbuyโ stocks they think will rise in value and
โholdโ them for a year. At the end of the year, they compare their stocksโ appreciation (percent).
Bobโs Portfolio (10 stocks):
7.0 2.5 6.2 4.4 4.2 8.5 10.0 6.4 3.6 7.6
Tomโs Portfolio (12 stocks):
5.2 0.4 2.6 โ0.2 4.0 5.2 8.6 4.3 3.0 0.0 8.6 7.5
a. At ๐ผ = .05, is there a difference in the medians (assume these are samples of Bobโs and
Tomโs stock-picking skills). Use the SPSS output below
b. Now test ๐ป0: ๐1 โค ๐2 against ๐ป1: ๐1 > ๐2 (๐ผ = 5%; Bob=1 and Tom=2) using SPSS
output.
c. Perform a two-tailed parametric ๐ก test for two independent sample means by using the SPSS
output. Do you get the same decision?
BS 12 Tutorial 3
Sol Replace data by ranks: combine samples, rank them, and put ranks back in original sample.
Note: no table available.
Do the test using the computer output (new for them) and only the one-sided (extra) question.
a. Five steps:
(i) ๐ป0: ๐1 = ๐2; ๐ป1: ๐1 โ ๐2; ๐ผ = 5% (Bob=1, Tom=2)
(ii) Sample statistic: ๐1 (sum of ranks from sample โBobโ); reject for large and small values
(iii) Distribution test statistic under ๐ป0: approximately normally distributed (parameters
depending on choice in step (ii)
Requirements: both distributions have similar shape. Check on ๐1 and ๐2: both at least 10, so
approximation should be OK
(iv) Calculated test statistic: ๐ง๐๐๐๐ = โ1.320
Reported ๐-value: 0.187; ๐-value of this statistical problem: 0.187
Q9 do not reject ๐ป0 (no reason to doubt the equality of the medians or means)
BS 13 Tutorial 3
(v) Decision: do not reject ๐ป0 because ๐-value > 5% and conclude there is no reason to doubt
the equality of the medians or the means (!!!!, because of similar shape of both distributions).
b. To test 1-sided hypothesis: look at mean ranks!
(i) ๐ป0: ๐1 โค ๐2; ๐ป1: ๐1 > ๐2 (๐ผ = 5%)
(iv) Calculated test statistic: ๐ง๐๐๐๐ = โ1.320, but sign is meaningless (!!!)
Because MeanRanks(1) > MeanRanks(2) in sample, we are close to rejection region (whatever
statistic we might have chosen).
So ๐-value = 0.5 ร ๐-twosided =0.187
2= 0.093
c. Steps that change:
(iii) Distribution test statistic under ๐ป0: ๐ก~๐ก20
Requirements: both distributions are normal, equal variance (latter is reasonable assumption in
Leveneโs test: ๐-value = 39.6%)
(v) Decision: do not reject ๐ป0 because ๐-value = 0.121 > 5% and conclude there is no reason
to doubt the equality of the means
6B Two ๐๐s: comparisons
Q1 (Doane & Seward, 4/E, 10.39)
A manufacturing process drills holes in sheet metal that are supposed to be . 5000 cm in
diameter. Before and after a new drill press is installed, the hole diameter is carefully measured
(in cm) for 12 randomly chosen parts. At ๐ผ = .05, do these independent random samples prove
that the new process has smaller variance? Show the hypotheses, decision rule, and test statistic.
Sol (i) ๐ป0: ๐1
2 โค ๐22; ๐ป1: ๐1
2 > ๐22 (where 1=Old, 2=New) (โOldโ in numerator for easy critical
value)
(ii) Test Statistic: ๐น =๐1
2
๐22. Reject for large values
(iii) Under ๐ป0: ๐น~๐น11;11
Requirement: both populations normal
(iv) Test statistic: ๐น๐๐๐๐ =๐ 1
2
๐ 22 =
3.183ร10โ5
3.265ร10โ6 = 9.748 (see output below)
Critical values: ๐น๐๐๐๐ก(11; 11; 0.05) = 2.82
Q1 reject ๐ป0 (the new drill has a significantly smaller variance)
BS 14 Tutorial 3
(v) Decision: Since ๐น๐๐๐๐ = 9.748 is above the critical bound of 2.82 do reject ๐ป0. There is
enough evidence to conclude that the new drill has reduced variance.
Compare the two Excel outputs, one with the smallest in the numerator (so ๐น๐๐๐๐ < 1), the other
with the largest in the numerator (so ๐น๐๐๐๐ > 1).
Extra Excel produces the following two tables, with left 1=new, 2=old, and right 1=old, 2=new. There
is an error in Excel in the second table: the โ<=โ should be โ>=โ.
Q2 (Doane & Seward, 4/E, 10.40)
Examine the data below showing the weights (in pounds) of randomly selected checked bags
for an airlineโs flights on the same day.
a. At ๐ผ = .05, is the mean weight of an international bag greater? Show the hypotheses,
decision rule, and test statistic.
b. At ๐ผ = .05, is the variance greater for bags on an international flight? Show the hypotheses,
decision rule, and test statistic.
Use the output below:
F-Test Two-Sample for Variances
New Drill Old Drill
Mean 0,5002167 0,5000167
Variance 3,265E-06 3,183E-05
Observations 12 12
df 11 11
F 0,1025849
P(F<=f) one-tail 0,0003546
F Critical one-tail 0,3548704
F-Test Two-Sample for Variances
Old Drill New Drill
Mean 0,5000167 0,5002167
Variance 3,183E-05 3,265E-06
Observations 12 12
df 11 11
F 9,7480278
P(F<=f) one-tail 0,0003546
F Critical one-tail 2,8179305
BS 15 Tutorial 3
Sol a. First test the equality of variances in order to choose between equal and unequal variance ๐ก-
test. The ๐-value is 0.000887, so we reject the hypothesis of equal variance, and start using the
๐ก-test not assuming equal variances.
Note: as an exercise for the ๐น-test, we do this below for a full 5-step procedure. At the exam,
this is not needed when we ask for testing the equality of two means.
(i) ๐ป0:๐1
2
๐22 = 1; ๐ป1:
๐12
๐22 โ 1; ๐ผ = 0.05 (with 1=international, 2=domestic)
(ii) Test Statistic: ๐น =๐1
2
๐22; reject for small and large values
(iii) Under ๐ป0: ๐น~๐น9;14
Requirement: both populations normal.
(iv) Test statistic: ๐น๐๐๐๐ =๐ 1
2
๐ 22 =
141.3778
20.98095= 6.738 (see output above)
Critical values: ๐น๐๐๐๐ก,๐ = ๐น9;14;0.025 = 3.21 and ๐น๐๐๐๐ก,๐ฟ = ๐น9;14;0.975 = โฏ (It is not necessary to
find ๐น๐๐๐๐ก,๐ฟ.
t-Test: Two-Sample Assuming Equal Variances
International Domestic
Mean 48,6 36,13333
Variance 141,3778 20,98095
Observations 10 15
Pooled Variance 68,09275
Hypothesized Mean Difference 0
df 23
t Stat 3,700629
P(T<=t) one-tail 0,00059
t Critical one-tail 1,713872
P(T<=t) two-tail 0,001179
t Critical two-tail 2,068658
t-Test: Two-Sample Assuming Unequal Variances
International Domestic
Mean 48,6 36,13333
Variance 141,3778 20,98095
Observations 10 15
Hypothesized Mean Difference 0
df 11
t Stat 3,162814
P(T<=t) one-tail 0,004517
t Critical one-tail 1,795885
P(T<=t) two-tail 0,009034
t Critical two-tail 2,200985
F-Test Two-Sample for Variances
International Domestic
Mean 48,6 36,13333
Variance 141,3778 20,98095
Observations 10 15
df 9 14
F 6,738387
P(F<=f) one-tail 0,000887
F Critical one-tail 2,645791
Q2 a. Reject ๐ป0 (the mean of international bag weight is greater than domestic bag weight)
b. Reject ๐ป0 (the variance of international bag weight is greater than domestic bag weight.)
BS 16 Tutorial 3
(v) Decision: Since ๐น๐๐๐๐ = 6.738 is above the critical bound of 3.21 do reject ๐ป0. There is
enough evidence to conclude that the variances are not equal.
So we have to use the โseparate variance ๐ก-test for the ยต-problem.
(Post-hoc: the variance for international is larger)
Now we test the question from a.
(i) ๐ป0: ๐1 โ ๐2 โค 0; ๐ป1: ๐1 โ ๐2 > 0 (๐ผ = 0.05)
(ii) Test statistic: ๐1 โ ๐2
; reject for large values
(iii) Under ๐ป0: ๐ก =(๐1 โ๐2 )โ(๐1โ๐2)
โ๐1
2
๐1+
๐22
๐2
~๐ก๐๐ where ๐๐ =(
๐ 12
๐1+
๐ 22
๐2)
2
(๐ 1
2
๐1)
2
๐1โ1+
(๐ 2
2
๐2)
2
๐2โ1
(from output: ๐๐ = 11)
Requirements: assume that population 1 is normally distributed (๐1 < 15) and population 2 is
symmetrically distributed (๐2 = 15 โฅ 15).
(iv) Calculations:
๐ก๐๐๐๐ =(๐ฅ1 โ๐ฅ2 )โ(๐1โ๐2)
โ๐ 1
2
๐1+
๐ 22
๐2
=(48.6โ36.13333)โ0
โ141.3778
10+
20.98095
15
=12.46667
3.941638= 3.162814
๐ก๐๐๐๐ก = ๐ก11;0.05 = 1.796 (from table; from output: 1.795885)
(Note: ๐ก๐๐๐๐ bot drawn to scale)
(v) Since ๐ก๐๐๐๐ = 3.163 > 1.796 or (from output) ๐-value = ๐(๐ก11 > 3.162814) =0.004517 < 0.05, reject ๐ป0. The mean of international bag weight is greater than domestic bag
weight.
b. Now test variances
(i) ๐ป0:๐1
2
๐22 โค 1; ๐ป1:
๐12
๐22 > 1; (๐ผ = 0.05)
(ii) Test Statistic: ๐น =๐1
2
๐22; reject for large values
(iii) Under ๐ป0: ๐น~๐น9;14
Requirements: both populations normal.
(iv) Test statistic: ๐น๐๐๐๐ =๐ 1
2
๐ 22 =
141.3778
20.98095= 6.738 (see output above)
BS 17 Tutorial 3
Critical value: ๐น๐๐๐๐ก;๐ = ๐น9;14;0.05 = 2.65; ๐น๐๐๐๐ก;๐ฟ not needed
(v) Decision rule: Reject ๐ป0 if ๐น๐๐๐๐ โฅ 2.65 and ๐น๐๐๐๐ = 6.7387 so we reject the null
hypothesis. The variance of international bag weight is greater than domestic bag weight.
Note: From output: ๐-value = ๐(๐น9;14 โฅ 6.7387) = 0.000887 < 0.05
Q3 (based on Doane & Seward, 4/E, 10.6)
At the tests for comparing two ๐s above, we analyzed the change of foot size of women. Now
test the equality of variance at ๐ผ = 5%.
a. Use the usual variance test, with a full calculation.
b. Use the SPSS output, without a full calculation.
Data are repeated below:
Born in 1980:
8 7.5 8.5 8.5 8 7.5 9.5 7.5 8 8 8.5 9
Born in 1960:
8.5 7.5 8 8 7.5 7.5 7.5 8 7 8 7 8
Sol On the basis of the usual variance test
(i) ๐ป0: ๐12 = ๐2
2; ๐ป1: ๐12 โ ๐2
2 (where Populations: 1 = 1980, 2 = 1960); ๐ผ = 0.05
(ii) Sample statistic: ๐น =๐1
2
๐22; reject for large and for small small values
(iii) Distribution under ๐ป0: ๐น =๐ 1
2
๐ 22 ~๐น11;11
Requirements: Both populations normally distributed
(iv) Computations: ๐น๐๐๐๐ =(0.6201)2
(0.4502)2 = 1.8972
๐น๐๐๐๐ก;๐ = ๐น11,11;0.025 = 3.47 (not in table) and ๐น๐๐๐๐ก;๐ฟ < 1
Note: from table ๐น๐๐๐๐ก between 3.53 and 3.43.
Q2 Do not reject ๐ป0 (the two variances do not differ significantly)
BS 18 Tutorial 3
(v) Do not reject ๐ป0. because ๐น๐๐๐๐ not in rejection region. Variances do not differ significantly.
Using SPSS output, you can use the Leveneโs test instead:
(i) identical
(ii) Sample statistic: Leveneโs ๐น; (reject for large values)
(iii) Distribution under ๐ป0: ๐น~? ? ? (now see SPSS output). This test is a two-sided but one-
tailed test!
Requirements: ???
(iv) Computations: ๐น๐๐๐๐ = 0.993 (see output) and ๐-value 0.3300
(v) Do not reject ๐ป0 because ๐-value larger than 5%.
Old exam questions
Q1 23 March 2016, Q3a
It has been suggested that students perform differently in the afternoon compared to the
morning. To investigate this phenomenon, a number of tests have been made: 12 randomly
chosen students did an exam in the morning, and 12 others did an exam in the afternoon. The
results of the exams are on a scale from 1.0 (low) to 10.0 (high). One group of researchers
proposes to compare the mean score in the morning to the mean score in the afternoon. Perform
this test at ๐ผ = 5%, using the 5-step procedure.
Sol This is a case of comparing the means of two independent samples.
(i) ๐ป0: ๐1 = ๐2, ๐ป1: ๐1 โ ๐2, ๐ผ = 0.05 (where 1 codes for morning and 2 for afternoon)
(ii) Sample statistic: ๐1 โ ๐2
, reject for small and for large values
(iii) null distribution: ๐1 โ๐2
๐๐1 โ๐2 ~๐ก22, provided both populations are normally distributed (which
we will have to assume) and the two populations have the same variance (which looks quite
plausible, given Leveneโs test with ๐-value = 0.976)
(iv) ๐ก๐๐๐๐ = 1.410, ๐ก๐๐๐๐ก = ยฑ2.074, ๐-value = 0.172
(v) do not reject ๐ป0, there is no evidence for concluding that the population means are different
Q2 22 May 2017, Q3d
Electricity supply is a vital element for nearly every part of the economy. Supply must be stable:
voltage should be 230 volt and variations must be small. We measure at 21 random times in
The Netherlands (NL) and at 26 random times in Germany (DE) voltage and find the following
descriptive statistics:
Q1 Do not reject ๐ป0 (there is no evidence for concluding that the population means are different)
BS 19 Tutorial 3
Use the data above to test if the assumption ๐๐๐ฟ
2 = ๐๐ท๐ธ2 is reasonable, at ๐ผ = 5%. Calculate the
value of the test statistic, as well as the critical value(s). Make assumptions and state
requirements where needed and/or check requirements where possible.
Sol The standardized test statistic for comparing two variances is ๐น =๐๐๐ฟ
2
๐๐ท๐ธ2 . Its observed value is
1.306 (or 0.766 in case you define ๐น =๐๐ท๐ธ
2
๐๐๐ฟ2 ).
Under the null hypothesis, this test statistic is distributed as ๐น๐๐๐ฟโ1,๐๐ท๐ธโ1 (or ๐น๐๐ท๐ธโ1,๐๐๐ฟโ1).
The test is two-sided. Critical values are thus ๐น๐๐๐๐ก,๐ข๐๐๐๐ = ๐น20,25;0.025 = 2.30 and
๐น๐๐๐๐ก,๐๐๐ค๐๐ =1
๐น25,20;0.025=
1
2.40= 0.42. (Or if you used the other definition of ๐น: 2.40 and
1
2.30=
0.43)
The requirement is that both populations (NL and DE) are normal; this seems reasonable given
the estimated values of skewness and kurtosis for both NL and DE (should be between โ1 and
1).
Q2 ๐น๐๐๐๐=1.306; ๐น๐๐๐๐ก=2.30 and 0.42; both populations must be normal, which is OK.