You are on page 1of 70

Statistics 2 for Economics

Course code: 6012B0451 2022–2023

Syllabus A
Version 1.1 September 2022

week 1-2-3

Faculty of Economics and Business


University of Amsterdam
Statistics 2 for Economics
Table of contents
Supplements:
1. p-value....................................................................................................................................... 3
2. Hypothesis test .......................................................................................................................... 4
3. Sign Test .................................................................................................................................... 5
4. Rule of five ................................................................................................................................. 5

Week 1 – Inference about comparing two population means or two population variances
Homework exercises ................................................................................................................. 8
Homework solutions ............................................................................................................... 14
Tutorial exercises..................................................................................................................... 29
Multiple-choice questions ....................................................................................................... 31
Week 2 – Inference about comparing two population proportions, and nonparametric tests
Homework exercises ............................................................................................................... 32
Homework solutions ............................................................................................................... 37
Tutorial exercises..................................................................................................................... 52
Multiple-choice questions ....................................................................................................... 54
Week 3 – Chi-squared tests, Pearson’s correlation and Spearman’s rank correlation
Homework exercises ............................................................................................................... 55
Homework solutions ............................................................................................................... 59
Tutorial exercises..................................................................................................................... 68
Multiple-choice questions ....................................................................................................... 69

2
Supplement 1
p-value
The p-value is a much used, very important quantity, although the book doesn’t stress this enough.
Definition (in words):
• The p-value is the probability, assuming that H0 is true, of observing a value for the test statistic
equal to or more extreme than the value observed in the sample.
The null hypothesis H0 is used to derive the distribution of the test statistic, and “more extreme” is
defined in relation to the alternative hypothesis 𝐻𝐻1 . This means that the p-value for a one-sided
alternative is different from a p-value for a two-sided alternative.
Two examples: single population, one-sided and two-sided
We want to test (𝛼𝛼 = 5%) whether the mean body length is larger than 176.0 cm (one-sided) and
significantly different from 176.0 cm (two-sided), in a normal distribution and known standard deviation of
3.75 cm. The observed sample of 9 has a mean of 174.5 cm. Calculate the p-value in both test cases.

𝐻𝐻0 ∶ 𝜇𝜇 = 176.0 𝐻𝐻1 ∶ 𝜇𝜇 > 176.0 𝐻𝐻0 ∶ 𝜇𝜇 = 176.0 𝐻𝐻1 ∶ 𝜇𝜇 > 176.0
assumed one-sided assumed one-sided

test set-up observed: sample


𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 𝑃𝑃(𝑋𝑋� ≥ 𝑥𝑥̅ 𝑜𝑜𝑜𝑜𝑜𝑜 ) = 0.8849

𝛼𝛼 = 0.05 𝛼𝛼 = 0.05

𝑋𝑋�~𝑁𝑁(176.0, 1.25) 𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 178.06 𝑥𝑥̅𝑜𝑜𝑜𝑜𝑜𝑜 = 174.5 𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 178.06

𝑍𝑍~𝑁𝑁(0, 1) 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1.645 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −1.20 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1.645

p-value = 𝑃𝑃(𝑋𝑋� ≥ 𝑥𝑥̅𝑜𝑜𝑜𝑜𝑜𝑜 = 174.5) = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −1.20) = 0.8849 > 𝛼𝛼 = 0.05, do not reject the null hypothesis.

𝐻𝐻1 : 𝜇𝜇 ≠ 176.0 𝐻𝐻0 ∶ 𝜇𝜇 = 176.0 𝐻𝐻1 : 𝜇𝜇 ≠ 176.0 𝐻𝐻1 : 𝜇𝜇 ≠ 176.0 𝐻𝐻0 ∶ 𝜇𝜇 = 176.0 𝐻𝐻1 : 𝜇𝜇 ≠ 176.0
two-sided assumed two-sided two-sided assumed two-sided

test set-up observed: sample


𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣
= 2 ∙ 𝑃𝑃(𝑋𝑋� ≤ 𝑥𝑥̅𝑜𝑜𝑜𝑜𝑜𝑜 )
= 2 ∙ 𝑃𝑃(𝑍𝑍 ≤ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ) 𝛼𝛼
𝛼𝛼
2
= 0.025 𝛼𝛼
2
= 0.025 𝛼𝛼
2
= 0.025 = 0.2302 2
= 0.025

𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 173.55 𝑋𝑋�~𝑁𝑁(176.0, 1.25) 𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 178.45 𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 173.55 𝑥𝑥̅𝑜𝑜𝑜𝑜𝑜𝑜 = 174.5 𝑥𝑥̅𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 178.45

−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −1.96 𝑍𝑍~𝑁𝑁(0, 1) 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1.96 −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −1.96 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −1.20 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1.96

p-value = 2 ∙ 𝑃𝑃(𝑋𝑋� ≤ 𝑥𝑥̅𝑜𝑜𝑜𝑜𝑜𝑜 = 174.5) = 2 ∙ 𝑃𝑃(𝑍𝑍 ≤ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −1.20) = 0.2302 > 𝛼𝛼 = 0.05, do not reject null hypothesis.

3
Some interpretations of the p-value:
• If the p-value is small, then:
o the observed test statistic is unlikely to occur if H0 is true
o there is evidence for 𝐻𝐻a “beyond reasonable doubt”
• If the 𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 ≤ 𝛼𝛼 then reject H0

• The p-value is the smallest significance level for which we reject the null hypothesis H0
The p-value is not:
• the probability that H0 is true
Why? The calculation of the p-value is based on the assumption that H0 is true, so clearly it can’t tell us
anything about 𝑃𝑃(𝐻𝐻0 is true).
Also, H0 is a statement about a population parameter, which is assumed to be unknown but constant; so
there is no randomness (and therefore no probability) involved.

Supplement 2
Hypothesis test
1. Conditions and assumptions
Statistical information, validity of test

2. Hypotheses
Null-hypothesis 𝐻𝐻0 and alternative hypothesis 𝐻𝐻1 (or 𝐻𝐻a )

3. Test statistic and its distribution

4. Rejection region or significance level


Determine the rejection region or significance level α

5. Sample outcome
Calculate the value of the test statistic or calculate/estimate the p-value

6. Confrontation and decision


Confront statistic with rejection region or confront p-value with significance level α
Decision in terms of the hypothesis 𝐻𝐻0

7. Conclusion
Formulate the conclusion in context
“Given the significance level …, there is (in)sufficient evidence to infer that …”

4
Supplement 3
Sign Test
Let A and B denote two random variables.
We want to know whether 𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥 𝐨𝐨𝐨𝐨 𝑨𝑨 ≠ 𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥𝐥 𝐨𝐨𝐨𝐨 𝑩𝑩
Main idea of the test:
Define 𝑝𝑝 = 𝑃𝑃(observation from 𝐴𝐴 > observation from 𝐵𝐵)
If location of 𝐴𝐴 = location of 𝐵𝐵 then 𝑝𝑝 = 12.
We can formulate hypotheses:
1
𝐻𝐻0 ∶ locations of distributions 𝐴𝐴 and 𝐵𝐵 are the same ⟺ 𝑝𝑝 = 2
1
𝐻𝐻1𝑅𝑅 ∶ location of distribution 𝐴𝐴 is to the right of 𝐵𝐵 ⟺ 𝑝𝑝 > 2
1
𝐻𝐻1𝐿𝐿 ∶ location of distribution 𝐴𝐴 is to the left of 𝐵𝐵 ⟺ 𝑝𝑝 < 2
Test statistic:
Let X denote the number of positive differences (“successes”)
Assuming H0 we have 𝑋𝑋 ~ Bin�𝑛𝑛, 𝑝𝑝 = 12� where 𝑛𝑛 = sample size – number of tied cases
Critical value(s) can be found in the Binomial tables
Observed value 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 = the observed number of positive differences
p-value (note that p denotes the probability here):
for 𝐻𝐻1𝑅𝑅 the p-value = 𝑃𝑃(𝑋𝑋 ≥ 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 )
for 𝐻𝐻1𝐿𝐿 the p-value = 𝑃𝑃(𝑋𝑋 ≤ 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 )
Remarks:
1. X is discrete, so 𝑃𝑃(𝑋𝑋 ≥ 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 ) ≠ 𝑃𝑃(𝑋𝑋 > 𝑥𝑥𝑜𝑜𝑜𝑜𝑜𝑜 )
2. We reject H0 if 𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 ≤ 𝛼𝛼 so the observed p-value is the smallest significance level for which
the null hypothesis H0 in this test is rejected.

Supplement 4
Rule of five
The test statistic used to compare the relative sizes of observed and expected frequencies is:
𝑘𝑘
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2
𝑒𝑒𝑖𝑖
𝑖𝑖=1

We previously stated that this test statistic has an approximate 𝜒𝜒 2 -distribution. In fact, the actual
distribution of this test statistic is discrete, but it can be approximated conveniently by using a continuous
𝜒𝜒 2 -distribution when the sample size 𝑛𝑛 is large, just as we approximated the discrete binomial distribution
by using the normal distribution. This approximation may be poor, however, if the expected cell
frequencies are small. For the (discrete) distribution of the test statistic to be adequately approximated by
the (continuous) 𝜒𝜒 2 -distribution, the conventional (and conservative) rule, known as ‘the rule of five’ is to

5
require that the expected frequency for each cell be at least 5. Where necessary, cells should be combined
in order to satisfy this condition.

𝝌𝝌𝟐𝟐 -Goodness-of Fit Test


Consider the following illustration. Suppose that three companies (A, B and C) have recently conducted
aggressive advertising campaigns; the market shares prior to the campaign were 𝑝𝑝1 = 0.45 for company
A, 𝑝𝑝2 = 0.40 for company B, 𝑝𝑝3 = 0.13 for company C, and 𝑝𝑝4 = 0.02 for other competitors. In a test to
see if market shares changed after the advertising campaigns, the null hypothesis would now be:
𝐻𝐻0 ∶ 𝑝𝑝1 = 0.45, 𝑝𝑝2 = 0.40, 𝑝𝑝3 = 0.13, 𝑝𝑝4 = 0.02
Hence, if the preferences of a sample of 200 customers were solicited, the expected frequencies would be:
𝑒𝑒1 = 200 ∙ 0.45 = 90 𝑒𝑒2 = 200 ∙ 0.40 = 80 𝑒𝑒3 = 200 ∙ 0.13 = 26 𝑒𝑒4 = 200 ∙ 0.02 = 4
Since the expected cell frequency e4 is less than 5, the rule of five requires it to be combined with one the
other expected frequencies (say, 𝑒𝑒3 ) to obtain a combined cell frequency of (in this case) 30. Although 𝑒𝑒4
could have been combined with 𝑒𝑒1 or 𝑒𝑒2 , we have chosen to combine it with 𝑒𝑒3 , so that we will have a
separate category representing each of the two dominant companies A and B. After this combination is
made, the null hypothesis reads:
𝐻𝐻0 ∶ 𝑝𝑝1 = 0.45, 𝑝𝑝2 = 0.40, 𝑝𝑝3 = 0.15
Where 𝑝𝑝3 now represents the market share of all competitors of companies A and B. Therefore, the
appropriate number of degrees of freedom for the 𝜒𝜒²-test statistic would be 𝑘𝑘 − 1 = 3 − 1 = 2 where 𝑘𝑘
is the number of cells after some have been combined to satisfy the rule of five.

𝝌𝝌𝟐𝟐 -test for a Contingency Table


In a contingency table where more one of more cells have expected values of less than 5, we need to combine
rows or columns to satisfy the rule of five. To illustrate, suppose that we want to test for dependence in the
following contingency table:
observed age
young middle senior total
1 10 14 4 28
row 2 12 16 7 35
3 8 8 4 20
total 30 38 15 83

The expected values are as follows:


expected age
young middle senior total
1 10.1 12.8 5.1 28
row 2 12.7 16.0 6.3 35
3 7.2 9.2 3.6 20
total 30 38 15 83

The expected value of the cell in row 3 and column 3 is less than 5. To eliminate the problem, we can add
column 3 to one of the columns 1 and 2, or add row 3 to either row 1 or row 2. The combining of rows or
columns should be done so that the combining forms a logical unit, if possible. For example, if the columns
represent the age groups, young (under 40), middle-aged (between 40 and 65), and senior (over 65), it is
logical to combine columns 2 and 3. The observed and expected values are combined to produce the
following table (expected values in parenthesis):

6
observed age
(expected) young middle/senior total
1 10 (10.1) 18 (17.9) 28
row 2 12 (12.7) 23 (22.3) 35
3 8 (7.2) 12 (12.8) 20
total 30 53 83

The degrees of freedom will be different after combining the cells. The number of freedoms of the original
contingency table is (3 − 1) × (3 − 1) = 4. The number of degrees of freedom of the original combined
table is (3 − 1) × (2 − 1) = 2. The remainder of the procedure is unchanged.

7
Week 1
Homework exercises
One population (Statistics 1)
Exercise 1
a. We will take a random sample of size 𝑛𝑛 = 36 from a population with mean 𝜇𝜇 = 94.5 and
standard deviation 𝜎𝜎 = 3.0.
(1) Determine the probability distribution of the sample mean 𝑋𝑋�
(2) Calculate the probability 𝑃𝑃(𝑋𝑋� > 95.1)
(3) Draw a graph of the probability distribution of 𝑋𝑋� with on the horizontal axis:
the possible values of 𝑋𝑋� and the possible values of 𝑍𝑍
(4) Shade the part of the distribution that is described by the probability 𝑃𝑃(𝑋𝑋� > 95.1)
b. Take the same four steps, but now for 𝑃𝑃(49.8 < 𝑋𝑋� < 51.7) when we will take a random sample
of size 𝑛𝑛 = 49 from a population with mean 𝜇𝜇 = 51.4 and standard deviation 𝜎𝜎 = 2.1
c. Take the same four steps, but now for 𝑃𝑃(𝑋𝑋� < 6.25) when we will take a random sample of size
𝑛𝑛 = 9 from a population with mean 𝜇𝜇 = 5.92 and standard deviation 𝜎𝜎 = 1.8.
What extra assumption is necessary here? Why?

Exercise 2
The mean drying time of a specific kind of paint is 75 min with a standard deviation of 9.4 min. A chemically
improved version of the paint is supposed to have a shorter drying time. A random sample of 100 specimen
of the improved paint is taken. After the drying times have been measured, and the mean drying time of
the improved paint is calculated to be 72.5 min. You may assume that the standard deviation of the
improved paint is the same as the standard deviation of the old paint.
a. Test the hypothesis that the improved paint has a shorter drying time, using a significance level of 5%.
b. What is the p-value of the test statistic? Does it confirm your conclusion in part a.?
c. What is the 90%-confidence interval for the mean drying time? Does this interval include the popu-
lation mean of the old paint (75 min)?

Exercise 3
The loan manager of a new bank branch believes that the average loan request will be higher at her branch
than the average at the other branches of the bank. The mean loan request at all branches is known to be
3600 $. A random sample of 𝑛𝑛 = 20 loan requests at the new branch yielded the statistics 𝑥𝑥̅ = 3915 $
and 𝑠𝑠 = 502 $.
a. At the 5% significance level, can we conclude that the loan manager is correct? You may assume
that the requirement of normality is satisfied.
b. Estimate the p-value of the test statistic. Does it confirm your conclusion in part a.?
c. What is the 90%-confidence interval for the population mean loan request? Does this interval in-
clude the mean loan request of the other branches (3600 $)?

Exercise 4
For each formula below, explain the purpose of the formula, and the conditions allowing their use:
𝑋𝑋� − 𝜇𝜇 𝜎𝜎
a. 𝑍𝑍 = 𝜎𝜎
~ 𝑁𝑁(0, 1) b. 𝜇𝜇 = 𝑥𝑥̅ ± 𝑧𝑧𝛼𝛼⁄2 ∙
√𝑛𝑛
√𝑛𝑛

𝑋𝑋� − 𝜇𝜇 𝑠𝑠
c. 𝑇𝑇 = 𝑆𝑆
~ 𝑡𝑡[df = 𝑛𝑛 − 1] d. 𝜇𝜇 = 𝑥𝑥̅ ± 𝑡𝑡𝛼𝛼⁄2, df ∙
√𝑛𝑛
√𝑛𝑛

8
Two populations (Statistics 2)
Exercise 5
Suppose that we know the variances of two populations: 𝜎𝜎12 = 4.52 and 𝜎𝜎22 = 5.32. (In reality, it rarely
ever happens that we know the population variances while we do not know the population means). Some-
one claims that the mean of population 1 is at least 4.0 higher than the mean of population 2. We will test
this claim at a significance level of 5%, using samples of size 𝑛𝑛1 = 40 and 𝑛𝑛2 = 35 randomly drawn from
the populations, finding sample means 𝑥𝑥̅1 = 130.6 and 𝑥𝑥̅2 = 125.2. Also determine the p-value.

Exercise 6
Estimate the difference between the population means, according to the data of exercise 5, using a 95%-
confidence interval.

Exercise 7
A statistician found that in a random sample of 45 tubes of glue produced by one manufacturer, that the
mean drying time was 𝑥𝑥̅1 = 185 minutes, with a standard deviation of 20 minutes. In a random sample of
40 tubes of glue produced by another manufacturer, the mean drying time was 𝑥𝑥̅2 = 201 minutes, with a
standard deviation of 57 minutes. Do these data allow us to conclude, at the 10% significance level, that the
mean drying times of the two kinds of glue differ? Also estimate the p-value.

Exercise 8
a. Estimate the difference between mean drying times with 90% confidence for the data in Exercise 7.
Which conditions and assumptions need to be fulfilled?
b. Estimate the difference between mean drying times with 99% confidence for the data in Exercise 7.
How do these confidence intervals relate to hypothesis tests?

Exercise 9
An automobile parts manufacturer has been experimenting with a new type of spark plug designed to
improve gas mileage. In order to determine whether the new spark plug is effective, eight cars are
randomly selected. The conventional spark plug is installed in four of the cars, and the new experimental
spark plug is installed in the other four. The gas mileage is measured and reported below. Can we conclude
at the 5% significance level that the new experimental spark plug is effective in increasing gas mileage?
Assume that the requirement of normality is satisfied.
experimental conventional
spark plug spark plug
23 25
28 29
36 26
24 20

9
Exercise 10
The manufacturer of automotive parts from Exercise 9 concluded that the reason that his product was not
shown to be superior was because of too much variation between cars. To eliminate that variation, he
decided to redo the experiment by selecting four cars. Each is operated for a set number of miles with the
experimental spark plug and again with the conventional spark plug. (The order is randomly determined)
The results are shown below. Do these data provide sufficient evidence at the 5% significance level to
conclude that the experimental spark plug is effective in increasing gas mileage? You may assume that the
requirement of normality is satisfied.
experimental conventional
car
spark plug spark plug
1 36 34
2 25 22
3 29 28
4 20 19

Exercise 11
Find the 95% confidence interval estimate of the mean difference in Exercise 10.
When are we allowed to use this confidence interval?

Exercise 12
One factor in low productivity is the amount of time wasted by workers. Wasted time includes time spent
cleaning up mistakes, waiting for more material and equipment, and performing any other activity not
related to production. In a project designed to examine the problem, an operations management
consultant surveyed 57 workers in companies that were classified as successful on the basis of their latest
annual profits (group 1) and another 43 workers from companies that were unsuccessful (group 2). The
amount of time (in hours) wasted during a standard 40-hour workweek was recorded for each worker. Use
the SPSS-output below:
SPSS-OUTPUT EXERCISE 12: T-TEST
Independent Samples Test
Levene’s Test for
Equality of Variances t-test for Equality of Means
95% Confidence
Interval of
Mean Std. Error the Difference
F Sig. t df Sig. (2-tailed) Difference Difference Lower Upper
TIME Equal variances
18.634 .000 -7.052 98 .000 -3.1935 .4528 -4.0921 -2.2949
assumed
Equal variances
-6.427 55.263 .000 -3.1935 .4969 -4.1892 -2.1978
not assumed

