In: Statistics and Probability
Kidneys and hearts - R code
In part of a study reported by Perotta and Finch (1972), the blood films of 16 patients with severe renal (kidney) anemia and 10 patients with functional heart disease were measured for red blood cell counts. The percentage changes in red blood cell counts appear below:
Renal anemia: 2.20, 1.52, 1.54, 0.77, 0.34, 0.45, 0.39, 0.29, 0.18, 0.16, 0.23, 0.24, 0.17, 0.08,0.02, 0.02.
Heart disease: 1.84, 0.44, 0.30, 0.06, 0.20, 0.14, 0.10, 0.09, 0.06, 0.04.
Because of non-normality, we'll do our analysis on the logs of the data. Suppose we wish to show that the mean log percentage change is greater for renal patients than for heart patients.
(a) Write down mathematical null and alternative hypotheses for such a test. Carefully define the parameters you use.
(b) Calculate the observed test statistic and the degrees of freedom for an appropriate test.
(c) Find a P-value for your test. What does it tell you about severe renal anemia, functional heart disease, and red blood cell counts?
(d) Find a 95% confidence interval for the difference in the means of the log percentage changes.
Transform the confidence interval back to the original scale. What does your interval tell you quantitatively about the difference in the distributions of red blood cell count changes between the two types of patients?
GIven data is
Renal anemia: 2.20, 1.52, 1.54, 0.77, 0.34, 0.45, 0.39, 0.29, 0.18, 0.16, 0.23, 0.24, 0.17, 0.08,0.02, 0.02.
Heart disease: 1.84, 0.44, 0.30, 0.06, 0.20, 0.14, 0.10, 0.09, 0.06, 0.04.
Log transformed data is
Renal anemia | Heart disease |
0.78845736 | 0.609766 |
0.418710335 | -0.82098 |
0.431782416 | -1.20397 |
-0.261364764 | -2.81341 |
-1.078809661 | -1.60944 |
-0.798507696 | -1.96611 |
-0.94160854 | -2.30259 |
-1.237874356 | -2.40795 |
-1.714798428 | -2.81341 |
-1.832581464 | -3.21888 |
-1.46967597 | |
-1.427116356 | |
-1.771956842 | |
-2.525728644 | |
-3.912023005 | |
-3.912023005 |
Let
be mean log percentage change for the renal patient
be mean log percentage change for the Heart patient
a) Null Hypothesis :
: =
Alternate Hypothesis :
: >
b) We will use an independent sample t-test for this analysis.
Test statistic is
Here
SS1: 27.68
SS2: 11.84
df1 = N - 1 = 16 - 1 = 15
df2 = N - 1 = 10 - 1 = 9
s2p == 1.65
= : -1.33
= -1.85
t = 1.02
c) The p-value is .159316 which is greater than 0.05 so we do not reject H0 and conclude that mean log percentage change for the renal patient is not greater than mean log percentage change for the Heart patient.
d) 95% Confidence interval is (-0.5408643, 1.5946243)
Back transformed confidence interval is
that is (0.5822, 4.92647)
This interval suggests that 95% of times difference in mean log percentage change for the renal patient and mean log percentage change for the Heart patient will lie in this region.