Download hints

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Prenatal testing wikipedia , lookup

Forensic epidemiology wikipedia , lookup

Adherence (medicine) wikipedia , lookup

Transcript
Exercises for HMM4101, for SPSS, 27/9-2007
1. Ten patients with sleeping problems try out two different sleeping pills: Pill A and
pill B. The number of extra hours of sleep they get while taking each pill, is listed
in the table below:
Patient
1
2
3
4
5
6
7
8
9
10
Medication A
0.7
-1.6
-0.2
-1.2
-1.0
3.4
3.7
0.8
0.0
2.0
Medication B
1.9
0.8
1.1
0.1
-0.1
4.4
5.5
1.6
4.6
3.4
The data is also available from the course homepage.
a. Compute the average and standard error for the extra sleep with
medication A.
b. Find a 95% confidence interval for the mean extra sleep under medication
A.
c. Perform a statistical test of whether medication A is effective.
d. What assumptions do you need to make in the two points above? How can
you argue that these assumptions are OK?
e. Do the above 4 points also for medication B.
f. Make a statistical test of whether A is more effective than B.
g. Assume now that the data in the table comes from 20 unrelated patients, so
that the result for pill A and pill B in each line come from two different
patients. Making this new assumption, perform a statistical test of whether
A is more effective than B.
h. Compare the results in f and g, and make a comment about any difference.
i. An experiment testing medications A and B on 10 patients can be
performed in several ways. One possibility would be that all patients
tested A first, and then B. Another would be that the first 5 patients tested
A first, while the last 5 patients tested B first. Yet another would be that
the patients got A or B first according to a random draw. In this case, one
could choose either to tell each patient which drug she received first, or to
not tell her. Discuss the pros and cons of each possible setup.
2. In a study of the cognitive capacities of nonhuman primates, 19 monkeys of the
same age were randomly divided into two groups of 10 and 9. The groups were
trained using two different teaching methods to recollect an acoustic stimulus.
The monkeys’ scores on a subsequent test is given below:
Method 1: 167, 149, 137, 178, 179, 155, 164, 104, 151, 150
Method 2: 98, 127, 140, 103, 116, 105, 100, 95, 131.
a. Analyze the data to test if one method works better than the other.
b. What assumptions do you need to make in your analysis? How can you
argue for these assumptions?
3. (Do this exercise if you have time). We will now try out some functions in SPSS
which may be useful to you. For example, SPSS can be used to compute the
values you otherwise find in various statistical tables. Let’s say you want to
compute Z0.025, the value such that a random variable with a standard normal
distribution has probability 0.025 of being higher than this value. Choose, in
SPSS, Transform => Compute, write some dummy name in Target
Variable, and in Numeric Expression, write IDF.NORMAL(0.975,
0, 1). This computes the “Inverse Cumulative Density Function” for the normal
distribution, with expectation 0 and standard deviation 1, at the value 0.975.
(What do you get if you compute it for the value 0.025?)
a. Use SPSS to compute t8,0.025, the value such that a random variable with a t
distribution with 8 degrees of freedom has probability 0.025 of being
higher than this value.
b. Use SPSS to compute F3,8,0.975, the value such that a random variable with
an F distribution with 3 and 8 degrees of freedom has probability 0.975 of
being higher than this value.
c. Use SPSS to compute the probability that a normally distributed variable
with expectation 4 and standard deviation 2 has a value below 1.3.
Note: Exercises 1 and 2 have mainly been taken from a collection of exercises prepared
by Petter Laake.
HINTS:
1. Below are some hints on what functions in SPSS to use. Be sure that you are able
to interpret the output, and extract from it the information you need.
a. Use for example: Analyze => Descriptive statistics =>
Explore...
b. See a.
c. Use for example: Analyze => Compare Means => One
sample T test
d. Use for example: Analyze => Descriptive statistics =>
Explore..., and then under Plots... choose Normality
plots with tests
e. See above.
f. Use for example: Analyze => Compare Means => PairedSamples T Test...
g. In order to solve this, you need to rearrange the data: For example, cut out
the ten numbers for medication B and put then below the results for
medication A, in the same column. Then, make a new column with one
number, for example 1, for every person taking medication A, and another
number, for example 2, for every person taking medication B. Then, use
for example: Analyze => Compare Means => IndependentSamples T Test. Use your new variable as grouping variable.
h. Consider that some of the variability in the results is connected to the
individual patients. Looking at differences reduces the influence of this
variability on the result.
2.
a. Write in the data in one appropriately named column in SPSS. Use another
column as an indicator of which method has been used to achieve the
result on that line (see the hint for 1g). Then use Analyze =>
Compare Means => Independent-Samples T Test.
b. See the hint for 1d.
3.
a.
b.
c.
d.
Look at the list of possible functions under “Functions:”
Look at the list of possible functions under “Functions:”
Consider the function CDF.NORMAL
To simulate from the F distribution, look at the list of possible functions
under “Functions:”