10
Descriptives
group Statistic Std. Error
TIME 1.00 Mean 5.116 .1834
95% Confidence Lower Bound 4.748
Interval for Mean Upper Bound 5.483

5% Trimmed Mean 5.175


Median 5.200
Variance …
Std. Deviation …
Minimum 1.4
Maximum 7.8
Range 6.4
Interquartile Range 1.8
Skewness -.499 .316
Kurtosis .231 .623
2.00 Mean 8.309 .4618
95% Confidence Lower Bound 7.377
Interval for Mean Upper Bound 9.241

5% Trimmed Mean 8.187


Median 7.900
Variance …
Std. Deviation …
Minimum 2.8
Maximum 16.3
Range 13.5
Interquartile Range 3.5
Skewness .458 .361
Kurtosis .460 .709
a. Can we conclude, with 𝛼𝛼 = 0.01, that the amount of wasted time at unsuccessful companies is
larger than at successful companies? Perform a complete hypothesis test (7 steps).
b. Determine a bound for the p-value (using a statistical table).
c. Based on the SPSS-output (‘descriptives’), manually recalculate the following quantities:
• the value of the ‘standard error of the difference’
• the observed value of t
• the 95% confidence interval (and give an interpretation)

Exercise 13
Test with 𝛼𝛼 = 10% whether the variances are equal, using the information of Exercise 12.
a. Perform a complete hypothesis test (7 steps).
b. Determine the approximate p-value.
c. Based on the SPSS-output shown (entitled ‘Descriptives’), manually recalculate the 95% confidence
interval for the quotient of the variances (and give an interpretation).

Exercise 14
An accountant is in the process of investigating the consequences of switching to another method of
depreciating assets. In particular, she would like to know if the switch will result in a decrease in after-tax
profit. To help decide, she randomly selects six firms and calculates the after-tax profits using both
depreciation methods. The results (rounded to the nearest million) are shown below. Do these data
provide sufficient evidence to indicate that the adoption of method 2 results in a lower after-tax profit?
Test with 𝛼𝛼 = 0.05. Assume that the requirement of normality is satisfied.
company method 1 method 2
A 88 84
B 17 19
C 65 64
D 113 105
E 76 74
F 28 25

11
Exercise 15
Find the 99% confidence interval estimate of the mean difference in Exercise 14.
Which conditions and assumptions need to be fulfilled?

Exercise 16
Research scientists at a pharmaceutical company have recently developed a new nonprescription sleeping
pill. They decide to test its effectiveness by measuring the time it takes for people to fall asleep after taking
the pill. Preliminary analysis indicates that the time to fall asleep varies considerably from person to
another. Consequently, they organize the experiment in the following way.
A random sample of 50 volunteers who regularly suffer from insomnia is chosen. Each person is given one
pill containing the newly drug and one placebo. A placebo is a pill that contains absolutely no medication.
Participants are told to take one pill one night and the second pill one night a week later. The participants
do not know whether the pill they are taking is the medicine or the placebo, and the order of use is
random. Each participant is fitted with a device that measures the time before sleep occurs.
SPSS-OUTPUT EXERCISE 16: T-TEST
Paired Samples Statistics
Std. Error
Mean N Std. Deviation Mean
Pair DRUG 17.618 50 9.603 1.358
1 PLACEBO 21.084 50 10.574 1.495

Paired Samples Correlations


N Correlation Sig.
Pair 1 DRUG & PLACEBO 50 .509 .000

Paired Samples Test


Paired Differences
95% Confidence
Interval of the
Std. Error Difference
Mean Std. Deviation Mean Lower Upper t df Sig. (2-tailed)
Pair 1 DRUG – PLACEBO -3.466 10.037 1.419 -6.318 -.614 -2.442 49 .018

Descriptive Statistics
N Minimum Maximum Mean Std. Deviation
DRUG 50 1.6 46.3 17.618 1.358
PLACEBO 50 4.0 45.8 21.084 1.495
DIFFEREN 50 -24.60 21.90 -3.4660 10.0367
Valid N (listwise) 50

a. Can we conclude that the new drug is effective? Perform a complete hypothesis test (7 steps) to
answer this question. Use a 5% significance level.
b. Determine an approximation of the p-value based on the t-table.
c. Based on SPSS-output (‘descriptive statistics’), manually recalculate the following quantities:
• the value of the ‘standard error of the mean’ (estimated standard deviation of 𝑋𝑋�𝐷𝐷 )
• the value of t
• the 95% confidence interval (and give an interpretation)

Exercise 17
In random samples of 8 and 10 from two normal populations, it was found that 𝑠𝑠12 = 128 and 𝑠𝑠22 = 45
respectively. Do these statistics allow us to conclude that the variance of population 1 exceeds the variance
of population 2? Use 𝛼𝛼 = 0.05. You may assume that the requirement of normality is satisfied.

12
Exercise 18
In Exercise 17, estimate 𝜎𝜎12 ⁄𝜎𝜎22 with 98% confidence.
What are the necessary conditions and assumptions for this estimation?

Exercise 19
An educational statistician wanted to determine whether the scholastic aptitude test (SAT) scores achieved
by children living in cities was less variable than scores achieved by children living in suburbs. A random
sample of 25 SAT scores of city children yielded a variance of 𝑠𝑠12 = 7.814. A random sample of 25 SAT
scores of suburban children produced a variance of 𝑠𝑠22 = 9.258. At the 5% significance level, can we
conclude that the city SAT score variance is less than the suburban SAT score variance? You may assume
that the requirement of normality is satisfied.

Exercise 20
In Exercise 19, estimate 𝜎𝜎12 ⁄𝜎𝜎22 with 95% confidence. Why is this estimation allowed?

Exercise 21
As part of a larger research in the effects of diets, 12 overweight persons are selected at random. 6 of them
are put on a standard diet, and the other 6 on a moderate diet with exercises program. Each person is
weighed at the start of the experiment and again 10 weeks later. The results are shown in the table below.
We want to test whether the variance of the body weights after 10 weeks of diets are significantly different
or not. Use 5% significance level. You may assume that the requirement of normality is satisfied. Also,
calculate or estimate the p-value.
standard diet only moderate diet plus exercise
weight weight weight weight
at start after 10 weeks at start after 10 weeks
170 170 177 167
192 186 166 155
206 201 209 189
166 166 193 188
153 150 198 181
188 172 152 144

13
Week 1
Homework solutions
One population (Statistics 1)
Solution 1
a.
𝜎𝜎 2
𝑛𝑛 = 36 ≥ 30 ⟹ 𝑋𝑋� ~ 𝑁𝑁 𝑋𝑋� ~ 𝑁𝑁 �𝜇𝜇, � = 𝑁𝑁(94.5, 0.25)
𝑛𝑛
𝑋𝑋� − 𝜇𝜇 95.1 − 94.5
𝑃𝑃(𝑋𝑋� > 96.5) = 𝑃𝑃 � > � = 𝑃𝑃(𝑍𝑍 > 1.2) = 1 − 𝑃𝑃(𝑍𝑍 < 1.2) = 1 − 0.8849 = 0.1151
𝜎𝜎
√𝑛𝑛
0.50

𝑃𝑃(𝑋𝑋� > 95.1) = 𝑃𝑃(𝑍𝑍 > 1.2)


𝑋𝑋 93.0 93.5 94.0 94.5 95.0 95.5 96.0 �
𝑋𝑋

𝑋𝑋 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 𝑍𝑍
b.
𝜎𝜎 2
𝑛𝑛 = 49 ≥ 30 ⟹ 𝑋𝑋� ~ 𝑁𝑁 𝑋𝑋� ~ 𝑁𝑁 �𝜇𝜇, � = 𝑁𝑁(51.4, 0.09)
𝑛𝑛
49.8 − 51.4 𝑋𝑋� − 𝜇𝜇 51.7 − 51.4
𝑃𝑃(49.8 < 𝑋𝑋� < 51.7) = 𝑃𝑃 � < 𝜎𝜎 < � = 𝑃𝑃(−2.0 < 𝑍𝑍 < 1.0)
0.30 √𝑛𝑛
0.30
= 𝑃𝑃(𝑍𝑍 < 1.0) − 𝑃𝑃(𝑍𝑍 < −2.0) = 0.8413 − 0.0228 = 0.8185

𝑃𝑃(49.8 < 𝑋𝑋� < 51.7) = 𝑃𝑃(−2.0 < 𝑍𝑍 < 1.0)


𝑋𝑋 50.5 50.8 51.1 51.4 51.7 52.0 52.3 �
𝑋𝑋

𝑋𝑋 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 𝑍𝑍
c.
𝜎𝜎 2
𝑛𝑛 = 9 < 30 assumption: 𝑋𝑋 ~ 𝑁𝑁 ⟹ 𝑋𝑋� ~ 𝑁𝑁 𝑋𝑋� ~ 𝑁𝑁 �𝜇𝜇, � = 𝑁𝑁(5.92, 0.36)
𝑛𝑛
𝑋𝑋� − 𝜇𝜇 6.25 − 5.92
𝑃𝑃(𝑋𝑋� < 6.25) = 𝑃𝑃 � < � = 𝑃𝑃(𝑍𝑍 < 0.55) = 0.7088
𝜎𝜎
√𝑛𝑛
0.60

𝑃𝑃(𝑋𝑋� < 6.25) = 𝑃𝑃(𝑍𝑍 < 0.55)


𝑋𝑋 4.12 4.72 5.32 5.92 6.52 7.12 7.72 �
𝑋𝑋

𝑋𝑋 -3.0 -2.0 -1.0 0.0 1.0 2.0 3.0 𝑍𝑍

14
Solution 2
a. From the text: claim is 𝜇𝜇𝑛𝑛𝑛𝑛𝑛𝑛 < 𝜇𝜇𝑜𝑜𝑜𝑜𝑜𝑜 = 75, 𝜎𝜎 = 9.4, 𝑛𝑛 = 100, 𝑥𝑥̅ = 72.5, 𝛼𝛼 = 5%
1. ASSUMPTIONS AND CONDITIONS
• random sample
• 𝑛𝑛 = 100 ≥ 30 so the Central Limit Theorem applies: 𝑋𝑋� ~ 𝑁𝑁
• 𝜎𝜎 = 9.4 is known
2. HYPOTHESES
𝐻𝐻0 ∶ 𝜇𝜇 = 75 vs 𝐻𝐻1 ∶ 𝜇𝜇 < 75 (one-sided)
3. TEST STATISTIC AND ITS DISTRIBUTION
𝑋𝑋� − 𝜇𝜇0 𝑋𝑋� − 75
𝑍𝑍 = 𝜎𝜎 = ~ 𝑁𝑁(0, 1)
9.4
√𝑛𝑛 √100
4. REJECTION REGION
𝛼𝛼 = 5% ⟹ 𝑍𝑍 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.05 = −1.645
5. SAMPLE OUTCOME
72.5 − 75
𝑥𝑥̅ = 72.5 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −2.66
9.4
√100
6. CONFRONTATION
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 so reject 𝐻𝐻0 (in favor of 𝐻𝐻1 )
7. CONCLUSION
Given the significance level of 5%, there is sufficient evidence to conclude that the new paint has a
shorter drying time.
b. p-value = 𝑃𝑃(𝑍𝑍 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ) = 𝑃𝑃(𝑍𝑍 < −2.66) = 1 − 𝑃𝑃(𝑍𝑍 < 2.66) = 1 − 0.9961 = 0.0039 ⟹
p-value < 𝛼𝛼 = 0.05, so this confirms the rejection of 𝐻𝐻0 .
c. Because we need to estimate the population mean 𝜇𝜇, and it is given that 𝜎𝜎 = 9.4 is known and that
𝑛𝑛 = 100 ≥ 30 (so according to the CLT we have that 𝑋𝑋� ~ 𝑁𝑁), we will use the confidence interval:
𝜎𝜎 9.4
𝜇𝜇 = 𝑥𝑥̅ ± 𝑧𝑧𝛼𝛼⁄2 ∙ = 72.5 ± 1.645 ∙ = 72.5 ± 1.55 ⟹ 70.95 < 𝜇𝜇 < 74.05
√𝑛𝑛 √100
in which we used: 1 − 𝛼𝛼 = 90% ⟹ 𝑧𝑧𝛼𝛼 = 1.645
2
This interval does not include the population mean drying time of the old paint (75 min), so we can also
use the 90%-confidence interval to determine whether the new paint has a significantly different drying
time than the old paint (with significant level of 10%).

Solution 3
a. From the text: claim is 𝜇𝜇𝑛𝑛𝑛𝑛𝑛𝑛 > 𝜇𝜇𝑜𝑜𝑜𝑜𝑜𝑜 = 3600, 𝜎𝜎 unknown, 𝑛𝑛 = 20, 𝑥𝑥̅ = 3915, 𝑠𝑠 = 502, 𝛼𝛼 = 5%
1. ASSUMPTIONS AND CONDITIONS
• random sample
• quantitative data
• population is normally distributed 𝑋𝑋 ~ 𝑁𝑁 (so according to the Central Limit Theorem: 𝑋𝑋� ~ 𝑁𝑁)
• unknown variance 𝜎𝜎 2 (so we cannot use 𝑍𝑍)
2. HYPOTHESES
𝐻𝐻0 ∶ 𝜇𝜇 = 3600 vs 𝐻𝐻1 ∶ 𝜇𝜇 > 3600 (one-sided)
3. TEST STATISTIC AND ITS DISTRIBUTION
𝑋𝑋� − 𝜇𝜇
𝑇𝑇 = ~ 𝑡𝑡[df] where df = 𝑛𝑛 − 1 = 20 − 1 = 19
𝑆𝑆
√𝑛𝑛
4. REJECTION REGION
𝛼𝛼 = 5% ⟹ 𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.05, 19 = 1.729

15
5. SAMPLE OUTCOME
3915 − 3600
𝑥𝑥̅ = 3915 and 𝑠𝑠 = 502 ⟹ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = 2.81
502
√20
6. CONFRONTATION
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 so reject 𝐻𝐻0 (in favor of 𝐻𝐻1 )
7. CONCLUSION
At 5% significance level, there is sufficient evidence to conclude that the loan manager is correct.
b. p-value = 𝑃𝑃(𝑇𝑇 > 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ) = 𝑃𝑃(𝑇𝑇 > 2.81)
for df = 𝑛𝑛 − 1 = 19 ∶ 𝑃𝑃(𝑇𝑇 > 2.528) = 0.01 and 𝑃𝑃(𝑇𝑇 > 2.845) = 0.005 (see table 4)
2.528 < 𝑡𝑡𝑜𝑜𝑜𝑜𝑠𝑠 < 2.845 ⟹ 0.005 < 𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 < 0.01
(p-value < 𝛼𝛼 = 0.05, so this confirms the rejection of 𝐻𝐻0 )
c. Because we need to estimate the population mean 𝜇𝜇 (at the new branch) while 𝜎𝜎 is unknown, and
given that the loan amounts are normally distributed (so according to the CLT we have that 𝑋𝑋� ~ 𝑁𝑁), we
will use the confidence interval:
𝑠𝑠 502
𝜇𝜇 = 𝑥𝑥̅ ± 𝑡𝑡𝛼𝛼⁄2, df ∙ = 3915 ± 1.725 ∙ = 3915 ± 193.63 ⟹ 3721.37 < 𝜇𝜇 < 4108.63
√𝑛𝑛 √20
in which we used: 1 − 𝛼𝛼 = 90% and df = 19 ⟹ 𝑡𝑡𝛼𝛼⁄2, df = 1.725
This interval does not include the population mean of the other branches (3600 $), so we can also use
this 90%-confidence interval to determine whether the branch has a significantly different mean loan
amount than the other branches (with significant level of 10%).

Solution 4
𝑋𝑋� − 𝜇𝜇 𝜎𝜎
a. 𝑍𝑍 = 𝜎𝜎
~ 𝑁𝑁(0, 1) b. 𝜇𝜇 = 𝑥𝑥̅ ± 𝑧𝑧𝛼𝛼⁄2 ∙
√𝑛𝑛
√𝑛𝑛

𝑋𝑋� − 𝜇𝜇 𝑠𝑠
c. 𝑇𝑇 = 𝑆𝑆
~ 𝑡𝑡[df = 𝑛𝑛 − 1] d. 𝜇𝜇 = 𝑥𝑥̅ ± 𝑡𝑡𝛼𝛼⁄2, df ∙
√𝑛𝑛
√𝑛𝑛

• a. and c. are test statistics.


We use them to test hypotheses about a population mean, using sample data as evidence.
• b. and d. are confidence intervals.
We use them to estimate the population mean, based on sample data.
• a. and b. use 𝑍𝑍 ~ 𝑁𝑁(0, 1)
We use them when the population variance 𝜎𝜎 2 is known. This knowledge gives us more precise
estimations. However, in reality, it almost never happens that we know the population variance.
• c. and d. use 𝑇𝑇 ~ 𝑡𝑡[df = 𝑛𝑛 − 1]
We use them when the population variance 𝜎𝜎 2 is unknown. In that case, we’ll use the sample vari-
ance 𝑠𝑠 2 . We know less of the population, so these estimations are a bit less precise.
• All of the formulas require that 𝑋𝑋� ~ 𝑁𝑁
If the sample is large enough (𝑛𝑛 ≥ 30) or the population values are normally distributed (𝑋𝑋 ~ 𝑁𝑁)
then, according to the Central Limit Theorem, we have that 𝑋𝑋� ~ 𝑁𝑁.
• All of the formulas require quantitative data.
We cannot calculate means and variances of ordinal and nominal data.

16
Two populations (Statistics 2)
Solution 5
Conditions and assumptions
• Independent random samples
• Available: quantitative data
• Required: minimally quantitative level
• Known variances (in reality, it rarely happens that we know the population variances)
• Samples are large enough: 𝑛𝑛1 = 40 ≥ 30 and 𝑛𝑛2 = 35 ≥ 30. The Central Limit Theorem applies.
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇1 = 𝜇𝜇2 + 4.0 versus 𝐻𝐻1 ∶ 𝜇𝜇1 > 𝜇𝜇2 + 4.0
(We usually write: 𝐻𝐻0 ∶ 𝜇𝜇1 − 𝜇𝜇2 = 4.0 versus 𝐻𝐻1 ∶ 𝜇𝜇1 − 𝜇𝜇2 > 4.0 )
1 ∶ population 1 2 ∶ population 2
Test statistic and its distribution
(𝑋𝑋�1 − 𝑋𝑋�2 ) − (𝜇𝜇1 − 𝜇𝜇2 )
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
2 2
𝜎𝜎 𝜎𝜎
� 1 + 2
𝑛𝑛1 𝑛𝑛2

