You are on page 1of 8

Practical 2

Two-Sample Experiments
Preliminary Reading: Chapters 3 4

2.1

Treatment for Raynauds Phenomenon

In a study of the drug nicardipine for treating an illness called Raynauds Phenomenon,
the number of attacks observed over a two-week period was recorded for each of thirty
patients, once while they were receiving the active treatment (nicardipine) and once while
they were receiving a placebo.
The order in which each patient received the nicardipine and the placebo was randomised, in a double-blind fashion (neither the patient nor the administering physician
knew whether it was nicardipine or the placebo). Sufficient time was allowed between the
treatment periods to avoid any drug carry-over effects.
We want to investigate whether nicardipine is an effective treatment for Raynauds
Phenomenon (in the sense of lowering the mean number of attacks per fortnight) and to
give a confidence interval for any effect.

19

20

PRACTICAL 2. TWO-SAMPLE EXPERIMENTS


patient
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

nicardipine
51
46
40
28
8
23
53
9
27
14
23
2
28
9
32

placebo
37
37
43
36
24
35
49
21
41
32
16
17
29
31
36

patient
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30

nicardipine
27
21
40
29
8
4
23
0
43
15
2
32
44
13
32

placebo
43
31
36
40
33
31
38
31
33
43
42
43
45
24
47

1. Open a new Excel workbook


2. Enter the data into Excel . . .
(a) Name the variables nicardipine and placebo
(b) Save the Excel workbook to your home directory with the name
Raynauds.Phenomenon.xlsx
3. Open R
4. Import the data into R . . .
(a) Use the menu item
Data / Import data / from Excel, Access or dBase data set. . .
(b) Name the data set Raynauds.Phenomenon
(c) Click on the OK button
5. Open a blank Word document; use it to record your analysis
6. Note that the population of interest is the population of all sufferers of Raynauds
Phenomenon
7. Write down a statement of the appropriate null hypothesis
8. The Fundamental Sampling Assumption is the assumption that the thirty sufferers
of Raynauds Phenomenon were chosen at random

2.1. TREATMENT FOR RAYNAUDS PHENOMENON

21

It is not possible to check the Fundamental Sampling Assumption from the


information supplied
It is assumed that the experimenters followed appropriate selection protocols
Why were the protocols regarding the order of the treatment and the time
between treatments instituted?
9. The one modelling assumption is the assumption that the distribution of the differences between the number of attacks under nicardipine and under the placebo is
normal in the population of all sufferers of Raynauds Phenomenon
It is possible to check that the modelling assumption is reasonable by inspecting
a normal Q-Q plot of the sample differences for approximate normality
10. Construct a normal Q-Q plot of the sample differences . . .
(a) Use the menu item
Data / Manage variables in active data set / Compute new variable. . .
(b) Call the new variable difference and set it to nicardipine - placebo
(c) Click on the OK button
(d) Use the menu item
Graphs / Quantile-comparison plot. . .
(e) Select difference as the variable of interest
(f) Normal is selected by default
(g) Click on the OK button
(h) The graph appears in an R Graphics window in the RGui tab
11. Perform a paired-samples t-test . . .
(a) Use the menu item
Statistics / Means / Paired t-test. . .
(b) Select nicardipine as the first variable and placebo as the second variable
(c) There is no need to alter any of the other settings
(d) Click on the OK button

22

PRACTICAL 2. TWO-SAMPLE EXPERIMENTS


Checkpoint 7
The demonstrator will inspect your Word document
Explain to the demonstrator why this experimental design is a paired design
Show to the demonstrator your statement of the null hypothesis
Discuss the experimental protocols with the demonstrator
Show to the demonstrator your normal Q-Q plot of the differences and discuss
Identify to the demonstrator the P-value for this analysis and show to the demonstrator your conclusion regarding the null hypothesis
If appropriate, show to the demonstrator the confidence interval for the mean difference and explain how to interpret it
This experiment could have been designed as a two-independent-samples experiment
by selecting 60 sufferers of Raynauds Phenomenon, and then assigning at random 30
to a nicardipine treatment and 30 to treatment with the placebo. Discuss with the
demonstrator why this design would have been less powerful than the one actually
used

