Добавил:
Sekretar
kiopkiopkiop18@yandex.ru
t.me/Prokururor I Вовсе не секретарь, но почту проверяю
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз:
Предмет:
Файл:Ординатура / Хирургия / Библиотека им академика М.И. Перельмана / Книга_155_библиотеки_им_акад_М_И_Перельмана
.pdf
11.4 Comparison of the Mean of the Two Paired Samples 239
a data point in the second sample. With paired samples, we need an approach,
which looks at the differences between pairs. Because differences between two
samples are calculated from the matched or paired samples and we can use paired
t-test (equivalently, a one-sample t-test of the differences).
Example 11.8
To determine the levels of blood cholesterol, two blood samples were
taken from 11 people and sent to two different laboratories. The results of these two
laboratories (x and y) are given in Table
11.1. Can the results of these two laboratories
be considered equal?
Solution: The data are not independent of each other and are paired data. Therefore,
we are dealing with the difference in the values of the two laboratories for each one
(
d
i
= x
i
−y
i
). The difference between the two measurements and its square is given
in the fourth and fifth columns of Table
2.7.
d =
55
11
= 5, S =
d
2
i
−
(
d
i
)
2
n
n − 1
=
2661 −
(
55
)
2
11
11 − 1
= 15.45,
Se
d
=
15.45
√
11
= 4.66
In this example, df = n−1 = 11–1 = 10 and the critical value is t
(
0.975,10
)
= 2.228,
and the 95% confidence interval is calculated as follows:
CI95% = d ± t
(
0.975,10
)
× Se = 5 ± 2.228 × 4.66 = 5 ± 10.38
=
(
−5.38 to 15.38
)
Table 11.1 Results of two laboratories (x and y)
Sample Lab 1 (x) Lab 2 (y) d
i
= x
i
− y
i
d
2
i
1 310 285 +25 623
2 228 234 −6 36
3 265 279 −14 196
4 247 231 +16 256
5 243 212 +31 961
6 238 250 −12 144
7 285 285 0 0
8 263 260 +3 9
9 269 256 +13 169
10 221 210 +11 121
11 208 220 −12 144
Total – – +55 2661
https://t.me/med1917

240 11 Hypothesis Testing
This interval means that the mean differences in blood cholesterol levels in the
two laboratories are between −5.38 and 15.38. Since the 95% confidence interval
includes zero, the difference between the two laboratories can be considered zero.
That is, the values of these two laboratories are equal.
To run the significance test in SPSS, it must be noted that the data of each
laboratory must be entered in a separate column (e.g., lab 1 and lab 2). Then select
path Analyze\Compare Means\Paired-Samples T Test to open the following
window.
In this window, first select the paired variables from the left box and enter in the
right box named Paired Variables. Then, the test is executed by confirming the OK
button.
The SPSS output for the paired t-test is given below.
Paired samples statistics
Mean N Std. deviation Std. error mean
Pair 1 Lab 1 252.45 11 29.673 8.947
Lab 2 247.4545 11 28.13668 8.48353
Paired samples’ correlations
N Correlation Sig
Pair 1 Lab 1 and lab 2 11 0.859 0.001
https://t.me/med1917

11.4 Comparison of the Mean of the Two Paired Samples 241
Paired samples’ test
Paired differences t df Sig
(two-tailed)
Mean Std.
deviation
Std. error
mean
95% CI of the
difference
Lower Upper
Pair 1:
Lab
1–Lab
2
5.00 15.44668 4.65735 −5.37722 15.37722 1.074 10 0.308
Using the Test:
The null and alternative hypotheses are:
H
0
: d = 0
H
A
: d /= 0
where the d is the mean difference of two paired samples.
Sample size is 11 and default significant level is 0.05.
Test statistic is:
t =
d
S
√
n
, where the S =
d
2
i
−
(
d
i
)
2
n
n − 1
.
Critical value is t
(
0.975,10
)
= 2.228. If the test statistic is greater than the critical
value of 2.28, then we reject the null hypothesis (
H
0
).
https://t.me/med1917