Rejection region
𝛼𝛼 = 5% and 𝐻𝐻1 is right sided ⟹ 𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 1.645
Sample outcome
𝑥𝑥̅1 = 130.6, 𝑥𝑥̅2 = 125.2, 𝜎𝜎1 = 4.5, 𝜎𝜎2 = 5.3, 𝑛𝑛1 = 40, 𝑛𝑛2 = 35 ⟹
(130.6 − 125.2) − 4.0 5.4 − 4.0
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = = 1.224
2 2 1.144
�4.5 + 5.3
40 35
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is insufficient evidence to infer that population mean 1 is
at least 4.0 higher than population mean 2.
p-value
p-value = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ) ≈ 𝑃𝑃(𝑍𝑍 ≥ 1.22) = 1 − 𝑃𝑃(𝑍𝑍 < 1.22) = 1 − 0.8888 = 0.1112
(The p-value is larger than the significance level 𝛼𝛼 = 0.05. This means we cannot reject the null-
hypothesis 𝐻𝐻0 . This is, of course, in accordance with the confrontation between 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 and 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐
above.)

Solution 6
95%-confidence interval:
𝜎𝜎12 𝜎𝜎22 4.52 5.32
𝜇𝜇1 − 𝜇𝜇2 = 𝑥𝑥̅1 − 𝑥𝑥̅2 ± 𝑧𝑧𝛼𝛼, ∙ � + = 130.6 − 125.2 ± 1.96 ∙ � + = 5.4 ± 2.24
2 𝑛𝑛1 𝑛𝑛2 40 35
where 1 − 𝛼𝛼 = 95% ⟹ 𝛼𝛼 = 5% ⟹ 𝑧𝑧𝛼𝛼 = 𝑧𝑧0.025 = 1.96
2

(This confidence interval contains the value 4.0 of the null-hypothesis 𝐻𝐻0 ∶ 𝜇𝜇1 − 𝜇𝜇2 = 4.0, so we
cannot reject the null-hypothesis in a two-sided hypothesis test with 𝛼𝛼 = 5%.)

17
Solution 7
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• unknown variances
• samples are large enough: 𝑛𝑛1 = 45 ≥ 30 and 𝑛𝑛2 = 40 ≥ 30
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇1 = 𝜇𝜇2 versus 𝐻𝐻1 ∶ 𝜇𝜇1 ≠ 𝜇𝜇2
1 ∶ manufacturer 1 2 ∶ manufacturer 2
Test statistic and its distribution We may already fill in known values:
(𝑋𝑋�1 − 𝑋𝑋�2 ) − (𝜇𝜇1 − 𝜇𝜇2 ) 𝑛𝑛1 = 45 and 𝑛𝑛2 = 40 and 𝜇𝜇1 − 𝜇𝜇2 = 0.
𝑇𝑇 = ~ 𝑡𝑡[df] In order to determine df (and 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ) we need
𝑆𝑆 2
𝑆𝑆 2 the sample variances 𝑠𝑠12 and 𝑠𝑠22 that only
� 1+ 2 become known after taking the samples. In real
𝑛𝑛1 𝑛𝑛2
research, we would take the samples and then
𝑠𝑠 2 𝑠𝑠 2
2 adjust df and 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 accordingly. But since
�𝑛𝑛1 + 𝑛𝑛2 � values are given upfront, in exercises, we can
1 2
where df = 2 2 = 47.499 ≈ 45 calculate df here immediately.
𝑠𝑠12 𝑠𝑠22
� � � � However, do not fill in the values of 𝑥𝑥̅1 and 𝑥𝑥̅2
𝑛𝑛1 𝑛𝑛
+ 2 here, because the test statistic must remain a
𝑛𝑛1 − 1 𝑛𝑛2 − 1
random variable about the difference of
Rejection region means.
𝛼𝛼 = 10% and 𝐻𝐻1 is two sided ⟹

𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.05, 45 = 1.679 or 𝑇𝑇 ≤ −𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −1.679


Sample outcome
𝑥𝑥̅1 = 185, 𝑥𝑥̅2 = 201, 𝑠𝑠1 = 20, 𝑠𝑠2 = 57, 𝑛𝑛1 = 45, 𝑛𝑛2 = 40 ⟹
(185 − 201) − 0
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = −1.69
2 2
�20 + 57
45 40
Confrontation and decision
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≤ −𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 10%, there is sufficient evidence to infer that the drying times are
different.
p-value
p-value = 2 ∙ 𝑃𝑃(𝑇𝑇 ≤ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = −1.69) = 2 ∙ 𝑃𝑃(𝑇𝑇 ≥ 1.69)
for df = 45 ∶ 1.679 < 1.69 < 2.014 ⟹ 0.025 < 𝑃𝑃(𝑇𝑇 ≥ 1.69) < 0.05
⟹ 0.05 < p-value < 0.10

18
Solution 8
Conditions and assumptions
• independent random samples Same conditions and assumptions
• available: quantitative data apply for the confidence interval as
• Required: minimally quantitative level for the hypothesis test (exercise 7)
• unknown variances
• samples large enough: 𝑛𝑛1 = 45 ≥ 30 and 𝑛𝑛2 = 40 ≥ 30
a. 90%-confidence interval:
𝑠𝑠12 𝑠𝑠22 202 572
𝜇𝜇1 − 𝜇𝜇2 = 𝑥𝑥̅1 − 𝑥𝑥̅2 ± 𝑡𝑡𝛼𝛼, df ∙ � + = 185 − 201 ± 1.679 ∙ � + = −16 ± 15.9
2 𝑛𝑛1 𝑛𝑛2 45 40
where 𝛼𝛼 = 10% ⟹ 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.05, 45 = 1.679
2
Does the 90%-confidence interval indicate that the two chains differ?
We expect to find 𝜇𝜇1 − 𝜇𝜇2 between −16 − 15.9 = −31.9 and −16 + 15.9 = −0.1. This 90%-
confidence interval does not include the case that 𝜇𝜇1 − 𝜇𝜇2 = 0. This means that the sample data
cannot be used to reject the null hypothesis 𝐻𝐻0 ∶ 𝜇𝜇1 − 𝜇𝜇2 = 0 (versus 𝐻𝐻1 ∶ 𝜇𝜇1 − 𝜇𝜇2 ≠ 0) in a
hypothesis test with significance level 𝛼𝛼 = 10% (= 1 − 0.90). So, the answer is: no, with a
significance level of 10%, the data do not provide sufficient evidence to infer that the two chains differ
in success.
b. 99%-confidence interval:
𝑠𝑠12 𝑠𝑠22 202 572
𝜇𝜇1 − 𝜇𝜇2 = 𝑥𝑥̅1 − 𝑥𝑥̅2 ± 𝑡𝑡𝛼𝛼, df ∙ � + = 185 − 201 ± 2.690 ∙ � + = −16 ± 25.5
2 𝑛𝑛1 𝑛𝑛2 45 40
where 𝛼𝛼 = 1% ⟹ 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.005, 45 = 2.690
2

Does the 99%-confidence interval indicate that the two chains differ?
We expect to find 𝜇𝜇1 − 𝜇𝜇2 between −16 − 25.5 = −41.5 and −16 + 25.5 = 9.5. This 99%-
confidence interval does include the case that 𝜇𝜇1 − 𝜇𝜇2 = 0. This means that the sample data be used to
reject the null hypothesis 𝐻𝐻0 ∶ 𝜇𝜇1 − 𝜇𝜇2 = 0 (versus 𝐻𝐻1 ∶ 𝜇𝜇1 − 𝜇𝜇2 ≠ 0) in a hypothesis test with
significance level 𝛼𝛼 = 1% (= 1 − 0.99). So, the answer is: yes, with significance level of 1%, the data
provides sufficient evidence to infer that the two chains differ in success.

Solution 9
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• unknown variances
• population is normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇1 = 𝜇𝜇2 versus 𝐻𝐻1 ∶ 𝜇𝜇1 > 𝜇𝜇2
1 ∶ experimental spark plug 2 ∶ conventional spark plug
Test statistic and its distribution
2
𝑠𝑠 2 𝑠𝑠 2
(𝑋𝑋�1 − 𝑋𝑋�2 ) − (𝜇𝜇1 − 𝜇𝜇2 ) �𝑛𝑛1 + 𝑛𝑛2 �
1 2
𝑇𝑇 = ~ 𝑡𝑡[df] where df = = 5.073 ≈ 5
2 2 2
𝑆𝑆 2 𝑆𝑆 2 𝑠𝑠1 𝑠𝑠22
� 1 + 2 � � � �
𝑛𝑛1 𝑛𝑛2 𝑛𝑛1 𝑛𝑛2
+
𝑛𝑛1 − 1 𝑛𝑛2 − 1

19
Rejection region
𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.05, 5 = 2.015
Sample outcome
experimental conventional
spark plug spark plug
23 25
28 29
36 26
24 20
mean: 𝑥𝑥̅1 = 27.75 𝑥𝑥̅2 = 25.00
standard deviation: 𝑠𝑠1 = 5.91 𝑠𝑠2 = 3.74

(27.75 − 25.00) − 0
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = 0.786
2 2
�5.91 + 3.74
4 4
Confrontation and decision
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is not sufficient evidence to infer that the new type of
spark plug is effective.
p-value
p-value = 𝑃𝑃(𝑇𝑇 ≥ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = 0.786)
for df = 5 ∶ 0.000 < 0.786 < 1.476 ⟹ 0.10 < 𝑃𝑃(𝑇𝑇 ≥ 0.786) < 0.50
⟹ 0.10 < p-value < 0.50
From the SPSS-output below: p-value = ½ ∙ 0.467 = 0.234 (one-sided test)
SPSS-OUTPUT EXERCISE 9: T-TEST
Group Statistics
Std. Error
group N Mean Std. Deviation Mean
DATA 1.00 4 27.7500 5.9090 2.9545
2.00 4 25.0000 3.7417 1.8708

Independent Samples Test

t-test for Equality of Means


99% Confidence
Interval of the
Sig. Mean Std. Error Difference
t df (2-tailed) Difference Difference Lower Upper
DATA Equal variances
.786 6 .462 2.7500 3.4970 -10.2150 15.7150
assumed
Equal variances
.786 5.073 .467 2.7500 3.4970 -11.2473 16.7473
not assumed

20
Solution 10
Conditions and assumptions
• random sample of paired differences
• available: quantitative data
• Required: minimally quantitative level
• population of differences is normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇D = 0 versus 𝐻𝐻1 ∶ 𝜇𝜇D > 0
difference = mileage experimental spark plug − mileage conventional spark plug
Test statistic and its distribution
𝑋𝑋�𝐷𝐷 − 𝜇𝜇𝐷𝐷
𝑇𝑇 = ~ 𝑡𝑡[df] where df = 𝑛𝑛D − 1 = 4 − 1 = 3
𝑆𝑆𝐷𝐷
√𝑛𝑛𝐷𝐷
Rejection region
𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.05, 3 = 2.353
Sample outcome
1.750 − 0
𝑥𝑥̅𝐷𝐷 = 1.750, 𝑠𝑠𝐷𝐷 = 0.957, 𝑛𝑛𝐷𝐷 = 4 ⟹ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = 3.66
0.957
√4
Confrontation and decision
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
At significance level of 5%, there is enough evidence to conclude that the experimental spark plug
is effective in increasing gas mileage.
SPSS-OUTPUT EXERCISE 10: T-TEST
Paired Samples Statistics
Std. Error
Mean N Std. Deviation Mean
Pair EXPERIM 27.5000 4 6.7577 3.3789
1 CONVENT 25.7500 4 6.6521 3.3260

Paired Samples Test


Paired Differences
Std. Error
Mean Std. Deviation Mean t df Sig. (2-tailed)
Pair 1 EXPERIM – CONVENT 1.7500 .9574 .4787 3.656 3 .035

Solution 11
Conditions and assumptions
• random sample of paired differences Same conditions and assumptions
• available: quantitative data apply for the confidence interval as
• Required: minimally quantitative level for the hypothesis test (exercise 10)
• population of differences is normally distributed
95% confidence interval
𝑠𝑠𝐷𝐷 0.96
𝜇𝜇D = 𝑥𝑥̅D ± 𝑡𝑡𝛼𝛼, df ∙ = 1.75 ± 3.182 ∙ = 1.75 ± 1.53 where 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.025, 3 = 3.182
2 √𝑛𝑛𝐷𝐷 √4 2

21
(a hypothesis test with 𝐻𝐻1 ∶ 𝜇𝜇𝐷𝐷 ≠ 0 and significance level 5% would reject 𝐻𝐻0 ∶ 𝜇𝜇𝐷𝐷 = 0)

Solution 12
a.
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• population variances are unknown
• populations are normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇1 = 𝜇𝜇2 versus 𝐻𝐻1 ∶ 𝜇𝜇1 < 𝜇𝜇2
1 ∶ time waste in successful companies 2 ∶ time waste in unsuccessful companies
Test statistic and its distribution
2
𝑠𝑠 2 𝑠𝑠 2
(𝑋𝑋�1 − 𝑋𝑋�2 ) − (𝜇𝜇1 − 𝜇𝜇2 ) �𝑛𝑛1 + 𝑛𝑛2 �
1 2
𝑇𝑇 = ~ 𝑡𝑡[df] where df = 2 2 = 55.26 ≈ 60
𝑆𝑆 2 𝑆𝑆 2 𝑠𝑠 2 𝑠𝑠 2
� 1 + 2 � 1� � 2�
𝑛𝑛1 𝑛𝑛2 𝑛𝑛1 𝑛𝑛2
𝑛𝑛1 − 1 + 𝑛𝑛2 − 1
Rejection region
𝑇𝑇 ≤ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑡𝑡0.01, 60 = −2.39
Sample outcome

𝑠𝑠12 𝑠𝑠22 −3.1935 − 0


𝑥𝑥̅1 − 𝑥𝑥̅2 = −3.1935 and � + = 𝑆𝑆𝐸𝐸diff = 0.4969 ⟹ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = −6.427
𝑛𝑛1 𝑛𝑛2 0.4969

Confrontation and decision


𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 1%, there is enough evidence to infer that unsuccessful firms waste
more time than successful ones.
b.
p-value
p-value = 𝑃𝑃(𝑇𝑇 ≤ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = −6.427) = 𝑃𝑃(𝑇𝑇 ≥ 6.427)
for df = 60 ∶ 6.427 > 2.660 ⟹ p-value = 𝑃𝑃(𝑇𝑇 ≥ 6.427) < 𝑃𝑃(𝑇𝑇 ≥ 2.660) = 0.005
c.
the value of the ‘standard error of the difference’

𝑠𝑠12 𝑠𝑠22 𝑠𝑠12 𝑠𝑠22


𝑆𝑆𝐸𝐸1 = � = 0.1834 and 𝑆𝑆𝐸𝐸2 = � = 0.4681 ⟹ 𝑆𝑆𝐸𝐸12 = and 𝑆𝑆𝐸𝐸22 = and
𝑛𝑛1 𝑛𝑛2 𝑛𝑛1 𝑛𝑛2

𝑠𝑠12 𝑠𝑠22
𝑆𝑆𝐸𝐸diff = � + = �𝑆𝑆𝐸𝐸12 + 𝑆𝑆𝐸𝐸22 = �0.18342 + 0.46812 = 0.4969
𝑛𝑛1 𝑛𝑛2
2
(𝑆𝑆𝐸𝐸12 + 𝑆𝑆𝐸𝐸22 = 𝑆𝑆𝐸𝐸diff reminds us of Pythagoras: 𝑎𝑎2 + 𝑏𝑏 2 = 𝑐𝑐 2 )

22
the observed value of t
(𝑥𝑥̅1 − 𝑥𝑥̅2 ) − 0 5.116 − 8.309
𝑥𝑥̅1 = 5.116 and 𝑥𝑥̅2 = 8.309 ⟹ 𝑇𝑇 = = = −6.43
𝑆𝑆𝑆𝑆𝑑𝑑𝑑𝑑𝑑𝑑 0.4969
95% confidence interval
𝜇𝜇1 − 𝜇𝜇2 = 𝑥𝑥̅1 − 𝑥𝑥̅2 ± 𝑡𝑡𝛼𝛼, df ∙ 𝑆𝑆𝐸𝐸diff = 5.116 − 8.309 ± 2.000 ∙ 0.4969 = −3.193 ± 0.9938
2

where 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.025, 60 = 2.000 ⟹ − 4.19 < 𝜇𝜇1 − 𝜇𝜇2 < −2.20
2

The difference in the average time wasted lies, with 95% confidence, between –2.20 and
–4.19 hours.
(a hypothesis test with 𝐻𝐻1 ∶ 𝜇𝜇1 ≠ 𝜇𝜇2 and significance level 5% would reject 𝐻𝐻0 ∶ 𝜇𝜇1 = 𝜇𝜇2 )

Solution 13
a.
Conditions and assumptions
• the two random samples are independent
• available: quantitative data
• Required: minimally quantitative level
• the populations are normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜎𝜎12 = 𝜎𝜎22 versus 𝐻𝐻1 ∶ 𝜎𝜎12 ≠ 𝜎𝜎22
1 ∶ successful companies 2 ∶ unsuccessful companies
Test statistic and its distribution
𝑆𝑆12
𝐹𝐹 = 2 ~ 𝐹𝐹[df𝑛𝑛𝑛𝑛𝑛𝑛 , df𝑑𝑑𝑑𝑑𝑑𝑑 ] where df𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑛𝑛1 − 1 = 56 ≈ 60 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 𝑛𝑛2 − 1 = 42 ≈ 40
𝑆𝑆2
Rejection region
𝑈𝑈 𝐿𝐿 1 1
𝐹𝐹 ≥ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.05, 60, 40 = 1.64 or 𝐹𝐹 ≤ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.95, 60, 40 = = = 0.63
𝑓𝑓0.05, 40, 60 1.59
Sample outcome
𝑠𝑠12 𝑆𝑆𝐸𝐸12 ∙ 𝑛𝑛1 0.18342 ∙ 57 1.9172
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 == = = = 0.21
𝑠𝑠22 𝑆𝑆𝐸𝐸22 ∙ 𝑛𝑛1 0.46182 ∙ 43 9.1701
𝑠𝑠𝑖𝑖
because 𝑆𝑆𝑆𝑆𝑖𝑖 = ⟹ 𝑠𝑠𝑖𝑖 = 𝑆𝑆𝑆𝑆𝑖𝑖 ∙ �𝑛𝑛𝑖𝑖 ⟹ 𝑠𝑠𝑖𝑖2 = 𝑆𝑆𝑆𝑆𝑖𝑖2 ∙ 𝑛𝑛𝑖𝑖
�𝑛𝑛𝑖𝑖
Confrontation and decision
𝐿𝐿
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that the population variances
are unequal.
b.
p-value
1
p-value = 2 ∙ 𝑃𝑃�𝐹𝐹60, 40 ≤ 𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = 0.21� = 2 ∙ 𝑃𝑃 �𝐹𝐹40, 60 ≥ = 4.76�
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜

for df𝑛𝑛𝑛𝑛𝑛𝑛 = 40 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 60 ∶ 4.76 > 1.94 ⟹ 𝑃𝑃(𝐹𝐹 ≥ 4.76) < 𝑃𝑃(𝐹𝐹 ≥ 1.94) = 0.01
⟹ p-value < 2 ∙ 0.01 = 0.02

23
c.
95% confidence interval
𝜎𝜎12 𝑠𝑠12 𝑠𝑠12 1
2 ∈ �𝑓𝑓 𝛼𝛼
1− 2 , 𝜈𝜈1 , 𝜈𝜈2 ∙ 2 , 𝑓𝑓 𝛼𝛼 ∙ 2 �=� ∙ 0.21, 1.74 ∙ 0.21� = (0.12, 0.37)
𝜎𝜎2 𝑠𝑠2 2
, 𝜈𝜈1 , 𝜈𝜈2
𝑠𝑠2 1.80
1 1
where 𝑓𝑓1−𝛼𝛼, 𝜈𝜈1 , 𝜈𝜈2 = 𝑓𝑓0.975, 40, 60 = = and 𝑓𝑓𝛼𝛼, 𝜈𝜈1, 𝜈𝜈2 = 𝑓𝑓0.025, 40, 60 = 1.74
2 𝑓𝑓0.025, 60, 40 1.80 2