23

2.2. JELLYFISH LENGTH

2.2

Jellyfish Length

Samples of jellyfish were taken from Dangar Island and Salamander Bay, both in the
Hawkesbury River in New South Wales. The lengths in millimetres were recorded. We
want to investigate whether the mean length of Dangar Island jellyfish is different from
that of Salamander Bay jellyfish, and if so to give a confidence interval for this difference.
Reference: Lunn, A.D. and McNeil, D.R. (1991), Computer-Interactive Data Analysis, Chichester: John Wiley and Sons, 308

Dangar
8
9
9
9
9.5
10
10
10
11
11
11

Island Salamander Bay


13
14
19
13
16
19
13
16.5
20
14
17
20
14
17
20
14
18
20
16
18
20
16
18
21
16
19
21
19
19
21
16
19
22
19
22

1. Open a new Excel workbook


2. Enter the data into Excel . . .
(a) Name the variables location and length
(b) Save the Excel workbook to your home directory with the name
Jellyfish.xlsx
3. Open R
4. Import the data into R . . .
(a) Use the menu item
Data / Import data / from Excel, Access or dBase data set. . .
(b) Name the data set Jellyfish
(c) Click on the OK button
5. Open a blank Word document; use it to record your analysis

24

PRACTICAL 2. TWO-SAMPLE EXPERIMENTS


6. Note that the population of interest is the population of all jellyfish at Dangar Island
and Salamander Bay combined
7. Write down a statement of the appropriate null hypothesis
8. The Fundamental Sampling Assumption is the assumption that the 22 jellyfish from
Dangar Island are a random sample of Dangar Island jellyfish, and that the 24 jellyfish
from Salamander Bay are a random sample of Salamander Bay jellyfish
It is not possible to check the Fundamental Sampling Assumption from the
information supplied
It is assumed that the experimenters followed appropriate protocols
9. The two modelling assumptions are the assumptions that the distribution of the
lengths of all Dangar Island jellyfish is normal and also that the distribution of the
lengths of all Salamander Bay jellyfish is normal
It is possible to check that the modelling assumptions are reasonable by inspecting normal Q-Q plots of the readings, one for each sample group separately, for
approximate normality

10. In order to produce a normal Q-Q plot of the lengths separately for each location, it
is necessary to first extract as new data frames the lengths for each location . . .
(a) Use the menu item
Data / Active data set / Subset active data set. . .
(b) Uncheck the box Include all variables and select only
length
(c) For the Subset expression enter location=="Dangar Island"
(d) Name the new data set Dangar.Island
(e) Click on the OK button
(f) Produce a normal Q-Q plot of the lengths for the jellyfish sampled from Dangar
Island
11. Go back to the original data frame . . .
(a) Use the menu item
Data / Active data set / Select active data set. . .
(b) Select the data frame Jellyfish
(c) Click on the OK button
12. Repeat for Salamander Bay

2.2. JELLYFISH LENGTH

25

13. Observe that the distribution of the lengths at each location is approximately normal
14. Perform a two-independent-samples t-test . . .
(a) Use the menu item
Statistics / Means / Independent samples t-test. . .
(b) Select location as the grouping variable and length as the response variable
(c) There is no need to alter any of the other settings
(d) Click on the OK button
Checkpoint 8
The demonstrator will inspect your Word document
Explain to the demonstrator why this experimental design is a two-independentsamples design
Show to the demonstrator your statement of the null hypothesis
Show to the demonstrator your normal Q-Q plots of the lengths and discuss
Identify to the demonstrator the P-value for this analysis and show to the demonstrator your conclusion regarding the null hypothesis
If appropriate, show to the demonstrator the confidence interval for the mean difference and explain how to interpret it

26

PRACTICAL 2. TWO-SAMPLE EXPERIMENTS

You might also like