242 11 Hypothesis Testing
The test statistic according to sample data is t =
5
15.45
√
11
=
5
4.66
= 1.07.4.
Since 1.07 < 2.228, then we don’t reject the null hypothesis (H
0
).
The mean blood cholesterol levels measured by the two laboratories can be
considered equal.
This result was obtained exactly from the estimation of the confidence interval.
11.5 Comparing Population Proportion with a Fixed
Proportion
When the variable is binomial and the answers are in the form of failure (0) and
success (1), proportion is equal to the number of successes divided by the total
number of trials. Thus, the proportion is a kind of mean and their significant tests are
similar to the mean tests (z test).
If the sample size n is large enough (i.e., both r and n−r should exceed 5), it is
reasonable to use the normal approximation. So, in practice the standard error of p
can be calculated as:
Se =
ˆ
p
(
1 −
ˆ
p
)
n
.
The appropriate margin of error is:
Margine of error = z
1−
α
2
ˆ
p
(
1 −
ˆ
p
)
n
The confidence interval is:
Point estimate ± Margin of error,
CI
(
p
)
=
ˆ
p ± z
1−
α
2
ˆ
p
(
1 −
ˆ
p
)
n
Since we are testing the null hypothesis, we can use the standard error of the
expected proportion if the null hypothesis is true, i.e.,
Se
(
p
0
)
=
p
0
(
1 − p
0
)
n
which is slightly different with Se
(
p
)
used for confidence interval (Altman, 1996,
p231).
We will have an approximately normal distribution under the null hypothesis.
Thus, in practice the test statistics is:
https://t.me/med1917

11.5 Comparing Population Proportion with a Fixed Proportion 243
z =
(
ˆ
p − p
0
)
Se
(
p
)
where p
0
is the “pre-specified” or “expected” proportion.
The above test statistic uses the continuous normal distribution as an
approximation to the discrete binomial distribution. If the variable only takes
integer values, we are allowed applying the above method with a small correction
of
1
2
to the observed frequency, which is called continuity correction.
z
c
=
|
ˆ
p − p
0
|
−
1
2n
Se
(
p
)
The continuity correction reduces the difference between the observed and
expected proportions. But if the s ample size increases, the effect of the correction
weakens.
Example 11.9 The Health Ministry has announced that the vaccination coverage
rate of Covid-19 is 22%. In a random sample of 800 residents of a city, 144 people
were vaccinated. Judge about the Ministry of Health’s claim based on this random
sample.
Solution: The following information is given in this exercise: n = 800, r = 144,
p
0
= 0.22,
ˆ
q = 1 − 0.18 = 0.82, the default significant level is 0.05, and z
1−
α
2
=
z
0.975
= 1.96.
As mentioned, rate is a kind of proportion and has a binomial distribution that
may accept two answers: “vaccinated and unvaccinated”. On the other hand, since
both r = 144 and n−r = 800–144 = 656 are greater than 5, the standard error of the
observed ratio is appropriate for calculating the confidence interval using t he normal
approximation as follows:
Se
(
p
)
=
p.q
n
=
0.18 × 0.82
800
= 0.0136.
The 95% confidence interval for proportion is:
CI95% = p ± z
1−
α
2
× Se
(
p
)
= 0.18 ± 1.96 × 0.0136 = 0.18 ± 0.027
=
(
0.153 to 0.207
)
According to this sample, the vaccination coverage of 22% is rejected for this
population, because the 95% confidence interval does not include the claim of the
Health Ministry (0.22).
Using the Test:
The null and alternative hypotheses are:
https://t.me/med1917