With 95% confidence the quotient of the population variances lies between 0.12 and 0.37. This outcome
agrees with the conclusion of part a, that the population variances are unequal. For equality, the quotient
interval would contain 1.00.

Solution 14
Conditions and assumptions
• random sample of paired differences
• available: quantitative data
• Required: minimally quantitative level
• population of differences is normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇D = 0 versus 𝐻𝐻1 ∶ 𝜇𝜇D > 0
difference = profit method 1 − profit method 2
Test statistic and its distribution
𝑋𝑋�𝐷𝐷 − 𝜇𝜇𝐷𝐷
𝑇𝑇 = ~ 𝑡𝑡[df] where df = 𝑛𝑛D − 1 = 6 − 1 = 5
𝑆𝑆𝐷𝐷
√𝑛𝑛𝐷𝐷
Rejection region
𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.05, 5 = 2.015
Sample outcome
sample of
company method 1 method 2
differences
A 88 84 4
B 17 19 -2
C 65 64 1
D 113 105 8
E 76 74 2
F 28 25 3
2.667 mean 𝑥𝑥̅ 𝐷𝐷
3.327 st.dev. 𝑠𝑠𝐷𝐷

2.667 − 0
𝑥𝑥̅𝐷𝐷 = 2.667, 𝑠𝑠𝐷𝐷 = 3.327, 𝑛𝑛𝐷𝐷 = 6 ⟹ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = 1.964
3.327
√6
Confrontation and decision
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ not reject 𝐻𝐻0
Conclusion
At a significance level of 5%, we have not found sufficient evidence to infer that the adoption of
method 2 results in a lower after-tax profit.

24
Solution 15
Conditions and assumptions
• random sample of paired differences Same conditions and assumptions
• available: quantitative data apply for the confidence interval as
• Required: minimally quantitative level for the hypothesis test (exercise 14)
• population of differences is normally distributed
99% confidence interval
𝑠𝑠𝐷𝐷 3.327
𝜇𝜇D = 𝑥𝑥̅D ± 𝑡𝑡𝛼𝛼, df ∙ = 2.667 ± 4.032 ∙ = 2.667 ± 5.476 where 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.005, 6 = 4.032
2 √𝑛𝑛𝐷𝐷 √6 2

(a hypothesis test with 𝐻𝐻1 ∶ 𝜇𝜇𝐷𝐷 ≠ 0 and significance level 1% would not reject 𝐻𝐻0 ∶ 𝜇𝜇𝐷𝐷 = 0)

Solution 16
a.
Conditions and assumptions
• random sample of paired differences
• available: quantitative data
• Required: minimally quantitative level
• population of differences is normally distributed
• sample is large enough: 𝑛𝑛 = 50 ≥ 30
Hypotheses
𝐻𝐻0 ∶ 𝜇𝜇D = 0 versus 𝐻𝐻1 ∶ 𝜇𝜇D < 0
difference = time to fall asleep drug − time to fall asleep placebo
Test statistic and its distribution
𝑋𝑋�D − 𝜇𝜇D
𝑇𝑇 = ~ 𝑡𝑡[df] where df = 𝑛𝑛D − 1 = 50 − 1 = 49 ≈ 50
𝑆𝑆𝐷𝐷
√𝑛𝑛𝐷𝐷
Rejection region
𝑇𝑇 ≤ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑡𝑡0.05, 50 = −1.676
Sample outcome
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = −2.442
Confrontation and decision
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given 5% significance, there is enough evidence to infer that the new drug is effective.
b.
p-value
p-value = 𝑃𝑃(𝑇𝑇 ≤ 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = −2.442) = 𝑃𝑃(𝑇𝑇 ≥ 2.442)
for df = 50 ∶ 2.403 < 2.442 < 2.678 ⟹ 0.005 < 𝑃𝑃(𝑇𝑇 ≥ 2.442) < 0.01
⟹ 0.005 < p-value < 0.01 SPSS always reports a p-value for a
two-sided test. We're doing a one-
Or from the SPSS-tables: p-value = ½ ∙ 0.0018 = 0.009 sided test, so we need to divide by 2

25
c.
the value of the ‘standard error of the mean’
s𝐷𝐷 10.037
𝑆𝑆𝐸𝐸𝐷𝐷 = = = 1.4194
√𝑛𝑛𝐷𝐷 √50
the observed value of t
𝑥𝑥̅D = 𝑥𝑥̅1 − 𝑥𝑥̅2 = 17.618 − 21.084 = −3.466, 𝜇𝜇𝐷𝐷 = 0, 𝑠𝑠𝐷𝐷 = 10.0367, 𝑛𝑛𝐷𝐷 = 50 ⟹
𝑥𝑥̅𝐷𝐷 − 𝜇𝜇𝐷𝐷 −3.466 − 0
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = = = −2.442
𝑆𝑆𝐸𝐸𝐷𝐷 1.4194
95% confidence interval
𝜇𝜇𝐷𝐷 = 𝑥𝑥̅𝐷𝐷 ± 𝑡𝑡𝛼𝛼, df ∙ 𝑆𝑆𝐸𝐸𝐷𝐷 = −3.466 ± 2.009 ∙ 1.4194 = −3.466 ± 2.852
2

where 𝑡𝑡𝛼𝛼, df = 𝑡𝑡0.025, 50 = 2.009 ⟹ − 6.32 < 𝜇𝜇𝐷𝐷 < −0.61


2

We are 95% confident that the difference lies between –6.32 and −0.61.
(a hypothesis test with 𝐻𝐻1 ∶ 𝜇𝜇𝐷𝐷 ≠ 0 and significance level 5% would reject 𝐻𝐻0 ∶ 𝜇𝜇𝐷𝐷 = 0)

Solution 17
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• populations are normally distributed
Hypotheses
𝜎𝜎12 𝜎𝜎12
𝐻𝐻0 ∶ =1 versus 𝐻𝐻1 ∶ >1
𝜎𝜎22 𝜎𝜎22
Test statistic and its distribution
𝑆𝑆12
𝐹𝐹 = ~ 𝐹𝐹[df𝑛𝑛𝑛𝑛𝑛𝑛 , df𝑑𝑑𝑑𝑑𝑑𝑑 ] where df𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑛𝑛1 − 1 = 7 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 𝑛𝑛2 − 1 = 9
𝑆𝑆22
Rejection region
𝐹𝐹 ≥ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.05, 7, 9 = 3.29
Sample outcome
𝑠𝑠12 128
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = = = 2.84
𝑠𝑠22 45
Confrontation and decision
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
At a significance level of 5, there is not enough evidence to conclude that 𝜎𝜎12 exceeds 𝜎𝜎22 .
Solution 18
Conditions and assumptions
• independent random samples Same conditions and assumptions
• available: quantitative data apply for the confidence interval as
• Required: minimally quantitative level for the hypothesis test (exercise 17)
• populations are normally distributed
98% confidence interval
𝜎𝜎12 𝑠𝑠12 1 𝑠𝑠12 128 1 128
2 ∈ � 2 ∙ 𝑓𝑓𝛼𝛼 , 2 ∙ 𝑓𝑓𝛼𝛼, 𝜈𝜈2, 𝜈𝜈1 � = � ∙ , ∙ 6.72� = (0.51, 19.11)
𝜎𝜎2 𝑠𝑠2 , 𝜈𝜈1 , 𝜈𝜈2 𝑠𝑠2 2 45 5.61 45
2

where 𝑓𝑓𝛼𝛼, 𝜈𝜈1, 𝜈𝜈2 = 𝑓𝑓𝛼𝛼, 7, 9 = 5.61 and 𝑓𝑓𝛼𝛼, 𝜈𝜈2, 𝜈𝜈1 = 𝑓𝑓𝛼𝛼, 9, 7 = 6.72
2 2 2 2

Solution 19
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• populations are normally distributed
Hypotheses
𝜎𝜎12 𝜎𝜎12
𝐻𝐻0 ∶ =1 versus 𝐻𝐻1 ∶ <1
𝜎𝜎22 𝜎𝜎22
1 ∶ city 2 ∶ suburban
Test statistic and its distribution
𝑆𝑆12
𝐹𝐹 = ~ 𝐹𝐹[df𝑛𝑛𝑛𝑛𝑛𝑛 , df𝑑𝑑𝑑𝑑𝑑𝑑 ] where df𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑛𝑛1 − 1 = 24 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 𝑛𝑛2 − 1 = 24
𝑆𝑆22
Rejection region
1 1
𝐹𝐹 ≤ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.95, 24, 24 = = = 0.51
𝑓𝑓0.05, 24, 24 1.98
Sample outcome
𝑠𝑠12 7.814
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = = = 0.84
𝑠𝑠22 9.258
Confrontation and decision
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 > 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is not enough evidence to conclude that 𝜎𝜎12 is less than 𝜎𝜎22 .

Solution 20
Conditions and assumptions
• independent random samples Same conditions and assumptions
• available: quantitative data apply for the confidence interval as
• Required: minimally quantitative level for the hypothesis test (exercise 19)
• populations are normally distributed
95% confidence interval
𝜎𝜎12 𝑠𝑠12 𝑠𝑠12 1 7.814 7.814
2 ∈ �𝑓𝑓 𝛼𝛼
1− 2 , 𝜈𝜈1 , 𝜈𝜈2 ∙ 2 , 𝑓𝑓 𝛼𝛼 ∙ 2 �=� ∙ , 2.27 ∙ � = (0.37, 1.92)
𝜎𝜎2 𝑠𝑠2 2 , 𝜈𝜈1 , 𝜈𝜈2
𝑠𝑠2 2.27 9.258 9.258
1 1
where 𝑓𝑓1−𝛼𝛼, 𝜈𝜈1 , 𝜈𝜈2 = 𝑓𝑓0.975, 24, 24 = = and 𝑓𝑓𝛼𝛼, 𝜈𝜈1, 𝜈𝜈2 = 𝑓𝑓0.025, 24, 24 = 2.27
2 𝑓𝑓0.025, 24, 24 2.27 2

27
Solution 21
We have to look at the weight loss, and calculate its mean and standard deviation:
standard diet only moderate diet plus exercise
weight weight weight weight weight weight
at start after 10 weeks loss at start after 10 weeks loss
170 170 0 177 167 10
192 186 6 166 155 11
206 201 5 209 189 20
166 166 0 193 188 5
153 150 3 198 181 17
188 172 16 152 144 8
weight loss: 𝑛𝑛1 = 6, 𝑥𝑥̅1 = 5, 𝑠𝑠1 = 5.9330 weight loss: 𝑛𝑛2 = 6, 𝑥𝑥̅2 = 11.8333, 𝑠𝑠2 = 5.6362

We are going to test the equality of the population variances.


PRE-TEST ABOUT THE POPULATION VARIANCES
Conditions and assumptions
• independent random samples
• available: quantitative data
• Required: minimally quantitative level
• populations are normally distributed

Hypotheses
𝐻𝐻0 ∶ 𝜎𝜎12 = 𝜎𝜎22 versus 𝐻𝐻1 ∶ 𝜎𝜎12 ≠ 𝜎𝜎22
1 ∶ standard diet 2 ∶ moderate diet plus exercise
Test statistic and its distribution
𝑆𝑆12
𝐹𝐹 = ~ 𝐹𝐹[df𝑛𝑛𝑛𝑛𝑛𝑛 , df𝑑𝑑𝑑𝑑𝑑𝑑 ] where df𝑛𝑛𝑛𝑛𝑛𝑛 = 𝑛𝑛1 − 1 = 5 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 𝑛𝑛2 − 1 = 5
𝑆𝑆22
Rejection region
𝑈𝑈 𝐿𝐿 1
𝐹𝐹 ≥ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.025, 5, 5 = 7.15 or 𝐹𝐹 ≤ 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑓𝑓0.975, 5, 5 = = 7.15−1 = 0.14
𝑓𝑓0.025, 5, 5
Sample outcome
𝑠𝑠12 5.93302
𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = = = 1.11
𝑠𝑠22 5.63622
Confrontation and decision
𝐿𝐿 𝑈𝑈
𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑓𝑓𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is insufficient evidence to infer that the population
variances are different.
p-value
p-value = 2 ∙ 𝑃𝑃(𝐹𝐹 ≥ 𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = 1.11)
for df𝑛𝑛𝑛𝑛𝑛𝑛 = 5 and df𝑑𝑑𝑑𝑑𝑑𝑑 = 5, we find from three different 𝐹𝐹 tables:
𝑃𝑃(𝐹𝐹 ≥ 5.05) = 0.05 𝑃𝑃(𝐹𝐹 ≥ 7.15) = 0.025 𝑃𝑃(𝐹𝐹 ≥ 10.97) = 0.01
⟹ 𝑃𝑃(𝐹𝐹 ≥ 1.11) > 𝑃𝑃(𝐹𝐹 ≥ 5.05) = 0.05 ⟹ p-value = 2 ∙ 𝑃𝑃(𝐹𝐹 ≥ 𝑓𝑓𝑜𝑜𝑜𝑜𝑜𝑜 = 1.11) > 0.10

28
Week 1
Tutorial exercises
Question 1 (From the exam 30-10-2003)
You are asked to test the hypothesis that, within a certain business sector, male employees (defined as
group 1) on average paid more than female employees (group 2). A preliminary inspection of the data
reveals that the salaries of both populations of employees can be considered to be normally distributed.
Carry out a T-test assuming that the population variances are different. Use the following (partial) SPSS-
output, and 𝛼𝛼 = 0.05.
Group Statistics
Std. Error
group N Mean Std. Deviation Mean
GENDER 1.00 10 33.0000 5.9067 1.8679
2.00 10 26.0000 8.1786 2.5863

Independent Samples Test


Levene’s Test for
Equality of Variances t-test for Equality of Means

Mean Std. Error


F Sig. ……t…… df Sig. (2-tailed) Difference Difference
GENDER Equal variances
… … … 18 .042 7.0000 …
assumed
Equal variances
… 16.381 .043 7.0000 …
not assumed

Question 2 (Exam 2-2-2006, to be continued in week 2)


With the aim of taking better managerial decisions in mind, 11 companies offer their managers a ‘strategy
for the future’ course. To evaluate the effectiveness of this course, the performance of the participating
companies before and after the course has been determined. The following tables give information about
the performance before (BEFORE) and after (AFTER) the introduction of the course. The variable 𝑑𝑑 is
defined as: 𝑑𝑑 = AFTER − BEFORE
BEFORE 10.00 12.00 8.00 -5.00 -1.00 5.00 -3.00 16.00 -2.00 13.00 17.00
AFTER 12.00 16.00 -2.00 10.00 11.00 18.00 -8.00 20.00 -1.00 21.00 24.00

Descriptive Statistics

N Mean Std. Deviation Variance


after 11 11.0000 10.48809 110.000
before 11 6.3636 8.00341 64.055
d 11 4.6364 7.59306 57.655
Valid N (listwise) 11

a. Test using a T-test whether the performance is improved. Use a 1% significance level. Which
assumption did you make here?
b. Determine the 95% confidence interval for the average performance change.

29
Question 3
A company wants to acquire a new copy-machine and has a choice between two brands: SAVOX and XERIN.
In order to compare the clarity of the copies made by the machines, a test is performed, with scores on a
scale from 0 to 100.
Two random samples of 30 copies each are taken from each machine:
Group Statistics
group N Mean Std. Deviation
SAVOX 1 30 89.70 6.92
XERIN 2 30 87.97 6.50

We may assume that the scores are normally distributed for both machines.
a. Test whether the population variances may be assumed to be equal for both machines. (𝛼𝛼 = 0.05)
b. Test if there is any difference between the two brands with respect to their mean copy clarities
(𝛼𝛼 = 0.01).

30
Week 1
Multiple-choice questions
Question 1
Which statement about the p-value is correct?
a. The p-value is the probability that the null hypothesis is true
b. The p-value is the probability that a true null hypothesis is rejected
c. The p-value is determined by the significance level α
d. a, b, and c are all incorrect

Question 2
To determine a two-sided 95% confidence interval for the ratio of two population variances, 𝜎𝜎12 /𝜎𝜎22 , two
independent samples are taken with sizes 𝑛𝑛1 = 41 and 𝑛𝑛2 = 61, with sample variances equal to 515 and
920, respectively. The upper limit of the confidence interval is:
a. 0.9180
b. 0.8901
c. 0.9740
d. 1.0076

Question 3
From normally distributed populations, two independent samples were drawn with 𝑛𝑛1 = 15 and 𝑛𝑛2 =
12. In a test with 𝐻𝐻0 ∶ 𝜇𝜇1 − 𝜇𝜇2 = 0 versus 𝐻𝐻1 ∶ 𝜇𝜇1 − 𝜇𝜇2 ≠ 0 the observed value for the test statistic was
found to be equal to −1.672. The two population variances are unknown. Now, the p-value is:
a. less than 0.025
b. between 0.025 and 0.05
c. between 0.05 and 0.1
d. larger than 0.1

Question 4
It is certain that the difference of two sample means is normally distributed whenever:
a. the samples are drawn independently, and the underlying populations have known variances
b. the samples are drawn independently, and the underlying populations have equal variances
c. the samples are drawn independently, and the underlying populations are normally distributed
d. the underlying populations are normally distributed, and the sample sizes are large

31
Week 2
Homework exercises
One population (Statistics 1)
Exercise 1
A distributor of low-priced jewelry sells most of his product by mail order. In his newspaper and magazine
advertising, he offers a money-back guarantee if the customer is not satisfied with the purchase. The
distributor has calculated that if more than 15% of his customers return their purchases he will be in
financial trouble. In a random sample of 512 purchasers, it was found that 101 returned their purchases
and demanded their money back. Do these data indicate, with 𝛼𝛼 = 0.10, that the distributor is in financial
trouble?

Two populations (Statistics 2)


Exercise 2
Recently, the Canadian parliament debated the reinstatement of the death penalty. One of the factors in
this debate was the amount of public support for the death penalty. In 1989, a sample of 1500 Canadians
revealed that 70% favored the death penalty. In 1999, 61% in a sample of 1500 supported the death
penalty. Do these data provide sufficient evidence at the 1% significance level to indicate that support has
fallen between 1989 and 1999? Also calculate the p-value.

Exercise 3
Referring to Exercise 2, can we conclude with 𝛼𝛼 = 0.01 that support for the death penalty has fallen by
more than 5 percentage points?

Exercise 4
In Exercise 2, estimate the difference in public support for the reinstatement of the death penalty between
1989 and 1999 with 95% confidence.

Exercise 5
An oil exploration company is in the process of deciding in which of two large geographic regions it intends
to drill a series of exploratory wells. In the past two years, region 1 has produced 12 oil wells and 27 dry
holes. During the same period, region 2 has produced 19 oil wells and 32 dry holes. The company would
prefer to drill in region 1 because it costs less to explore that region. However, if it can be shown that
region 2 is more likely to produce a successful well, that region will be selected. With 𝛼𝛼 = 0.10, what
should the company do?

