Example 1

Transcription

Example 1
PubH 6414 Worksheet 10: Inference for Means from Paired Data or Two Groups
1 of 4
Example 1
The text works through the steps for a confidence interval and a paired t-test of the mean
difference in 7-HCO(ng/mL) from ‘before’ to 1 month after cholecystectomy for 51 patients
(Sauter study). Data from this study for 7-HCO(ng/mL) at 3 months after cholecystectomy are
also available.The 3-month minus ‘before’ differences were calculated for each patient.
Reference: Dawson B, Trapp RG. (2004). Chapter 5. Research Questions About One Group. In,
Basic & Clinical Biostatistics. 4th ed. New York: McGraw-Hill.
Summarized below are the sample mean and SD of the difference, the SE(diff) and the critical
value for a two tailed test with  = 0.05. Use the data below to answer the questions.
Sample Mean Difference
SD of differences
SE(diff)
critical value for α=0.05
27.27
27.91
3.91
2.01
a. What is the correct t-test to use to test the null hypothesis of no mean change in 7-HCO
from ‘before’ to 3 months after cholecystectomy?
paired t-test for the mean difference – this is usually just called a ‘paired t-test’.
b. State the null hypothesis and the alternative hypothesis for this test.
Homean difference = 0)
HA: ≠mean difference is not equal to 0)
c. Calculate the SE(diff).
SE(diff) = SD/sqrt(n) = 27.91/sqrt(51) = 3.908182 = 3.91
d. The critical value is from the t- distribution with n-1 = 50 df.
e. Calculate the test statistic for this test.
t = 27.27/3.91 = 6.97
f. Is the null hypothesis rejected? Why or why not?
Yes, we reject the null hypothesis. The critical values of this two-tailed test are 2.01 and
-2.01. The test statistic = 6.97 which is greater than 2.01. The test statistic is in the right
tail rejection region of the distribution of the test statistic so the null hypothesis of ‘no
mean change’ in 7-HCO from before to 3 months after cholecystectomy is rejected.
PubH 6414 Worksheet 10: Inference for Means from Paired Data or Two Groups
2 of 4
g. If the null hypothesis is rejected, indicate whether there was a mean increase or decrease
in 7-HCO from ‘before’ to 3 months after cholecystectomy.
There was a significant mean increase in 7-HCO.
We know that there was a mean increase because the mean ‘3-month’ minus ‘before’
difference is positive indicating that, on average, patients had an increase in 7-HCO
from ‘before’ to 3 months after cholecystectomy. If the difference had been calculated as
‘before’ minus ‘3-month’, a negative mean difference would indicate an increase.
h. Construct a 95% confidence interval for the population mean difference in 7-HCO from
before to 3 months after cholecystectomy.
95% CI = mean difference ± coefficient*SE(diff) = 27.27 ± 2.01*3.91 = (19.41, 35.13)
The confidence coefficient for a 95% CI is the same as the critical value for a two-tailed
t-test with  = 0.05. The same SE(diff) is used to calculate the t-statistic and in the
confidence interval formula. The 95% confidence interval limits are consistent with the
paired t-test result of rejecting the null hypothesis of ‘no mean change’. The value 0
(indicating ‘no mean change’) is not contained between the interval limits so you would
conclude that there was a significant mean increase from before to 3 months after
cholecysectomy.
PubH 6414 Worksheet 10: Inference for Means from Paired Data or Two Groups
3 of 4
Example 2
The text works through the steps for a 95% confidence interval of the difference in mean pulse
oximetry between Emergency Department patients with suspected pulmonary embolism (PE)
and those without suspected pulmonary embolism (no PE).
Reference: Dawson B, Trapp RG. (2004). Chapter 6. Research Questions About Two Separate or
Independent Groups. In, Basic & Clinical Biostatistics. 4th ed. New York: McGraw-Hill.
Data used for this confidence interval are summarized below.
Pulse
oximetry
Mean
SD
PE yes
n=181
93.4
5.9
PE no
n=740
95.8
4
The pooled SD was calculated for the difference of the two means = 4.44
The confidence coefficient for a 95% CI of the difference of means = 1.96
a. Write out the null hypothesis and the alternative hypothesis for this test
Homeans are equal in the two groups)
HA : ≠means are not equal in the two groups)
b. Calculate the SE(diff of means).
c. Calculate the t-statistic for a two sample t-test of the difference of means assuming equal
variance.
d. What are the critical values of a two-tailed test of the null hypothesis that the difference
of means = 0? Use alpha significance level = 0.05.
± 1.96 for a test with  = 0.05
The critical values for a two-tailed test with  = 0.05 are the same as the confidence
coefficients for a 95% confidence interval.
e. Based on the test statistic and critical values is the null hypothesis rejected? Why or why
not?
The null hypothesis of ‘no difference between the means is rejected because the test
statistic, -6.52, is in the left tail rejection region: -6.52 is < -1.96.
PubH 6414 Worksheet 10: Inference for Means from Paired Data or Two Groups
4 of 4
f. Are the test results consistent with the conclusion from the 95% confidence interval of
the difference in means? The 95% confidence interval constructed in the text is (1.67,
3.13).
Yes – you would conclude from this confidence interval that there is a significant
difference between the means because 0, the value indicating ‘no difference in means’ is
not contained between the 95% confidence interval limits.
g. The test statistic has a t-distribution with 181 + 740 – 2 = 919 df
Notice that the critical values on the t-distribution with large df are the same as the
critical values on the standard normal distribution. As the sample size increases, the tdistribution approaches a standard normal distribution.
h. Write out a conclusion and summary statement for the t-test of the difference in mean
pulse oximetry between patients with and without suspected PE.
Results of a two-sample t-test (with alpha = 0.05) of the difference in mean pulse
oximetry between Emergency Department patients with and without suspected
pulmonary embolism (PE) indicate that mean pulse oximetry is significantly lower for
patients with suspected PE.
You could find the find p-value corresponding to the test statistic.
p-value = 5.844292e-11 < 0.0001
Rcmdr: Distributions > Continuous Distributions > t distribution > t probabilities
Variable value = t; df = 919; select Lower tail
R script: pt(t, df=919)