244 11 Hypothesis Testing
H
0
: p = 0.22
H
A
: p /= 0.22
Sample size is 800 and default significant level is 0.05.
Test statistic is:
z =
(
ˆ
p − p
0
)
Se
(
p
)
Critical value is z
0.975
= 1.96. If the test statistic is greater than the critical value
of 1.96, then we reject the null hypothesis (
H
0
).
The test statistic according to sample data is:
z =
(
0.18 − 0.22
)
0.0136
=−2.94
Since
|
−2.94
|
> 1.96
, then we reject the null hypothesis (H
0
).
The claimed coverage of vaccination in the population cannot be 22%.
This result was obtained exactly from the estimation of the confidence interval.
The test statistic with the continuity correction for the Covid-19 vaccination data
is:
z
c
=
|
0.18 − 0.22
|
−
1
2×800
0.0136
= 2.895,
which is slightly smaller than previous test statistic, because the sample size is
quite large.
To perform a significant test to compare the population proportion with a fixed
number in SPSS, first choose the path Analyze\Nonparametric tests\Legacy
Dialogs\Binomial to open a new window.
https://t.me/med1917

11.5 Comparing Population Proportion with a Fixed Proportion 245
In this window, we first select the name of the binomial variable which the sample
proportion should be estimated, from the list on the left, and move it to the box on the
right, called the “Test variable list”. If the data is entered as binary (1 and 0), mark
in the front of the “Get from Data” option, but if the data is entered in quantities or
polynomials, we specify a value as the cut point in the “Cut point” box. Then, write
the number to which the population proportion should be compared, in the “Test
Proportion” box. This number must be less than 1. Then, the program is run with
OK confirmation.
Descriptive statistics
N Mean Std. deviation Minimum Maximum
Vaccine 800 0.18 0.384 0 1
Binomial test
Category N Observed prop. Test prop. Exact sig. (one-tailed)
Vaccine Group 1 1 144 0.18 0.22 0.003
a
Group 2 0 656 0.82
Total 800 1.00
a
Alternative hypothesis states that the proportion of cases in the first group < 0.22
Example 11.10
The prevalence of asthma among women in a city was 15%. In a
random sample of 215 women who referred to the health center of that city, 39 of
them had a history of asthma. Based on this random sample, can it be said that the
prevalence of asthma in women in this city has not changed?
Solution: The following information is provided in this example:
p
0
= 0.15, n = 215, r = 39,
ˆ
p =
39
215
= 0.18,
ˆ
q = 1 − 0.18 = 0.82 and z
0.975
= 1.96.
As mentioned, the prevalence rate itself is a kind of proportion with the binomial
distribution that accepts both “asthmatic and healthy” responses. On the other hand,
since both
n = 215 and r = 39 are greater than 5, we use the normal approximation:
Se
(
p
)
=
p.q
n
=
0.18 × 0.82
215
= 0.026
And its 95% confidence interval is:
https://t.me/med1917