Exercise 6
A random group 1 of size 𝑛𝑛1 = 1000 from population 1 and a random group 2 of size 𝑛𝑛2 = 600 from
population 2 were asked a yes/no-question. The results are registered: Yes is coded as 2 and No is coded
as 1. Although these are actually nominal codes, we can trick the statistical software and let it do
calculations with the codes. We can let it calculate the mean of codes for each group, for example.
See the SPSS-output below.
a. Perform a complete hypothesis test (7 steps) using a significance level 𝛼𝛼 = 1% to determine
whether we can infer that the two population proportions of yes-answers differ.
b. Approximate the p-value.
c. Based on the SPSS-output shown above, manually recalculate the 99% confidence interval for 𝑝𝑝1 −
𝑝𝑝2 and give an interpretation.

32
SPSS-OUTPUT EXERCISE 6
Descriptives

group Statistic Std. Error


success 1.00 Mean 1.6990 .01451
95% Confidence Lower Bound 1.6705
Interval for Mean Upper Bound
1.7275

5% Trimmed Mean 1.7211


Median 2.0000
Variance .211
Std. Deviation .45892
Minimum 1.00
Maximum 2.00
Range 1.00
Interquartile Range 1.00
Skewness -.869 .077
Kurtosis -1.247 .155
2.00 Mean 1.7400 .01792
95% Confidence Lower Bound 1.7048
Interval for Mean Upper Bound
1.7752

5% Trimmed Mean 1.7667


Median 2.0000
Variance .193
Std. Deviation .43900
Minimum 1.00
Maximum 2.00
Range 1.00
Interquartile Range 1.00
Skewness -1.097 .100
Kurtosis -.799 .199

Exercise 7
Perform the Wilcoxon Rank Sum Test for independent samples to determine if there is sufficient evidence
to indicate that the two population locations differ. Use 𝛼𝛼 = 0.10.
sample 1 sample 2
15 17
25 10
19 13
16 10
12 13
8

Exercise 8
a. Test the following hypotheses using the Wilcoxon Rank Sum Test for independent samples.
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the left of the location of population 2
𝑛𝑛1 = 8, 𝑇𝑇1 = 50, 𝑛𝑛2 = 9, 𝑇𝑇2 = 103, 𝛼𝛼 = 0.025
b. Also, test similar hypotheses, but this time using 𝑇𝑇2 as test statistic (instead of 𝑇𝑇1 ).
Exercise 9
Repeat Exercise 9 of week 1: spark plugs. Assume that the data are not normally distributed. Also, calculate
the p-value.

33
Exercise 10
Using the Wilcoxon Rank Sum Test for independent samples, test with 𝛼𝛼 = 0.01 to determine if there is
sufficient evidence to indicate that the location of population 1 is different from that of population 2.
𝑛𝑛1 = 25, 𝑇𝑇1 = 550, 𝑛𝑛2 = 30, 𝑇𝑇2 = 990
Exercise 11
a. Using the Wilcoxon Rank Sum Test for independent samples, test with 𝛼𝛼 = 0.01 if there is
sufficient evidence for stating that the location of population 1 is to the right of population 2.
𝑛𝑛1 = 50, 𝑇𝑇1 = 3 190, 𝑛𝑛2 = 60, 𝑇𝑇2 = 2 915
b. Also, test very similar hypotheses, but now using 𝑇𝑇2 (instead of 𝑇𝑇1 ).

Exercise 12
Hotels are rated by a national tourist association. The ratings range from one star (lowest rating) to five
stars (highest rating). In recent years, the ratings have been criticized for not accurately representing the
overall quality of the hotels. In order to examine this issue, questionnaires were sent to frequent travelers,
who were asked to rate their last four- or five-star hotel on a seven-point scale where 1=Poor and
7=Excellent. The results are shown below. Do these data allow the tourist association to conclude at the
5% significance level that five-star hotels are perceived to be better than four-star hotels?
frequency of responses
ratings four-star hotels five-star hotels
1 0 0
2 0 0
3 1 0
4 2 2
5 7 8
6 10 17
7 15 20
Rank Sum 1414 1989

Exercise 13
Use the sign test to determine if there is enough evidence with 𝛼𝛼 = 0.05 to conclude that the two
population locations differ.
pair
1 2 3 4 5 6 7 8 9 10 11 12
A 8 5 5 6 6 4 6 3 5 4 4 7
B 9 6 7 5 8 7 9 6 4 7 6 5

Exercise 14
Test the hypotheses below using the sign test with 𝛼𝛼 = 0.01.
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the left of the location of population 2
Sample contains:
• Number of positive differences = 38
• Number of negative differences = 57
• Number of zero differences = 5

34
Exercise 15
A random sample of 20 people was asked to rate the clarity of two computer monitors on a 9-point scale
where 1=Poor and 9=Excellent. Do the data below support the belief that monitor 1 is perceived to be
clearer than monitor 2? Use 𝛼𝛼 = 0.05. Also calculate the p-value.
monitor monitor
respondent 1 2 respondent 1 2
1 8 7 11 8 6
2 4 5 12 8 7
3 3 5 13 6 7
4 6 4 14 7 5
5 9 8 15 4 5
6 7 3 16 5 4
7 8 5 17 5 4
8 4 3 18 7 6
9 6 5 19 6 4
10 5 4 20 7 2

Exercise 16
Perform the Wilcoxon Signed Rank Sum Test for the matched pairs experiment to determine if there is
sufficient evidence to indicate that the two population locations differ. Use 𝛼𝛼 = 0.05.
pair 1 2
1 20 22
2 17 25
3 14 13
4 18 23
5 16 20
6 14 19
7 10 12

Exercise 17
a. Test the following hypotheses using the Wilcoxon Signed Rank Sum Test for the matched pairs
experiment:
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the right of the location of population 2
𝑛𝑛 = 30, 𝛼𝛼 = 0.05, 𝑇𝑇 + = 315, 𝑇𝑇 − = 150
Finally, estimate or determine the p-value.
b. Also, test the same hypotheses, but now using 𝑇𝑇 − as test statistic (instead of 𝑇𝑇 + ).

Exercise 18
Repeat Exercise 14 of week 1: after-tax profits. Assume that the data are not normally distributed.

35
Exercise 19
Do children feel less pain than adults? That question was addressed by nursing professors at the University
of Alberta and Saskatchewan (reported in the Toronto Star, 14 June 1991). Suppose that in a preliminary
study, 23 eight-years-old children and their mothers were subjected to moderately painful pressure on
their hands. Each was asked to rate the level of pain as 1=Weak, 2=Moderate, 3=Severe, or 4=Very
severe. The data are stored in a file using these level of pain codes. In the data file, there are three
columns: first for family name; second for the responses of the mothers; third for the responses from their
children.
In 3 cases, there was no difference in responses. In 15 cases, mothers felt more pain, and in 5 cases
mothers felt less pain than their children. Can we conclude at the 5% significance level that mothers feel
more pain than their children?
a. Answer the question by performing a complete hypothesis test (7 steps) using the binomial
distribution. Determine both the rejection region as well as the p-value.
b. Answer the same question by performing a complete hypothesis test (7 steps) now using the
normal approximation. Again, determine the rejection region and the p-value.

36
Week 2
Homework solutions
One population (Statistics 1)
Solution 1
Conditions and assumptions
• Random sample
• Available: nominal data (return jewelry yes / no)
• Required: minimally nominal level
• 𝑛𝑛 ∙ 𝑝𝑝 = 512 ∙ 0.15 = 76.8 ≥ 5, 𝑛𝑛(1 − 𝑝𝑝) = 512 ∙ 0.85 = 435.2 ≥ 5
(so the sample proportion is approximately normally distributed – we can use 𝑍𝑍)
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝 = 0.15 versus 𝐻𝐻1 ∶ 𝑝𝑝 > 0.15
Test statistic and its distribution
𝑃𝑃� − 𝑝𝑝
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
� 𝑝𝑝(1 − 𝑝𝑝)
𝑛𝑛
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.10 = 1.28
Sample outcome
𝑥𝑥 101 0.197 − 0.15
𝑝𝑝̂ = = = 0.197 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 3.00
𝑛𝑛 512
�0.15(1 − 0.15)
512
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given significance level of 10%, there is sufficient evidence to indicate that the distributor is in
financial trouble.

One population (Statistics 2)


Solution 2
Conditions and assumptions
• Independent random samples
• Available: nominal data (for or against death penalty)
• Required: minimally nominal level
• 𝑛𝑛1 𝑝𝑝̂1 = 1500 ∙ 0.70 ≥ 5, 𝑛𝑛1 (1 − 𝑝𝑝̂1 ) = 1500 ∙ 0.30 ≥ 5,
𝑛𝑛2 𝑝𝑝̂ 2 = 1500 ∙ 0.61 ≥ 5, 𝑛𝑛2 (1 − 𝑝𝑝̂2 ) = 1500 ∙ 0.39 ≥ 5
(so the differences in sample proportions are approximately normally distributed)
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 ≤ 𝑝𝑝2 versus 𝐻𝐻1 ∶ 𝑝𝑝1 > 𝑝𝑝2 We may use 𝐻𝐻0 ∶ 𝑝𝑝1 ≤ 𝑝𝑝2 or 𝐻𝐻0 ∶ 𝑝𝑝1 = 𝑝𝑝2
𝑝𝑝1 ∶ fraction in 1989 𝑝𝑝2 ∶ fraction in 1999

37
Test statistic and its distribution
𝑃𝑃�1 − 𝑃𝑃�2 𝑛𝑛1 𝑃𝑃�1 + 𝑛𝑛2 𝑃𝑃�2
𝑍𝑍 = ~ 𝑁𝑁(0, 1) where 𝑃𝑃� =
1 1 𝑛𝑛1 + 𝑛𝑛2
�𝑃𝑃��1 − 𝑃𝑃�� � + �
𝑛𝑛 1𝑛𝑛 2

Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.01 = 2.33
Sample outcome
1500 ∙ 0.70 + 1500 ∙ 0.61
𝑝𝑝̂1 = 0.70, 𝑝𝑝̂2 = 0.61, 𝑛𝑛1 = 1500, 𝑛𝑛2 = 1500 ⟹ 𝑝𝑝̂ = = 0.655
1500 + 1500
0.70 − 0.61
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 5.18
�0.655(1 − 0.655) � 1 + 1 �
1500 1500
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 1%, there is sufficient evidence to infer that that the support for the
death penalty has fallen between 1989 and 1999.
p-value
p-value = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 5.18) ≈ 0

Solution 3
Conditions and assumptions (same as in Solution 2)
• Independent random samples
• Available: nominal data (for or against death penalty)
• Required nominal data
• 𝑛𝑛1 𝑝𝑝̂1 = 1500 ∙ 0.70 ≥ 5, 𝑛𝑛1 (1 − 𝑝𝑝̂1 ) = 1500 ∙ 0.30 ≥ 5,
𝑛𝑛2 𝑝𝑝̂ 2 = 1500 ∙ 0.61 ≥ 5, 𝑛𝑛2 (1 − 𝑝𝑝̂2 ) = 1500 ∙ 0.39 ≥ 5
(so the differences in sample proportions are approximately normally distributed)
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 − 𝑝𝑝2 = 0.05 versus 𝐻𝐻1 ∶ 𝑝𝑝1 − 𝑝𝑝2 > 0.05 𝑝𝑝2 − 𝑝𝑝1 < −0.05 ⟹ 𝑝𝑝1 − 𝑝𝑝2 > 0.05
Test statistic and its distribution
�𝑃𝑃�1 − 𝑃𝑃�2 � − (𝑝𝑝1 − 𝑝𝑝2 )
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
𝑃𝑃� − 𝑃𝑃�1 � 𝑃𝑃�2 �1 − 𝑃𝑃�2 �
� 1 �1 +
𝑛𝑛1 𝑛𝑛2

Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.01 = 2.33
Sample outcome
(0.70 − 0.61) − 0.05
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 2.31
�0.70(1 − 0.70) + 0.61(1 − 0.61)
1500 1500
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 1%, there is not enough evidence to conclude that support has fallen
by more than 5 percentage points.

Solution 4
95% confidence interval

𝑝𝑝̂1 (1 − 𝑝𝑝̂1 ) 𝑝𝑝̂2 (1 − 𝑝𝑝̂2 )


𝑝𝑝1 − 𝑝𝑝2 = 𝑝𝑝̂1 − 𝑝𝑝̂ 2 ± 𝑧𝑧𝛼𝛼 ∙ � +
2 𝑛𝑛1 𝑛𝑛2

0.70(1 − 0.70) 0.61(1 − 0.61)


= 0.70 − 0.61 ± 1.96 ∙ � + = 0.09 ± 0.034
1500 1500
where 𝑧𝑧𝛼𝛼 = 𝑧𝑧0.025 = 1.96
2

With 95% confidence, the difference between the two proportions lies between 0.056 and 0.124.

Solution 5
Conditions and assumptions
• Independent random samples
• Available: nominal data
• Required: minimally nominal data
• 𝑛𝑛1 𝑝𝑝̂1 = 𝑥𝑥1 = 12 ≥ 5, 𝑛𝑛1 (1 − 𝑝𝑝̂1 ) = 𝑛𝑛1 − 𝑥𝑥1 = 27 ≥ 5,
𝑛𝑛2 𝑝𝑝̂ 2 = 𝑥𝑥2 = 19 ≥ 5, 𝑛𝑛2 (1 − 𝑝𝑝̂ 2 ) = 𝑛𝑛2 − 𝑥𝑥2 = 32 ≥ 5
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 − 𝑝𝑝2 = 0 versus 𝐻𝐻1 ∶ 𝑝𝑝1 − 𝑝𝑝2 < 0 We want to know whether 𝑝𝑝2 > 𝑝𝑝1
So we test whether 𝑝𝑝1 − 𝑝𝑝2 < 0
𝑝𝑝1 ∶ percentage of successful wells in region 1

Test statistic and its distribution


𝑃𝑃�1 − 𝑃𝑃�2 𝑛𝑛1 𝑃𝑃�1 + 𝑛𝑛2 𝑃𝑃�2
𝑍𝑍 = ~ 𝑁𝑁(0, 1) where 𝑃𝑃� =
1 1 𝑛𝑛1 + 𝑛𝑛2
�𝑃𝑃��1 − 𝑃𝑃�� � + �
𝑛𝑛1 𝑛𝑛 2

Rejection region
𝑍𝑍 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.10 = −1.28
Sample outcome
𝑥𝑥1 12 𝑥𝑥2 19 𝑥𝑥1 + 𝑥𝑥2
𝑝𝑝̂1 = = = 0.3077, 𝑝𝑝̂2 = = = 0.3725, 𝑝𝑝̂ = = 0.3444 ⟹
𝑛𝑛1 12 + 27 𝑛𝑛2 19 + 32 𝑛𝑛1 + 𝑛𝑛2
0.3077 − 0.3725
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −0.64
�0.3444(1 − 0.3444) � 1 + 1 �
39 51
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 > 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
With significance level of 10%, there is sufficient evidence that the company should drill in region 1.

39
Solution 6
a.
Conditions and assumptions
• Independent random samples
• Available: nominal data
• Required: minimally nominal data
• 𝑛𝑛1 𝑝𝑝̂1 = 699 ≥ 5, 𝑛𝑛1 (1 − 𝑝𝑝̂1 ) = 301 ≥ 5, These numbers are derived from the SPSS-
𝑛𝑛2 𝑝𝑝̂ 2 = 444 ≥ 5, 𝑛𝑛2 (1 − 𝑝𝑝̂ 2 ) = 156 ≥ 5 output. See “Sample outcome” below.

Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 = 𝑝𝑝2 versus 𝐻𝐻1 ∶ 𝑝𝑝1 ≠ 𝑝𝑝2
Test statistic and its distribution
𝑃𝑃�1 − 𝑃𝑃�2 𝑛𝑛1 𝑃𝑃�1 + 𝑛𝑛2 𝑃𝑃�2
𝑍𝑍 = ~ 𝑁𝑁(0, 1) where 𝑃𝑃� =
1 1 𝑛𝑛1 + 𝑛𝑛2
�𝑃𝑃��1 − 𝑃𝑃�� � + �
𝑛𝑛 𝑛𝑛 1 2

Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.005 = 2.575 or 𝑍𝑍 ≤ −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −2.575
Sample outcome
Note that the coding is 1=No, 2=Yes. (Usually, we would use coding 0=Failure, 1=Success, so that
the sum of the sample codes is automatically the total number of successes, and the sample mean
of codes is automatically the sample proportion of successes). The observed mean value in the first
sample is 1.699, according to the SPSS-output. Since the codes are +1 higher than usual, this means
that a proportion of 0.699 of all observations in the first sample are yes answers. Similarly, the
second sample has a yes proportion of 0.740, according to the SPSS-output. The pooled proportion:
1000 ∙ 0.699 + 600 ∙ 0.740 0.699 − 0.740
𝑝𝑝̂ = = 0.7144 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −1.76
1000 + 600
�0.7144(1 − 0.7144) � 1 + 1 �
1000 600
Confrontation and decision
−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 1%, there is insufficient evidence to infer that the proportions of yes-
answers in the populations are different.
b.
p-value
p-value = 2 ∙ 𝑃𝑃(𝑍𝑍 ≤ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −1.76) = 2 ∙ �1 − 𝑃𝑃(𝑍𝑍 ≤ 1.76)� = 2 ∙ 0.0392 = 0.0784
c.
99%-confidence interval

𝑝𝑝̂1 (1 − 𝑝𝑝̂1 ) 𝑝𝑝̂ 2 (1 − 𝑝𝑝̂ 2 )


𝑝𝑝1 − 𝑝𝑝2 = 𝑝𝑝̂1 − 𝑝𝑝̂ 2 ± 𝑧𝑧𝛼𝛼 ∙ � +
2 𝑛𝑛1 𝑛𝑛2

0.699(1 − 0.699) 0.740(1 − 0.740)


= 0.699 − 0.740 ± 2.575 ∙ � + = −0.0410 ± 0.0593
1000 600
where 𝑧𝑧𝛼𝛼 = z0.005 = 2.575
2

With 99% confidence, the difference of the two proportions is between −0.100 and 0.018. This is
compatible with the conclusion of part a.

40
Solution 7
Conditions and assumptions
• Wilcoxon Rank Sum Test (as required by the exercise)
• Independent random samples
• Available: quantitative data
• Required: minimally ordinal level
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is different from the location of population 2
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇1 (Wilcoxon Rank Sum of sample 1)
Rejection region
𝐿𝐿 𝑈𝑈
𝛼𝛼 = 0.10 (two sided), 𝑛𝑛1 = 5, 𝑛𝑛2 = 6 ⟹ 𝑇𝑇 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 20 or 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 40
Sample outcome
sample 1 rank sample 2 rank
15 7 17 9.0
25 11 10 2.5
19 10 13 5.5
16 8 10 2.5
12 4 13 5.5
𝑇𝑇1 = 40 8 1.0
𝑇𝑇2 = 26
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 𝑇𝑇1 = 40
Confrontation and decision
𝑈𝑈
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
At significance level of 10%, there is sufficient evidence to indicate that the two population
locations differ.

Solution 8
a.
Conditions and assumptions
• Wilcoxon Rank Sum Test (as required by the exercise)
• Independent random samples
• Required: minimally ordinal level
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the left of the location of population 2
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇1 (Wilcoxon Rank Sum)
Rejection region
𝐿𝐿
𝛼𝛼 = 0.025 (left sided), 𝑛𝑛1 = 8, 𝑛𝑛2 = 9 ⟹ 𝑇𝑇 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 51
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 50

41
Confrontation and decision
𝐿𝐿
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
At significance level of 2.5%, there is sufficient evidence to indicate that population 1 is located to
the left of population 2.
b.
The roles of 1 and 2 are switched now. Blue indicates what has changed, compared to part a.
Conditions and assumptions
• Wilcoxon Rank Sum Test (as required by the exercise)
• Independent random samples
• Required: minimally ordinal level
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 2 is to the right of the location of population 1
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇2 (Wilcoxon Rank Sum)
Rejection region
𝛼𝛼 = 0.025 (right sided), 𝑛𝑛1 = 8, 𝑛𝑛2 = 9
𝐿𝐿
(but 1 and 2 switched roles, so the 𝑛𝑛𝑖𝑖 in the table: 𝑛𝑛1 = 9, 𝑛𝑛2 = 8) ⟹ 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 102
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 103
Confrontation and decision
𝐿𝐿
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
At significance level of 2.5%, there is sufficient evidence to indicate that population 2 is located to
the right of population 1. (the same conclusion as in part a.)

Solution 9
Conditions and assumptions
• Independent random samples
• Available: quantitative data
• Required: minimally ordinal level
• populations are non-normally distributed but have the same shape
• samples are small: 𝑛𝑛1 < 30 and 𝑛𝑛2 < 30 (so we cannot use a T-test for two means)
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 (experimental) is to the right of
the location of population 2 (conventional)
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇1 (Wilcoxon Rank Sum)
Rejection region
𝑈𝑈
𝛼𝛼 = 0.05 (right sided), 𝑛𝑛1 = 4, 𝑛𝑛2 = 4 ⟹ 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 25

42
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 2 + 6 + 8 + 3 = 19
experimental conventional
rank rank
spark plug spark plug
23 2 25 4
28 6 29 7
36 8 26 5
24 3 20 1
𝑇𝑇1 = 19 𝑇𝑇1 = 17
Confrontation and decision
𝑈𝑈
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is not sufficient evidence to infer that the experimental
spark plug is effective in increasing gas mileage.
p-value
Table: p-value = 𝑃𝑃(𝑇𝑇 ≥ 19) > 0.05 ⟹ 𝐻𝐻0 is not rejected.

Solution 10
Conditions and assumptions
• Wilcoxon Rank Sum Test (required by the exercise)
• Independent random samples
• Required: minimally ordinal level
• Since both 𝑛𝑛1 > 10 and 𝑛𝑛2 > 10, we can use the normal approximation here: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is different from the location of population 2
Test statistic and its distribution
𝑛𝑛 (𝑛𝑛 + 𝑛𝑛2 + 1)
𝑇𝑇 − 1 1
𝑍𝑍 = 2 ~ 𝑁𝑁(0, 1) where 𝑇𝑇 = 𝑇𝑇1 (Wilcoxon rank sum)
� 𝑛𝑛1 𝑛𝑛2 (𝑛𝑛1 + 𝑛𝑛 2 + 1)
12
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.005 = 2.575 or 𝑍𝑍 ≤ −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −2.575
Sample outcome
25 ∙ (25 + 30 + 1)
550 − 2 550 − 700
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = = −2.54
25 ∙ 30 ∙ (25 + 30 + 1) √3500

12
Confrontation and decision
−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0

43
Solution 11
a.
Conditions and assumptions
• Wilcoxon Rank Sum Test (required by the exercise)
• Independent random samples
• Required: minimally ordinal level
• Since both 𝑛𝑛1 = 50 > 10 and 𝑛𝑛2 = 60 > 10, we can use the normal approximation here: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the right of the location of population 2
Test statistic and its distribution
𝑛𝑛 (𝑛𝑛 + 𝑛𝑛2 + 1)
𝑇𝑇1 − 1 1
𝑍𝑍 = 2 ~ 𝑁𝑁(0, 1) for 𝑇𝑇1 (Wilcoxon rank sum)
� 𝑛𝑛1 𝑛𝑛2 (𝑛𝑛1 + 𝑛𝑛 2 + 1)
12
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.01 = 2.33
Sample outcome
50 ∙ (50 + 60 + 1)
3190 − 3190 − 2775
𝑇𝑇1 𝑜𝑜𝑜𝑜𝑜𝑜 = 3190 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 2 = = 2.49
50 ∙ 60 ∙ (50 + 60 + 1) √27 750

12
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
b.
The roles of 1 and 2 are switched now. Blue indicates what has changed, compared to part a.
Conditions and assumptions
• Wilcoxon Rank Sum Test (required by the exercise)
• Independent random samples
• Required: minimally ordinal level
• Since both 𝑛𝑛1 = 50 > 10 and 𝑛𝑛2 = 60 > 10, we can use the normal approximation here: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 2 is to the left of the location of population 1
Test statistic (swap indices 1 and 2 in the formula, so that it is based on 𝑇𝑇2 instead of 𝑇𝑇1 )
𝑛𝑛 (𝑛𝑛 + 𝑛𝑛1 + 1)
𝑇𝑇2 − 2 2
𝑍𝑍 = 2 ~ 𝑁𝑁(0, 1) for 𝑇𝑇2 (Wilcoxon rank sum)
� 𝑛𝑛 2 𝑛𝑛1 (𝑛𝑛2 + 𝑛𝑛1 + 1)
12
Rejection region
𝑍𝑍 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.01 = −2.33
Sample outcome
60 ∙ (60 + 50 + 1)
2915 − 2915 − 3330
𝑇𝑇2 𝑜𝑜𝑜𝑜𝑜𝑜 = 2915 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 2 = = −2.49
60 ∙ 50 ∙ (60 + 50 + 1) √27 750

12

44
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0 (which leads to the same conclusion as in part a.)

Solution 12
Conditions and assumptions
• Independent random samples
• Available: ordinal data
• Required: minimally ordinal data
• Since both 𝑛𝑛1 = 35 > 10 and 𝑛𝑛2 = 47 > 10, we can use the normal approximation here.
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 (four star hotels) is to the left of
the location of population 2 (five star hotels)
Test statistic and its distribution
𝑛𝑛 (𝑛𝑛 + 𝑛𝑛2 + 1)
𝑇𝑇1 − 1 1
𝑍𝑍 = 2 ~ 𝑁𝑁(0, 1) for 𝑇𝑇1 (Wilcoxon rank sum)
�𝑛𝑛1 𝑛𝑛2 (𝑛𝑛1 + 𝑛𝑛2 + 1)
12
Rejection region
𝑍𝑍 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.05 = −1.645
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 1414 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = −0.36
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 > 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
With significance level of 5%, there is not enough evidence to conclude that five-star hotels are
perceived to be better than four-star hotels.

Solution 13
Conditions and assumptions
• Sign test (required by the exercise)
• Random sample of matched pairs
• Available: ordinal or quantitative data
• Required: minimally ordinal data
• Since 𝑛𝑛 > 10, we can use the normal approximation here: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same ⟹ 𝑝𝑝+ = 0.50
𝐻𝐻1 ∶ The location of population A is different from the location of population B ⟹ 𝑝𝑝+ ≠ 0.50
Test statistic and its distribution
𝑋𝑋+𝑐𝑐𝑐𝑐 − 0.5𝑛𝑛
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
0.5√𝑛𝑛
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.025 = 1.96 or 𝑍𝑍 ≤ −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −1.96

45
Sample outcome
pair
1 2 3 4 5 6 7 8 9 10 11 12
A 8 5 5 6 6 4 6 3 5 4 4 7
B 9 6 7 5 8 7 9 6 4 7 6 5
A–B – – – + – – – – + – – +
1 3 + 0.5 − 0.5 ∙ 12
𝑥𝑥+ = 3 < 2𝑛𝑛 = 6 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −1.44
0.5√12
Confrontation and decision
−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
With significance level of 2.5%, there is not enough evidence to conclude that the population
locations differ.

Solution 14
Conditions and assumptions
• Sign test (required by the exercise)
• Random sample of matched pairs
• Available: ordinal or quantitative data
• Required: minimally ordinal data
• Since 𝑛𝑛 = 38 + 57 = 95 > 10, we can use the normal approximation here: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same ⟹ 𝑝𝑝+ = 0.50
𝐻𝐻1 ∶ The location of population 1 is to the left of the location of population 2 ⟹ 𝑝𝑝+ < 0.50
Test statistic and its distribution
𝑋𝑋+𝑐𝑐𝑐𝑐 − 0.5𝑛𝑛
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
0.5√𝑛𝑛
Rejection region
𝑍𝑍 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.01 = −2.33
Sample outcome
38 + 0.5 − 0.5 ∙ 95
𝑥𝑥+ = 38 and H1 is left one sided ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −1.85
0.5√95
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 > 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0

Solution 15
Conditions and assumptions
• Random sample of matched pairs
• Available: ordinal data
• Required: minimally ordinal data
• 𝑛𝑛 = 20 > 10, so we can choose to use exact distribution of 𝑋𝑋+ or the normal approximation 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same (no difference in preference) ⟹ 𝑝𝑝+ = 0.50
𝐻𝐻1 ∶ Location of pop.1 (monitor 1) is to the right of location of pop.2 (monitor 2) ⟹ 𝑝𝑝+ > 0.50
+ : positive difference of 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 1 − 𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚𝑚 2

46
SIGN TEST: EXACT
Test statistic and its distribution
𝑋𝑋+ ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 20, 𝑝𝑝 = 0.50)
Rejection region
𝛼𝛼 = 0.05
Sample outcome
𝑥𝑥+ = 16
p-value
p-value = 𝑃𝑃(𝑋𝑋+ ≥ 𝑥𝑥+ = 16) = 1 − 𝑃𝑃(𝑋𝑋+ ≤ 15) = 0.006 using the Bin-table
Confrontation and decision
p-value ≤ 𝛼𝛼 = 0.05 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level, there is sufficient evidence to infer that monitor 1 is perceived to be
clearer.
SIGN TEST: NORMAL APPROXIMATION
Test statistic and its distribution
𝑋𝑋 𝑐𝑐𝑐𝑐 − 0.5𝑛𝑛
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
0.5√𝑛𝑛
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.05 = 1.645
Sample outcome
16 − 0.5 − 0.5 ∙ 20
𝑥𝑥+ = 16 and H1 is right one sided ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 2.46
0.5√20
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that monitor A is perceived to
be clearer.
p-value
p-value = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 2.46) = 0.0069 (≈ 0.006 = exact p-value)
p-value < 𝛼𝛼 = 0.05, therefore 𝐻𝐻0 is rejected. (same as before)

Solution 16
Conditions and assumptions
• Wilcoxon Signed Rank Sum Test (required by exercise)
• Random sample of matched pairs
• Available: quantitative data
• Required: minimally ordinal data
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is different from the location of population 2
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇+ (Wilcoxon signed Rank Sum)

47
Rejection region
𝛼𝛼 = 0.05 (two sided), 𝑛𝑛 = 7 ⟹ abs. ranks of
pair 1 2 diff. rank
𝐿𝐿 𝑈𝑈 diff. pos. diff.
𝑇𝑇 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 2 or 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 26
1 20 22 2 2 2.5 2.5
Sample outcome 2 17 25 8 8 7.0 7.0
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 27 3 14 13 -1 1 1.0
Confrontation and decision 4 18 23 5 5 5.5 5.5
𝑈𝑈 5 16 20 4 4 4.0 4.0
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
6 14 19 5 5 5.5 5.5
Conclusion 7 10 12 2 2 2.5 2.5
With significance level of 5%, there is 𝑇𝑇+ = 27
sufficient evidence to conclude that the
population locations differ.

Solution 17
a.
Conditions and assumptions
• Wilcoxon Signed Rank Sum Test (required by exercise)
• Random sample of matched pairs
• Available: quantitative data
• Required: minimally ordinal data
• (𝑛𝑛 = 30 ≥ 30, so we can choose to use the normal approximation 𝑍𝑍 instead of test statistic 𝑇𝑇+ )
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of population 1 is to the right of the location of population 2
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇+ (Wilcoxon signed Rank Sum)
Rejection region
𝑈𝑈
𝛼𝛼 = 0.05 (one sided), 𝑛𝑛 = 30 ⟹ 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 313
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 315
Confrontation and decision
𝑈𝑈
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that the location of
population 1 is to the right of population 2.
p-value
𝑈𝑈 𝑈𝑈
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ 𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 𝑃𝑃(𝑇𝑇+ ≥ 𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ) ≤ 𝑃𝑃�𝑇𝑇+ ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 � = 𝛼𝛼 = 0.05
OR USING THE NORMAL APPROXIMATION
Test statistic and its distribution
𝑛𝑛(𝑛𝑛 + 1)
𝑇𝑇+ −
𝑍𝑍 = 4 ~ 𝑁𝑁(0, 1) for 𝑇𝑇 = 𝑇𝑇+ (Wilcoxon signed rank sum)
� 𝑛𝑛(𝑛𝑛 + 1)(2𝑛𝑛 + 1)
24
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.05 = 1.645
Sample outcome
30(30 + 1)
315 − 4 315 − 232.5
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = = 1.697
30(30 + 1)(2 ∙ 30 + 1) √2363.25

24
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
p-value
𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ) = 1 − 𝑃𝑃(𝑍𝑍 < 1.67) = 1 − 0.9554 = 0.0446
b. Blue indicates what has changed, compared to part a.
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇− (Wilcoxon signed Rank Sum)
Rejection region
𝐿𝐿
𝛼𝛼 = 0.05 (one sided), 𝑛𝑛 = 30 ⟹ 𝑇𝑇 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 152
Sample outcome
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 150
Confrontation and decision
𝐿𝐿
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that the location of
population 2 is to the left of population 1.
p-value
𝐿𝐿 𝐿𝐿
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ 𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 𝑃𝑃(𝑇𝑇− ≤ 𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ) ≤ 𝑃𝑃�𝑇𝑇− ≤ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 � = 𝛼𝛼 = 0.05
OR USING THE NORMAL APPROXIMATION
Test statistic and its distribution
𝑛𝑛(𝑛𝑛 + 1)
𝑇𝑇− − 4
𝑍𝑍 = ~ 𝑁𝑁(0, 1) for 𝑇𝑇 = 𝑇𝑇− (Wilcoxon signed rank sum)
� 𝑛𝑛(𝑛𝑛 + 1)(2𝑛𝑛 + 1)
24
Rejection region
𝑍𝑍 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑧𝑧0.05 = −1.645
Sample outcome
30(30 + 1)
150 − 4 150 − 232.5
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = = −1.697
30(30 + 1)(2 ∙ 30 + 1) √2363.25

24
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≤ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
p-value
𝑝𝑝-𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣𝑣 = 𝑃𝑃(𝑍𝑍 ≤ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ) = 𝑃𝑃(𝑍𝑍 ≤ −1.67) = 1 − 𝑃𝑃(𝑍𝑍 < 1.67) = 1 − 0.9554 = 0.0446

49
Solution 18
Conditions and assumptions
• Random sample of matched pairs
• Available: quantitative data
• Not normally distributed, and 𝑛𝑛 < 30
• Required: minimally ordinal data by Wilcoxon Signed Rank Sum Test
Hypotheses
𝐻𝐻0 ∶ The two population locations are the same
𝐻𝐻1 ∶ The location of Method 1 is to the right of the location of Method 2
Test statistic and its distribution
𝑇𝑇 = 𝑇𝑇+ (Wilcoxon signed Rank Sum)
Rejection region
𝛼𝛼 = 0.05 (one sided), 𝑛𝑛 = 6 ranks of
method method abs.
company diff. rank pos.
𝑈𝑈
⟹ 𝑇𝑇 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 19 1 2 diff.
diff.
Sample outcome A 87 84 3 3 4.5 4.5
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 = 4.5 + 2.5 + 6 + 4.5 + 2.5 = 20 B 18 19 -1 1 1.0
C 66 64 2 2 2.5 2.5
Confrontation and decision
𝑈𝑈
D 112 105 7 7 6.0 6.0
𝑇𝑇𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑇𝑇𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0 E 77 74 3 3 4.5 4.5
F 27 25 2 2 2.5 2.5

Conclusion
Given the significance level of 5%, there is sufficient evidence to indicate that the adoption of
Method 2 results in a lower after-tax profit.

Solution 19
a.
Conditions and assumptions
• Random sample of matched pairs
• Available: ordinal data
• Required: minimally ordinal data by Sign Test
• 𝑛𝑛 = 20 ≥ 10 so we can choose from both the exact test and the normal approximation by 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ No difference in pain levels ⟹ 𝑝𝑝+ = 0.50
𝐻𝐻1 ∶ Higher pain levels for mother compared to child ⟹ 𝑝𝑝+ > 0.50
+ : positive difference of 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑚𝑚𝑚𝑚𝑚𝑚ℎ𝑒𝑒𝑒𝑒 − 𝑝𝑝𝑝𝑝𝑝𝑝𝑝𝑝 𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙𝑙 𝑐𝑐ℎ𝑖𝑖𝑖𝑖𝑖𝑖
Test statistic and its distribution
𝑋𝑋+ ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 20, 𝑝𝑝+ = 0.50)
Rejection region
𝛼𝛼 = 0.05 (we will compare it to the p-value)
or: For rejection region 𝑋𝑋+ ≥ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 , you should find the 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 such that 𝑃𝑃(𝑋𝑋+ ≥ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ) = 𝛼𝛼.
If you cannot find it, then find the smallest 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 such that 𝑃𝑃(𝑋𝑋+ ≥ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ) ≤ 𝛼𝛼 because we will
reject the null-hypothesis for p-value ≤ 𝛼𝛼.
We’ll be using the binomial table where the cumulative probabilities are given as 𝑃𝑃(𝑋𝑋 ≤ 𝑘𝑘) and
not as 𝑃𝑃(𝑋𝑋 ≥ 𝑘𝑘). So here: 𝑃𝑃(𝑋𝑋+ ≥ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ) ≤ 0.05 ⟹ 1 − 𝑃𝑃(𝑋𝑋+ ≤ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 1) ≤ 0.05 ⟹

50
𝑃𝑃(𝑋𝑋+ ≤ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 1) ≥ 0.95 ⟹ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 − 1 ≥ 14 ⟹ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ≥ 15 ⟹ 𝑅𝑅𝑅𝑅 ∶ 𝑋𝑋+ ≥ 𝑋𝑋𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 15
Sample outcome and p-value
𝑥𝑥+ = 15 ⟹ p-value = 𝑃𝑃(𝑋𝑋+ ≥ 𝑥𝑥+ = 15) = 1 − 𝑃𝑃(𝑋𝑋+ ≤ 14) = 1 − 0.979 = 0.021
Confrontation and decision
p-value ≤ 𝛼𝛼 = 0.05 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that mothers feel more pain
than their children.
b.
Conditions and assumptions
• (same as in part a.)
• + note that 𝑛𝑛 = 20 ≥ 10 so we can use the normal approximation: 𝑍𝑍
Test statistic and its distribution
𝑋𝑋+𝑐𝑐𝑐𝑐 − 0.5𝑛𝑛
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
0.5√𝑛𝑛
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.05 = 1.645
Sample outcome
15 − 0.5 − 0.5 ∙ 20
𝑥𝑥+ = 15 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 2.01
0.5√20
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
p-value
p-value = 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 2.01) = 0.0222 (≈ exact p-value in part a.)

51
Week 2
Tutorial exercises
Question 1 (Exam 2-2-2006, continuation from week 1)
With the aim of taking better managerial decisions in mind, 11 companies offer their managers a ‘strategy
for the future’ course. To evaluate the effectiveness of this course, the performance of the participating
companies before and after the course was determined. The following tables give information about the
performance before (BEFORE) and after (AFTER) the introduction of the course; the variable d is defined
as follows:
𝑑𝑑 = AFTER − BEFORE

Before 10.00 12.00 8.00 -5.00 -1.00 5.00 -3.00 16.00 -2.00 13.00 17.00
After 12.00 16.00 -2.00 10.00 11.00 18.00 -8.00 20.00 -1.00 21.00 24.00