246 11 Hypothesis Testing
95%CI =
ˆ
p ± z
0.975
× Se
(
p
)
= 018 ± 1.96 × 0.026 =
(
0.129 to 0.231
)
Based on this sample, the prevalence rate of the population can be assumed to be
the same as 15%, because the above 95% confidence interval includes the previous
prevalence rate of 0.15.
Using the Test:
The null and alternative hypotheses are:
H
0
: p = 0.15
H
A
: p /= 0.15
Sample size is 215 and default significant level is 0.05.
Test statistic is:
z =
r
n
− p
o
p
o
(
1−p
o
)
n
:
Tip
When we are testing the null hypothesis and that hypothesis is true, the same
standard error of the expected proportion (
p
0
) should be used. In fact, it is like
when the variance of population is known (σ
2
= p
0
(
1 − p
0
)
.
It should be noted that when we are testing the null hypothesis, if that hypothesis
is true, the same standard error of the expected proportion (
p
0
) should be used. In
fact, it is like when the variance of population is known (
σ
2
= p
0
(
1 − p
0
)
).
Critical value is z
0.975
= 1.96. If the test statistic is greater than the critical value
of 1.96, then we reject the null hypothesis (
H
0
).
The test statistic according to sample data is:
z =
r
n
− p
o
p
o
(
1−p
o
)
n
=
39
215
− 0.15
0.15×0.85
215
=
0.031
0.024
= 1.29
Since 1.29 > 1.96, then we reject the null hypothesis (H
0
).
Based on this sampling, the prevalence rate of asthma among women in this
population has changed and it cannot be considered as 15%.
This result was obtained exactly from the estimation of the confidence interval.
https://t.me/med1917

11.6 Comparison the Proportions in Two Independent Groups 247
11.6 Comparison the Proportions in Two Independent
Groups
Comparison of observed proportions in two independent groups can arise in all
types of studies (observational or experimental) and is the most interested question
in clinical research.
Example 11.11 In a clinical trial, 20 out of 240 people who received the flu vaccine
and 80 out of 220 others who received the placebo became infected with the flu. Is
the proportion of infected people with the flu equal in both the vaccinated and the
unvaccinated groups?
Solution: The provided information in this exercise is:
n
1
= 240, r
1
= 20, p
1
=
20
240
= 0.083, q
1
= 1 − 0.083 = 0.917,
n
2
= 220, r
2
= 80, p
1
=
20
240
= 0.083, q
1
= 1 − 0.083 = 0.917,
To estimate 95% confidence interval for difference between proportions in the
two groups, the standard error of the difference is calculated as follows:
Se
(
p
1
− p
2
)
=
p
1
.q
1
n
1
+
p
2
.q
2
n
2
=
0.083 × 0.917
240
+
0.364 × 0.636
220
= 0.037
When the sample size and proportions are not small, i.e., r
1
, r
2
, n
1
−r
1
and n
2
−r
2
are all greater than 5, the sample distribution of
(
p
1
− p
2
)
has an approximately
normal distribution and the confidence interval can be obtained by the following
formula:
CI
(
1 − α
)
% =
(
p
1
− p
2
)
± z
1−
α
2
× Se
(
p
1
− p
2
)
In this case, 95% confidence interval is:
CI95% =
(
0.364 − 0.083
)
± 1.96 × 0.037 = 0.281 ± 0.073
=
(
0.208 to 0.354
)
This confidence interval does not include zero, so the proportion of people with
the flu in the two groups cannot be equated.
Using the Test:
Testing the hypothesis of equality of proportions in two groups means that under
the true null hypothesis, both groups are taken from the same population with a
proportion of p. Although we do not know the true value of p, then
p
1
and p
2
will
https://t.me/med1917

248 11 Hypothesis Testing
each be estimates of p, but our best estimate of p is when the two groups merge. That
is, it will be
n = n
1
+ n
2
and r = r
1
+ r
2
.
In this case:
n
1
+ n
2
= 240 + 220 = 460, r
1
+ r
2
= 20 + 80 = 100
p =
r
1
+ r
2
n
1
+ n
2
We calculate the grand proportion as: p =
100
460
= 0.217 and q = 1−0.217 = 0.783
Assuming that the proportion in each group is equal to p, the standard error of
(
p
1
− p
2
)
is calculated under the null hypothesis with the following formula:
Se
(
p
1
− p
2
)
=
p.q
n
1
+
p.q
n
2
=
p.q ×
1
n
1
+
1
n
2
In this example, we have:
Se
(
p
1
− p
2
)
=
p.q ×
1
n
1
+
1
n
2
=
0.217 × 0.783 ×
1
220
+
1
240
= 0.0385
As noted in previous section, this standard error is slightly different from that
calculated for confidence interval.
The sampling distribution of
(
p
1
− p
2
)
is approximately normal, and the test
statistic is:
z =
(
p
1
− p
2
)
Se
(
p
1
− p
2
)
The null and alternative hypotheses are:
H
0
: p
1
= p
2
H
A
: p
1
/= p
2
Sample size is 800 and default significant level is 0.05.
Test statistic is:
z =
(
p
1
− p
2
)
Se
(
p
1
− p
2
)
Critical value is z
0.975
= 1.96. If the test statistic is greater than the critical value
of 1.96, then we reject the null hypothesis (
H
0
).
The test statistic according to sample data is:
https://t.me/med1917
Соседние файлы в папке Библиотека им академика М.И. Перельмана