Descriptive Statistics

N Mean Std. Deviation Variance


after 11 11.0000 10.48809 110.000
before 11 6.3636 8.00341 64.055
d 11 4.6364 7.59306 57.655
Valid N (listwise) 11

Last week we used the T-test to determine whether the course was effective. Assume now that it has been
shown that a T-test does not apply.
a. Use the Sign test to determine whether the course was effective, with α = 0.10.
b. For what range of values for α would you draw the same conclusion as in part c.?
c. Give some possible reasons as to why the T-test was not suitable in this case?

Question 2 (Exam 30-3-2007)


A mobile services provider discovered that car owners are more likely to be a client than those consumers
without cars, i.e. 35% of all car-owners, and 25% of the other consumers are client. The provider starts an
advertising campaign specifically directed at consumers without cars. After the campaign, a sample of 200
car owners showed that 36% are client, while within a sample of 150 non car owners, there were 52 clients.
Test, with 𝛼𝛼 = 5%, whether the difference in client percentages, between car owners and non-car
owners, has decreased.

Question 3 (Exam 21-6-2007)


A stock market analyst wants to test whether there are higher-than-usual returns on stocks following a
two-for-one split. A random sample of 10 stocks (labeled A to J) that recently were split is available. For
each stock, the analyst records the percentage return during the month preceding the split and the
percentage return for the month following the split. The data are:
stock
A B C D E F G H I J
before split (%) 0.5 -0.2 0.9 1.1 -0.7 1.5 2.0 1.3 1.6 2.1
after split (%) 1.1 0.3 1.2 1.9 -0.2 1.4 1.8 1.8 2.4 2.2
Is there evidence using a significance level of 5% that a stock split causes excess return for the month
following the split? Use the most appropriate test available without assuming that the returns are normally
distributed. You may use the following SPSS output.

52
Mann-Whitney Test
Ranks

Split N Mean Rank Sum of Ranks


Return Before split 10 9.20 92.00
After split 10 11.80 118.00
Total 20

Sign Test
Frequencies

N
After_Split - Before_Split Negative Differences a 2
Positive Differences b 8
Ties c 0
Total 10
a. After_Split < Before_Split
b. After_Split > Before_Split
c. After_Split = Before_Split

Wilcoxon Signed Ranks Test


Ranks

N Mean Rank Sum of Ranks


After_Split - Before_Split Negative Ranks 2a 2.25 4.50
Positive Ranks 8b 6.31 50.50
Ties 0c
Total 10
a. After_Split < Before_Split
b. After_Split > Before_Split
c. After_Split = Before_Split

Question 4 (Exam 2-11-2006)


An airline company has the impression that the number of no-shows at flights from Paris has recently
increased, while this does not seem to be the case for flights from Amsterdam. To investigate this matter,
the no-shows for nine randomly selected flights from Paris and for eight randomly selected flights from
Amsterdam was determined. The numbers are as follows:
Paris 10 11 11 15 18 20 22 24 25

Amsterdam 8 9 10 13 14 16 17 21

a. Test for 𝛼𝛼 = 5% whether the number of no-shows at flights from Paris is higher than from
Amsterdam without assuming that the number of no-shows is normally distributed.

53
Week 2
Multiple-choice questions
Question 1
When applying a Wilcoxon Signed Rank Sum Test, the sum of all the rank numbers (both for the positive
and the negative differences) is equal to 55. Assume that no ‘zero’-differences were present in the sample.
The sample size is equal to:
a. 55
b. 10
c. 27½
d. Cannot be determined from this information

Question 2
In a sample of 8 patients, the systolic blood pressure (in mm Hg) has been recorded twice, first at the start
of a visit to a doctor, and again at the end of the visit. The blood pressures (at the start and at the end) may
both be assumed to be normally distributed, but nothing is known about the distribution of the differences
(‘start’ compared to ‘end’).
patient
1 2 3 4 5 6 7 8
start 145 131 178 156 162 143 170 126
end 140 126 128 151 121 140 134 124
Which of the following hypothesis tests is the most appropriate to investigate whether the systolic blood
pressure is in general lower at the end of the doctor’s visit (as compared to the start)?
a. The Wilcoxon Signed Rank Sum Test
b. The Paired Samples T-test
c. The sign test for paired observations
d. The Independent Samples T-test

Question 3
The mean body temperature is 37 °C. The body temperatures of a sample of 16 men are measured,
immediately after an intensive swimming training session in cold water:
37 36 35 37 37 36 38 35 36 37
38 37 37 36 37 37
A researcher uses a sign test to determine whether the median body temperature after the training session
is below 37° C. Choose the correct distribution for the relevant test statistic, with the correct outcome.
a. 𝑋𝑋 ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 16, 𝑝𝑝 = 0.5), 𝑥𝑥 = 6
b. 𝑋𝑋 ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 16, 𝑝𝑝 = 0.5), 𝑥𝑥 = 2
c. 𝑋𝑋 ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 8, 𝑝𝑝 = 0.25), 𝑥𝑥 = 2
d. 𝑋𝑋 ~ 𝐵𝐵𝐵𝐵𝐵𝐵(𝑛𝑛 = 8, 𝑝𝑝 = 0.5), 𝑥𝑥 = 2

Question 4
The observed z-score for a hypothesis test with 𝐻𝐻0 ∶ 𝑝𝑝1 − 𝑝𝑝2 = 0 versus 𝐻𝐻1 ∶ 𝑝𝑝1 − 𝑝𝑝2 < 0 is equal to
−2.15. The p-value for this test is:
a. 0.0158
b. 0.0316
c. 0.9842
d. 0.9684

54
Week 3
Homework exercises
Exercise 1
Suppose that we want to test the following hypotheses.
𝐻𝐻0 ∶ 𝑝𝑝1 = 0.2, 𝑝𝑝2 = 0.3, 𝑝𝑝3 = 0.5 versus
𝐻𝐻1 ∶ at least one 𝑝𝑝𝑖𝑖 is not equal to its specified value
The observed frequencies are 𝑓𝑓1 = 20; 𝑓𝑓2 = 30; 𝑓𝑓3 = 50.
Without calculating the value of the test statistic, determine whether the data support the null or the
alternative hypotheses.

Exercise 2
Repeat Exercise 1 when the observed values are 𝑓𝑓1 = 60, 𝑓𝑓2 = 10, 𝑓𝑓3 = 30.

Exercise 3
Calculate the values of the test statistics in Exercises 1 and 2 to confirm your answers.

Exercise 4
The records of an investment banking firm show that, historically, 60% of the clients were primarily
interested in the stock market and 40% in the bond market. A recent sample of 200 clients showed that 132
were primarily interested in stocks and 68 in bonds.
Is there sufficient evidence to conclude, at the 1% level of significance, that there has been a shift in the
primary interest of clients? Use a Z-test by defining: 𝑝𝑝 = proportion of clients primarily interested in bonds
or futures.

Exercise 5
A certain town has only three gasoline stations (A, B, and C). When the three stations were all self-serve,
their shares of the market were equal. But station A converted to full service two months ago in an attempt
to improve its market share. A recent survey of 180 residents found that 76 now patronize station A, 54
patronize station B, and 50 patronize station C. Is there reason to believe that the stations’ market shares
have changed since the conversion of station A? Use 𝛼𝛼 = 0.05.

Exercise 6
License records in a county reveal that 15% of cars are subcompacts (1), 25% are compacts (2), 40% are
midsize, and the rest are an assortment of other styles and models (4). A random sample of accidents
involving cars licensed in the county which were involved in accidents was drawn. The observed
frequencies of cars in each size-category were as follows; 36 (1), 58 (2), 74 (3) and 29 (4).
Can we infer at the 5% significance level that the distribution of cars involved in accidents deviates from the
distribution of cars in general?
a. Do a complete hypothesis test.
b. Determine an interval for the p-value.

55
Exercise 7
We tested the hypotheses 𝐻𝐻0 ∶ The two classifications are independent versus 𝐻𝐻1 ∶
The two classifications are dependent and created the following contingency table.
1 2 3 total
1 50 30 20 100
2 100 60 40 200
total 150 90 60
Without calculating the value of the test statistic, determine whether the data support the null or the
alternative hypothesis.

Exercise 8
Repeat Exercise 7 given the following contingency table.
1 2 3 total
1 40 20 40 100
2 50 100 50 200
total 90 120 90

Exercise 9
Calculate the values of the 𝜒𝜒 2 -statistic in Exercises 7 and 8 to check your answers.

Exercise 10
New drugs are usually tested by giving a randomly selected group of people the drug and another randomly
selected group of people a placebo. Each person is then asked whether he or she suffered serious side
effects. Suppose that for a new drug used to treat migraine headaches the following table was created.
serious side effects
suffered did not suffer
New Drug 41 165
medication
Placebo 28 161
Use the 𝜒𝜒 2 -test for a contingency table to determine if we conclude at the 10% significance level that
differences exist between the new drug and the placebo in terms of reported side effects.

Exercise 11
Repeat Exercise 10 using the Z-test for 𝑝𝑝1 − 𝑝𝑝2 .

Exercise 12
Suppose that in Exercise 10 we recorded the exact nature of the side effect and produced the table below.
Can we conclude at the 10% significance level that differences exist between the new drug and the
placebo?
serious side effects
medication nausea drowsiness did not suffer
new drug 32 9 165
placebo 8 20 161

56
Exercise 13
The operation manager of a company that manufactures shirts wants to determine whether there are
differences in the quality of workmanship among the three daily shifts. She randomly selects 600 recently
made shirts and carefully inspects them. Each shirt is classified as either perfect or flawed, and the shift
that produced it is also recorded. The accompanying table summarizes the number of shirts that fell into
each cell. Do these data provide sufficient evidence at the 5% significance level to infer that there are
differences in quality among the three shifts?
shift
shirt 1 2 3
Perfect 240 191 139
Flawed 10 9 11

a. Calculate the ‘expected values.


b. Carry out a complete hypothesis test.
c. Give an interval for the p-value.

Exercise 14
An analysis is carried out on a set of 50 observations of both 𝑋𝑋 and 𝑌𝑌. Each observation of 𝑋𝑋 is paired with
a simultaneous observation of 𝑌𝑌: first (𝑥𝑥1 , 𝑦𝑦1 ), then (𝑥𝑥2 , 𝑦𝑦2 ), etc. The sample correlation coefficient is
𝑟𝑟 = 0.369. Investigate using a T-test and significance level 𝛼𝛼 = 0.01 whether there is any significant
correlation between 𝑋𝑋 and 𝑌𝑌.

Exercise 15
The owner of the coffee stands in a football stadium would like to predict the number of cups of coffee sold
during each game. He believes that the most important variable is the outside temperature at game time.
To investigate the relationship, he recorded the number of cups of coffee sold and the temperature during
nine randomly selected games. These data are shown below:
𝑥𝑥 𝑦𝑦
game
temperature ( F) number of cups of coffee sold (×100)
o

1 53 50
2 50 47
3 75 43
4 48 58
5 45 57
6 63 44
7 40 64
8 55 48
9 30 71
2 2
a. Calculate the sample variances 𝑠𝑠𝑥𝑥 and 𝑠𝑠𝑦𝑦 , the sample covariance 𝑠𝑠𝑋𝑋𝑋𝑋 , and use them to calculate
the sample correlation coefficient 𝑟𝑟.
b. Can we conclude at the 1% significance level that temperature and the number of cups of coffee
sold are negatively linearly related?
c.

57
Exercise 16
The weekly returns of two stocks are recorded for a 13-week period. Assuming that the returns are not
normally distributed, can we infer at the 5% significance level that the returns stocks are correlated?
week 1 2 3 4 5 6 7 8 9 10 11 12 13
stock 1 –7 –4 –7 –3 2 –10 –10 5 1 –4 2 6 –13
stock 2 6 6 –4 9 3 –3 7 –3 4 7 9 5 –7

Exercise 17
In television’s early years, most commercials were 60 seconds long. Now, however, commercials can be any
length. The objective of commercials remains the same: to have as many viewers as possible remember the
product in a favorable way and the eventually buy it.
In an experiment to determine how the length of a commercial affects people’s memory of it, 60 randomly
selected people were asked to watch a 1-hour television program. In the middle of the show, a commercial
advertising a brand of toothpaste appeared. Some viewers watched a commercial that lasted for 20
seconds, others watched one that lasted for 24 seconds, 28 seconds, …, 60 seconds. The essential content
of the commercials was the same. After the show, each person was given a test to measure how much they
remembered about the product. It is not the case that both these variables are quantitative. The Spearman
rank correlation coefficient equals 0.546.
Does the data allow us to conclude that the longer the commercial, the higher the memory test score will
be? Use a significance level of 5%.

58
Week 3
Homework solutions
Solution 1
The observed frequencies are consistent with the hypothesized proportions. Therefore, the data support
the null hypothesis.

Solution 2
The data support the alternative hypothesis.

Solution 3
Value of 𝜒𝜒 2 for Exercise 1:
observed expected (𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
cell (𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
frequency 𝑓𝑓𝑖𝑖 frequency 𝑒𝑒𝑖𝑖 𝑒𝑒𝑖𝑖
1 20 20 0 0
2 30 30 0 0
3 50 50 0 0
total 100 100 2
𝜒𝜒 = 0
Value of 𝜒𝜒 2 for Exercise 2:
observed expected (𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
cell (𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
frequency 𝑓𝑓𝑖𝑖 frequency 𝑒𝑒𝑖𝑖 𝑒𝑒𝑖𝑖
1 60 20 1600 80.00
2 10 30 400 13.33
3 30 50 400 8.00
total 100 100 2
𝜒𝜒 = 101.33

Solution 4
Conditions and assumptions
• Random sample
• Available: nominal data
• Required: minimally nominal data
• 𝑛𝑛 ∙ 𝑝𝑝 = 200 ∙ 0.40 = 80 ≥ 5 and 𝑛𝑛(1 − 𝑝𝑝) = 120 ≥ 5
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝 = 0.40 versus 𝐻𝐻1 ∶ 𝑝𝑝 ≠ 0.40
Test statistic and its distribution
𝑃𝑃� − 𝑝𝑝
𝑍𝑍 = ~ 𝑁𝑁(0, 1)
� 𝑝𝑝(1 − 𝑝𝑝)
𝑛𝑛
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 2.575 or 𝑍𝑍 ≤ −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −2.575
Sample outcome
𝑥𝑥 68 0.34 − 0.40
𝑝𝑝̂ = = = 0.34 ⟹ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = −1.73
𝑛𝑛 200
�0.40(1 − 0.40)
200
Confrontation and decision
−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0

59
Solution 5
Conditions and assumptions
• Radom sample
• Available: nominal data
• Required: minimally nominal data
180
• All 𝑒𝑒𝑖𝑖 = = 60 ≥ 5
3

Hypotheses
1 The market shares are equal
𝐻𝐻0 ∶ 𝑝𝑝𝐴𝐴 = 𝑝𝑝𝐵𝐵 = 𝑝𝑝𝐶𝐶 = 3
𝐻𝐻1 ∶ at least one 𝑝𝑝𝑖𝑖 ≠ 13 At least two shares are unequal to 13
Test statistic and its distribution
3
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2 [df] where df = 𝑛𝑛 − 1 = 3 − 1 = 2
𝑒𝑒𝑖𝑖
𝑖𝑖=1

Rejection region
2 2
𝜒𝜒 2 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝜒𝜒0.05, 2 = 5.991

Sample outcome
2
(76 − 60)2 (54 − 60)2 (50 − 60)2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = + + = 6.53
60 60 60
Confrontation and decision
2 2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that that the stations’ market
shares have changed.
p-value
2 2 2
for df = 2: 𝜒𝜒0.025 = 7.378 > 𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = 6.53 > 𝜒𝜒0.05 = 5.991 ⟹ 0.025 < p-value < 0.05
CHI-SQUARE TEST
Frequencies

COUNT Test S tatistics

Observed N Expected N Residual C OUN T


50.00 50 60.0 -10.0 C hi-S quarea 6.533
54.00 54 60.0 -6.0 df 2
76.00 76 60.0 16.0 A sym p. S ig. .038
Total 180 a. 0 c ells (.0 % ) h ave ex pected frequenc ies les
5. The m inimu m expe cted c ell frequ ency is 6

Solution 6
a.
Conditions and assumptions
• Random sample, obtained from a multinomial experiment
• Available: nominal data
• Required: minimally nominal data
• All 𝑒𝑒𝑖𝑖 ≥ 5

60
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 = 0.15, 𝑝𝑝2 = 0.25, 𝑝𝑝3 = 0.40, 𝑝𝑝4 = 0.20
𝐻𝐻1 ∶ at least one 𝑝𝑝𝑖𝑖 is not equal to its specified value
Test statistic and its distribution
4
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2 [df] where df = 4 − 1 = 3
𝑒𝑒𝑖𝑖
𝑖𝑖=1

Rejection region
2 2
𝜒𝜒 2 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝜒𝜒0.05, 3 = 7.815

Sample outcome
2
(36 − 29.55)2 (58 − 49.25)2 (74 − 78.80)2 (29 − 39.40)2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = + + + = 6.00
29.55 49.25 78.80 39.40
Confrontation and decision
2 2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 < 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is not sufficient evidence to infer that certain sizes of cars
are involved in a higher-than-expected percentage of accidents.
b.
p-value
2 2 2
for df = 3: 𝜒𝜒0.10 = 6.251 > 𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = 6.00 > 𝜒𝜒0.90 = 0.584 ⟹ 0.10 < p-value < 0.90

Solution 7
The data support the null hypothesis, because you can see at a glance that the proportions in each row are
exactly the same 5:3:2, just as the proportions in each column are 1:2. So there can never be any reason to
reject the null hypothesis, irrespective of the significance value.

Solution 8
The data seem to support the alternative hypothesis, simply because the proportions are now not the same
in each column or in each row. However, whether this deviation is large enough (significant) to reject 𝐻𝐻0
given a certain value for 𝛼𝛼 can only be determined after performing all calculations.

Solution 9
Calculate the expected values (in blue) by:
row total𝑖𝑖 ∙ column total𝑗𝑗 100 ∙ 90
𝑒𝑒𝑖𝑖𝑖𝑖 = for example exercise 8: 𝑒𝑒11 = = 30
total 300
Value of 𝜒𝜒 2 for Exercise 7: 1 2 3 total
2 3 2 1 50 50 30 30 20 20 100
�𝑓𝑓𝑖𝑖𝑖𝑖 − 𝑒𝑒𝑖𝑖𝑖𝑖 � (50 − 50)2
𝜒𝜒 2 = � � = +⋯=0 2 100 100 60 60 40 60 200
𝑒𝑒𝑖𝑖𝑖𝑖 50 total 150 90 60 300
𝑖𝑖=1 𝑗𝑗=1

Value of 𝜒𝜒 2 for Exercise 8: 1 2 3 total


2 3 2 1 40 30 20 40 40 30 100
�𝑓𝑓𝑖𝑖𝑖𝑖 − 𝑒𝑒𝑖𝑖𝑖𝑖 � (40 − 30)2
2
𝜒𝜒 = � � = + ⋯ = 25 2 50 60 100 80 50 60 200
𝑒𝑒𝑖𝑖𝑖𝑖 30
𝑖𝑖=1 𝑗𝑗=1 total 90 120 90 300

61
Solution 10
Conditions and assumptions
• Radom sample
• Available: nominal data (two yes/no-variables)
• Required: minimally nominal data
• All 𝑒𝑒𝑖𝑖 ≥ 5
Hypotheses
𝐻𝐻0 ∶ the two classifications are independent
𝐻𝐻1 ∶ the two classifications are dependent
Test statistic and its distribution
4
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2 [df] where df = (2 − 1)(2 − 1) = 1
𝑒𝑒𝑖𝑖
𝑖𝑖=1

Rejection region
2 2 2 2
𝜒𝜒 2 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝜒𝜒0.10, 1 = 2.706 nota bene 𝜒𝜒0.10, 2
1 = 𝑧𝑧0.05 = 1.645 = 2.706
2 2
for df = 1 we always have that 𝜒𝜒α, 1 = 𝑧𝑧𝛼𝛼 .
2
Sample outcome
2
(41 − 36)2 (165 − 170)2 (28 − 33)2 (161 − 156)2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = + + + = 1.76
36 170 33 156
Confrontation and decision
2 2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 < 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 10%, there is not sufficient evidence to infer that there exists a
difference between the new drug and the placebo.
p-value
0.10 < p-value = 𝑃𝑃(𝜒𝜒 2 ≥ 1.76) < 0.90
Or using the standard normal table is possible because of df = 1:
p-value = 𝑃𝑃(𝜒𝜒 2 ≥ 1.76) = 2 ∙ 𝑃𝑃(𝑍𝑍 ≥ √1.76 = 1.33) = 2 ∙ 0.0918 = 0.1836

Solution 11
Conditions and assumptions
• Radom sample
• Available: nominal data
• Required: minimally nominal data
• 𝑛𝑛1 ∙ 𝑝𝑝̂1 = 𝑥𝑥1 = 41 ≥ 5 and 𝑛𝑛1 (1 − 𝑝𝑝̂1 ) = 𝑛𝑛1 − 𝑥𝑥1 = 165 ≥ 5
𝑛𝑛2 ∙ 𝑝𝑝̂ 2 = 𝑥𝑥2 = 28 ≥ 5 and 𝑛𝑛2 (1 − 𝑝𝑝̂ 2 ) = 𝑛𝑛2 − 𝑥𝑥2 = 161 ≥ 5
Hypotheses
𝐻𝐻0 ∶ 𝑝𝑝1 = 𝑝𝑝2 versus 𝐻𝐻1 ∶ 𝑝𝑝1 ≠ 𝑝𝑝2
1 ∶ new drug 2 ∶ placebo
Test statistic and its distribution
𝑃𝑃�1 − 𝑃𝑃�2 𝑛𝑛1 𝑃𝑃�1 + 𝑛𝑛2 𝑃𝑃�2
𝑍𝑍 = ~ 𝑁𝑁(0, 1) where 𝑃𝑃� =
1 1 𝑛𝑛1 + 𝑛𝑛2
�𝑃𝑃��1 − 𝑃𝑃�� � + �
𝑛𝑛 1𝑛𝑛 2
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.05 = 1.645 or 𝑍𝑍 ≤ −𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −1.645
Sample outcome
𝑥𝑥1 41 𝑥𝑥2 28 41 + 28
𝑝𝑝̂1 = = = 0.1990, 𝑝𝑝̂2 = = = 0.1481, 𝑝𝑝̂ = = 0.1747 ⟹
𝑛𝑛1 206 𝑛𝑛2 189 206 + 189
0.1990 − 0.1481
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = = 1.33
�0.1747(1 − 0.1747) � 1 + 1 �
206 189
Confrontation and decision
−𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 10%, there is not sufficient evidence to infer that there exists a
difference between the new drug and the placebo.
p-value
p-value = 2 ∙ 𝑃𝑃(𝑍𝑍 ≥ 𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 1.33) = 2 ∙ 0.0918 = 0.1836

Solution 12
Conditions and assumptions
• Radom sample
• Available: nominal data
• Required: minimally nominal data
• All 𝑒𝑒𝑖𝑖 ≥ 5
Hypotheses
𝐻𝐻0 ∶ the two classifications are independent
𝐻𝐻1 ∶ the two classifications are dependent
Test statistic and its distribution
6
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2 [df] where df = (2 − 1)(3 − 1) = 2
𝑒𝑒𝑖𝑖
𝑖𝑖=1

Rejection region
2 2
𝜒𝜒 2 ≥ 𝜒𝜒crit = 𝜒𝜒0.10, 2 = 4.605

Sample outcome
serious side effects
medication nausea drowsiness did not suffer total
new drug 32 20,86 9 15,12 165 170,02 206
placebo 8 19,14 20 13,88 161 155,98 189
total 40 29 326 395
Expected frequencies in blue
2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = 17.92
Confrontation and decision
2 2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0

63
Conclusion
Given the significance level of 10%, there is enough evidence to infer that differences exist
between the new drug and the placebo.

Solution 13
a.
A statistical program (SPSS) gives us:

SHIFT * QUALITY Crosstabulation

QUALITY
fawed perfect Total
SHIFT shift1 Count 10 240 250
Expected Count 12.5 237.5 250.0
shift2 Count 9 191 200
Expected Count 10.0 190.0 200.0
shift3 Count 11 139 150
Expected Count 7.5 142.5 150.0
Total Count 30 570 600
Expected Count 30.0 570.0 600.0

b.
Conditions and assumptions
• Radom sample
• Available: nominal data
• Required: minimally nominal data
• All 𝑒𝑒𝑖𝑖 ≥ 5
Hypotheses
𝐻𝐻0 ∶ The two variables are independent versus
𝐻𝐻1 ∶ The two variables are not independent (dependent)
Test statistic and its distribution
6
2
(𝑓𝑓𝑖𝑖 − 𝑒𝑒𝑖𝑖 )2
𝜒𝜒 = � ~ 𝜒𝜒 2 [df] where df = (3 − 1)(2 − 1) = 2
𝑒𝑒𝑖𝑖
𝑖𝑖=1

Rejection region
2 2
𝜒𝜒 2 ≥ 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝜒𝜒0.05, 2 = 5.991

Sample outcome
2
(240 − 237.5)2 (191 − 190)2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = + + ⋯ = 2.35
237.5 190
Confrontation and decision
2 2
𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 < 𝜒𝜒𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is not sufficient evidence to infer that there are differences
in quality among the shifts.
c.
p-value
2 2 2
𝜒𝜒0.10 = 2.706 > 𝜒𝜒𝑜𝑜𝑜𝑜𝑜𝑜 = 2.35 > 𝜒𝜒0.90 = 0.0158 ⟹ 0.10 < p-value < 0.90

64
Solution 14
T-test for 𝜌𝜌:
Conditions and assumptions
• Random sample of matched pairs
• Pairs from a bivariate normal population
• Pairs are independent
Hypotheses
𝐻𝐻0 ∶ 𝜌𝜌 = 0 versus 𝐻𝐻1 ∶ 𝜌𝜌 ≠ 0
Test statistic and its distribution

𝑛𝑛 − 2
𝑇𝑇 = 𝑟𝑟 ∙ � ~ 𝑡𝑡[df] with df = 𝑛𝑛 − 2 ≈ 50
1 − 𝑟𝑟 2

Rejection region
𝑇𝑇 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑡𝑡0.005, 50 = 2.678 or 𝑇𝑇 ≤ −𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −2.678
Observed test statistic

50 − 2
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = ±0.369 ∙ � = ±2.75
1 − 0.3692

Confrontation and decision


𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≤ −𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 or 𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given a significance level α of 0.01, there is sufficient evidence to infer that the variable 𝑋𝑋
correlates with the variation of 𝑌𝑌.

Solution 15
a.
Variances and covariances can be calculated by their defining formulas:
1 1
𝑠𝑠𝑥𝑥2 = ∙ �(𝑥𝑥𝑖𝑖 − 𝑥𝑥̅ )2 and 𝑠𝑠𝑥𝑥𝑥𝑥 = ∙ �(𝑥𝑥𝑖𝑖 − 𝑥𝑥̅ )(𝑦𝑦𝑖𝑖 − 𝑦𝑦�)
𝑛𝑛 − 1 𝑛𝑛 − 1
and by short-cut formulas (which are sometimes more convenient):
1 1 2 1 1
𝑠𝑠𝑥𝑥2 = ∙ �� 𝑥𝑥𝑖𝑖 2 − �� 𝑥𝑥𝑖𝑖 � � and 𝑠𝑠𝑥𝑥𝑥𝑥 = �� 𝑥𝑥𝑖𝑖 𝑦𝑦𝑖𝑖 − � 𝑥𝑥𝑖𝑖 � 𝑦𝑦𝑖𝑖 �
𝑛𝑛 − 1 𝑛𝑛 𝑛𝑛 − 1 𝑛𝑛
game 𝑥𝑥 𝑦𝑦 𝑥𝑥 − 𝑥𝑥̅ 𝑦𝑦 − 𝑦𝑦�
1 53 50 2 -4
2 50 47 -1 -7
3 75 43 24 -11
4 48 58 -3 4
5 45 57 -6 3
6 63 44 12 -10
7 40 68 -11 14
8 55 48 4 -6
9 30 71 -21 17
𝑛𝑛 = 9 𝑥𝑥̅ = 51 𝑦𝑦� = 54 𝑠𝑠𝑥𝑥2 = 168.5 𝑠𝑠𝑦𝑦2 = 104
𝑠𝑠𝑥𝑥𝑥𝑥 = −118.75
𝑠𝑠𝑥𝑥𝑥𝑥 −118.75
𝑟𝑟 = = = −0.897
𝑠𝑠𝑥𝑥 ∙ 𝑠𝑠𝑦𝑦 √168.5 ∙ √104

65
b. T-test for 𝝆𝝆:
Conditions and assumptions
• Random sample of matched pairs
• Pairs from a bivariate normal population
• Pairs are independent
Hypotheses
𝐻𝐻0 ∶ 𝜌𝜌 = 0 versus 𝐻𝐻1 ∶ 𝜌𝜌 < 0
Test statistic and its distribution

𝑛𝑛 − 2
𝑇𝑇 = 𝑟𝑟 ∙ � ~ 𝑡𝑡[df] with df = 𝑛𝑛 − 2 = 7
1 − 𝑟𝑟 2

Rejection region
𝑇𝑇 ≤ 𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = −𝑡𝑡0.01, 9 = −2.821
Observed test statistic

9−2
𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 = −0.897 ∙ � = −5.371
1 − (−0.897)2

Confrontation and decision


𝑡𝑡𝑜𝑜𝑜𝑜𝑜𝑜 ≤ −𝑡𝑡𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
With a significance level of 1%, we can conclude that temperature and the number of cups of
coffee sold are negatively linearly related.

Solution 16
Conditions and assumptions
• Random sample of matched pairs
• Available: quantitative data
• Required: minimally ordinal data
• Population not normally distributed
Hypotheses
𝐻𝐻0 ∶ 𝜌𝜌𝑠𝑠 = 0 versus 𝐻𝐻1 ∶ 𝜌𝜌𝑠𝑠 ≠ 0
Test statistic and its distribution
𝑠𝑠𝑎𝑎𝑎𝑎 1
𝑛𝑛−1�
∑ 𝑎𝑎𝑎𝑎 − 𝑛𝑛𝑎𝑎�𝑏𝑏�� ∑ 𝑎𝑎𝑎𝑎 − 𝑛𝑛𝑎𝑎�𝑏𝑏�
𝑟𝑟𝑠𝑠 = = = (Spearman)
𝑠𝑠𝑎𝑎 𝑠𝑠𝑏𝑏 �∑ 𝑎𝑎2 − 𝑛𝑛𝑎𝑎�2 ∙ �∑ 𝑏𝑏 2 − 𝑛𝑛𝑏𝑏� 2
1
�𝑛𝑛−1 (∑ 𝑎𝑎2 − 𝑛𝑛𝑎𝑎�2 ) ∙ 1
�𝑛𝑛−1 �∑ 𝑏𝑏 2 − 𝑛𝑛𝑏𝑏� 2 �

where 𝑎𝑎𝑖𝑖 = rank(𝑥𝑥𝑖𝑖 ) and 𝑏𝑏𝑖𝑖 = rank(𝑦𝑦𝑖𝑖 )


Rejection region
𝛼𝛼 = 5% (two sided) ⟹ 𝑟𝑟𝑠𝑠 ≥ 𝑟𝑟𝑠𝑠, 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 0.560 or 𝑟𝑟𝑠𝑠 ≤ −0.560
Sample outcome
week 1 2 3 4 5 6 7 8 9 10 11 12 13
stock 1 –7 –4 –7 –3 2 –10 –10 5 1 –4 2 6 –13
rank 𝒂𝒂 4.5 6.5 4.5 8 10.5 2.5 2.5 12 9 6.5 10.5 13 1

stock 2 6 6 –4 9 3 –3 7 –3 4 7 9 5 –7
rank 𝒃𝒃 8.5 8.5 2 12.5 5 3.5 10.5 3.5 6 10.5 12.5 7 1

66
1 + 13 677.5 − 13 ∙ 7 ∙ 7 40.5
𝑎𝑎� = 𝑏𝑏� = =7 𝑟𝑟𝑠𝑠, 𝑜𝑜𝑜𝑜𝑜𝑜 = = = 0.225
2 √817 − 13 ∙ 72 ∙ √817 − 13 ∙ 72 180
Confrontation and decision
𝑟𝑟𝑠𝑠, 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 < 𝑟𝑟𝑠𝑠, 𝑜𝑜𝑜𝑜𝑜𝑜 < 𝑟𝑟𝑠𝑠, 𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ do not reject 𝐻𝐻0
Conclusion
Given the significance level, there is not sufficient evidence to infer that the returns on the two
stocks are correlated.

Solution 17
Conditions and assumptions
• Random sample of matched pairs
• Available: one quantitative, one ordinal
• Required: minimally ordinal data
• 𝑛𝑛 = 60 > 30 so normal approximation is allowed: 𝑍𝑍
Hypotheses
𝐻𝐻0 ∶ 𝜌𝜌𝑠𝑠 = 0 versus 𝐻𝐻1 ∶ 𝜌𝜌𝑠𝑠 > 0
Test statistic and its distribution
𝑍𝑍 = 𝑟𝑟𝑠𝑠 ∙ √𝑛𝑛 − 1 ~ 𝑁𝑁(0, 1)
Rejection region
𝑍𝑍 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 = 𝑧𝑧0.05 = 1.645
Sample outcome
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 = 0.546 ∙ √60 − 1 = 4.19
Confrontation and decision
𝑧𝑧𝑜𝑜𝑜𝑜𝑜𝑜 ≥ 𝑧𝑧𝑐𝑐𝑐𝑐𝑐𝑐𝑐𝑐 ⟹ reject 𝐻𝐻0
Conclusion
Given the significance level of 5%, there is sufficient evidence to infer that the longer the
commercial, the higher the memory test score will be.

67
Week 3
Tutorial exercises
Question 1 (Exam 7-4-2006)
A large bank offers its clients 5 different types of insurance (say A, B, C, D, and E). We are interested in the
distribution of the number of insurances that clients took with the bank. From a random sample of 100
clients we obtain the following results.
number of insurances 0 1 2 3 4 5
number of clients (𝑓𝑓𝑖𝑖 ) 8 33 31 15 7 6
Perform a hypothesis test with 𝛼𝛼 = 5% to test the statement that the number of insurances per client has
a binomial distribution with 𝑝𝑝 = 0.35 and 𝑛𝑛 = 5.

Question 2 (Exam 26-1-2005)


For a sample of 60 costumers, it is known which airline company (the variable AIRLINE) they have used
(DELTA, LUFTHANSA, or KLM) and which class (the variable CLASS) they have flown (ECONOMY or
BUSINESS). On the basis of the following cross table you have to test whether there is a relationship
between the variables AIRLINE and CLASS (𝛼𝛼 = 5%).

AIRLINE * CLASS Crosstabulation

CLASS
ECONOMY BUSINESS Total
AIRLINE DELTA Count 12 20
Expected Count 20.0
LUFTHANSA Count 14 20
Expected Count 20.0
KLM Count 20
Expected Count 20.0
Total Count 43 17 60
Expected Count 43.0 17.0 60.0

Question 3 (Exam 13-1-2011)


Manufacturers of perishable foods often use preservatives to retard spoilage. One concern is that too many
preservatives will change the flavor of the food. An experiment is conducted using a sample of food
products with varying amounts of preservatives added. Both length of time until the food shows signs of
spoiling and a taste rating are recorded for each product. The taste rating is a rating of a connoisseur on a
scale from 1 (bad) to 5 (good). Six sample measurements are shown in the table below.
food product
1 2 3 4 5 6
days until spoilage 30 47 26 94 67 83
taste rating 4 4 5 2 3 1
Use a statistical test with 𝛼𝛼 = 5% to find out whether the spoilage times and the taste ratings have a
negative relation.

68
Week 3
Multiple-choice questions
Question 1
A recently opened helpdesk receives telephonic requests for help during workdays, Monday to Friday. After
three weeks an evaluation is performed, in order to determine whether it is reasonable to assume that the
number of requests for help is uniformly distributed over the five workdays (we talk about a uniform
distribution when an arbitrary request is as likely to be made on Monday, as on Tuesday, etc.). For the five
workdays from the past week, they recorded 60, 45, 50, 60 and 35 requests respectively. What is the
correct value for the relevant test statistic?
a. 0.5
b. 25
c. 50
d. 9.0

Question 2
The following table shows observed frequencies:
willing to not willing to
class
help neighbors help neighbors
poor 360 180
rich 250 110
To answer the question whether the willingness to help neighbors is higher among rich people as compared
to poor people, the following test(s) can be used:
a. only a test for the difference between two population proportions
b. only a chi-squared test
c. both a chi-squared test and a test for the difference between two population proportions
d. none of the tests which have been discussed during this course

Question 3
A researcher uses the Spearman Rank Correlation Coefficient to investigate the relationship between two
ordinal variables x and y. Based on a sample of 20 pairs of observations, he finds a value for the
Spearman Rank Correlation Coefficient of 0.415. Which of the conclusions below could be the result of a
hypothesis test?
a. At 𝛼𝛼 = 5% we can infer that a relationship exists between x and y
b. At 𝛼𝛼 = 1% we can infer that no relationship exists between x and y
c. At 𝛼𝛼 = 5% we can infer that a positive relationship exists between x and y
d. At 𝛼𝛼 = 1% we can infer that a relationship exists between x and y

Question 4
An investigating into the relationship between the color of a car and the gender of its owner, results in the
following cross-tabulation:
Colour Car * Gender Crosstabulation

Gender
Male Female
Colour Red

Not red

69
Which statement is correct?
a. Using a significance level of 5%, the p-value of 0.0415 shows that there is sufficient proof to infer
that a relationship exists between the color of a car and the gender of its owner
b. Using a significance level of 10%, there is sufficient proof to infer that a relationship exists between
the color of a car and the gender of its owner
c. Using a significance level of 5%, the hypothesis that a relationship exists between the color of a car
and the gender of its owner is rejected
d. Using a significance level of 10%, the hypothesis that a relationship exists between the color of a
car and the gender of its owner is rejected

Question 5
We would like to use a sample in order to draw a conclusion about the location of a population. To be able
to choose the correct test statistic, a Lilliefors-test is performed first, with 𝛼𝛼 = 0.05, resulting in the
following SPSS-output:

Which statement is correct?


a. The hypothesis of normality is rejected, and therefore we will use a T-test
b. The hypothesis of normality is not rejected, and therefore we will use a T-test
c. The hypothesis of normality is rejected, and therefore we will use a sign test
d. The hypothesis of normality is not rejected, and therefore we will use a sign test

70

You might also like