You are on page 1of 35

Power and sample size case study: dialysis

Dr Alberto Corrias

Department of Biomedical Engineering. National University of Singapore

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 1 / 35
PollEv game standings

Overall standing after 4


Lucky draw next week based on week
4 and 5 answers

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 2 / 35
End Stage Renal Disease (ESRD) and Dialysis


Image by Yassine Mrabet is licensed under CC BY-SA 3.0
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 3 / 35
Dialysis and heart disease

Key message
Dialysis patients are at high risk of cardiac disease. Interaction
between blood and artificial materials during dialysis may play a role?

https://youtu.be/CX8uI4NVLYw https://youtu.be/AgF_GMwJlMA

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 4 / 35
ORAIP: what are these?

ORAIP = Oxidative Stress-Responsive Apoptosis Inducing Protein

Oxidative stress is ”defined as a disturbance in the balance between


the production of reactive oxygen species (free radicals) and
antioxidant defenses” †

Apoptosis is a sequence of cellular events that lead to cell death


(”cell suicide”).

In short (and informally): when the cell is exposed to oxidative stress,


it produces ORAIP and certain cells around the body (e.g., heart
muscle cells† ) may die.


Betteridge D.J, What is oxidative stress? Metabolism. 2000 Feb;49(2 Suppl 1):3-8.

Yao T et al. Oxidative Stress-Responsive Apoptosis Inducing Protein (ORAIP) Plays a Critical Role in High
Glucose-Induced Apoptosis in Rat Cardiac Myocytes and Murine Pancreatic β-Cells. Cells 2017 Oct 18;6(4).
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 5 / 35
What causes oxidative stress?
Three major causes†
1 xenobiotics (”foreign substances”)
2 immune system activation
3 exposure to radiations


Francois Gagne. Biochemical Ecotoxicology Principles and Methods. Academic Press. 2014. Credits for the
image: wikimedia commons
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 6 / 35
Our case study: key questions

1 Do ORAIP levels differ between ESRD patients and control


group?
2 Does dialysis affect ORAIP levels?


Tanaka et al. Kidney International Reports (2016) 1, 321–326
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 7 / 35
ORAIP data: control versus dialysis patients

ORAIP data (ng/ml)


Dialysis patients (n=62) Control (n=40)
109.07 11.21
70.78 14.46
73.48 34.28
112.54 46.89
92.18 54.24
60.60 30.78
109.25 0.77
87.74 22.71
... ...
87.96

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 8 / 35
ORAIP data: control versus dialysis patients

Difference is very obvious: we will expect a very small p value (but we


must still do the calculations...)
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 9 / 35
ORAIP data: control versus dialysis patients

We first do a standard independent t test (same as week 3). We shall


assume equal variance.
H0 : Mean ORAIP concentration is the same in ESRD patient
and control group (µESRD = µcontrol )
H1 : Mean ORAIP concentration is NOT the same in ESRD
patient and control group (µESRD 6= µcontrol )
We calculate XESRD = 91.4, Xcontrol = 21.9, sESRD = 15.04,
scontrol = 14.98.

XESRD − Xconrol
tstat = p = 22.84
sp 1/nESRD + 1/ncontrol
q 2 2
(nESRD −1)sESRD +(ncontrol −1)scontrol
where sp = nESRD +ncontrol −2 = 15.02

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 10 / 35
Determination of tcrit using tables - same as week 3

We choose α = 0.05 to
identify tcrit = 1.98

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 11 / 35
Performing the Student t test (95%) - same as week 3

T (100)

Area = 0.025 Area = 0.025

-22.84 −1.98 0 1.98 22.84


Rejection Region No Rejection Region Rejection Region

|t| > tcrit : we reject the NULL hypothesis (22.84 >> 1..98!)
The sum of the areas in purple is the p-value (very small here)
Without further computations, we already know p < 0.05
The exact p-value can be easily computed by any software or
approximated using tables. In this case, p ∼ 10− 41
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 12 / 35
Power of the test

Before conducting the study, the investigators did not know that
there was such a difference between in ORAIP between control and
ESRD patients. One interesting question for them could have been
Before conducting the study
If the difference in ORAIP is only δ = 5ng /ml, what are the chances
that our test (ncontrol = 40, nESRD = 62, assume σ ∼ sp = 15.02) will
fail to detect such an effect?

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 13 / 35
Power of the test: calculations

The center of the of the t distribution when µESRD − µcontrol = δ = 5


is
δ 5
D= p = p = 1.64
σ 1/ncontrol + 1/nESRD 15.02 1/40 + 1/62

−1.98 0 1.98

t ∗ = 1.98 − 1.64 = 0.34

The area in green = β

0 1.64

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 14 / 35
Power of the test: calculations

0 0.34
The power of our test is given by the area under the curve to the
right of 0.34 of the Student t distribution with 62 + 40 − 2 = 100
degrees of freedom. Any statistical software (e.g., Python cdf
function) can calculate such area. Result is 0.366.
Interpretation
If the difference in ORAIP is δ = 5ng /ml, the chances that our test
(ncontrol = 40, nESRD = 62, assuming σ ∼ sp = 15.02) will detect the
effect are 36.6% (β = 100 − 36.6 = 64.4% of missing the effect by
failing to reject the NULL hypothesis).

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 15 / 35
Determinants of the power of a test

The plot on the left has δ on the x


axis and power on the y axis. The
black curve was calculated with
ncontrol = 40 and nESRD = 62. Which
of the following is plausible for the
purple curve?
A ncontrol = 140 and nESRD = 162
B ncontrol = 40 and nESRD = 80
C ncontrol = 40 and nESRD = 20
Answer:Option c is the only possible one (n decreases).

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 16 / 35
Determinants of the power of a test

Our test was conducted with ncontrol = 40, nESRD = 62 and yielded a
power of 0.366. Assuming the same values of σ and δ, what is a
plausible value for the same test with ncontrol = 62, nESRD = 40
A 0.1
B 0.6
C 0.366
δ
Answer:0.366. Assuming the same σ, D = √1 will not
σ /ncontrol +1/nESRD
change by swapping nESRD with ncontrol

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 17 / 35
Power versus δ (ncontrol = 40, nESRD = 62, σ ∼ sp = 15.02)

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 18 / 35
Power versus n (σ ∼ sp = 15.02)

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 19 / 35
Determinants of the power of a test

After collecting data for a 2-sample hypothesis test at the 95%


significance level, I calculated the power of the test to be 0.8. For the
same test at 99% confidence level, which of the following is a
plausible value of the power
A 0.4
B 0.9
C 0.8
D 1.1

Answer: 0.4. Power will decrease (tcrit increases).

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 20 / 35
Determinants of the power of a test

95%
−tcrit 0 95%
tcrit

0 D

99%
−tcrit 0 99%
tcrit

0 D

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 21 / 35
Power versus σ

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 22 / 35
Calculation question (3 points)

I want to check whether blood sugar levels are the same


or different between healthy individuals and ESRD
patients. The data on the right were collected from
healthy individuals. What is the minimum number of
ESRD patients (nESRD ) that I need to enrol if I want to Blood sugar (mM)
achieve a power of at least 0.5 (50%) to be able to detect 3.9
a difference in blood sugar of δ = 0.45mM? Assume
4.5
σ = scontrol where scontrol is the sample standard deviation
4.0
of the control group in the table and assume a 95%
3.4
confidence level throughout (α = 0.05). Hint 1: use the
3.9
Student t table uploaded to LumiNUS or Python to
4.1
determine the values of tcrit . Hint 2: consider only cases
where nESRD > 2. Hint 3: Note that you can solve this
particular problem (involving power of 50%) without
Python stats.t.cdf function to compute exact areas for
you. Hint 4: Remember the dof of the t distribution...

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 23 / 35
Calculation question: answer

3.9 + 4.5 + 4.0 + 3.4 + 3.9 + 4.1


X = = 3.97
6
s
(3.9 − 3.97)2 + (4.5 − 3.97)2 + (4.0 − 3.97)2 + ...
scontrol = = 0.356
6−1
For this problem we will have
σ = 0.356
δ = 0.45
ncontrol = 6, nESRD to be determined
α = 0.05
t ∗ = tcrit − D with tcrit determined based on ncontrol + nESRD − 2
dof.
δ
D= p
σ 1/ncontrol + 1/nESRD
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 24 / 35
Calculation question: answer
The key idea for this problem: power will increase with n. In the
diagram, t ∗ is positive. As n increases, D will move the right, tcrit will
move to the left and, therefore, t ∗ will de-
crease until it hits 0. When t ∗ ≤ 0, we have a power of at least 50%.

−tcrit 0 tcrit

t ∗ = tcrit − D

The area in green = β

0 D
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 25 / 35
Calculation question: answer

You may have either proceeded sequentially, from nESRD = 3 onward


or ”try your luck” jumping ahead and backward with values of nESRD .
Calculations yield
nESRD = 3. dof = 7. tcrit = 2.365. D = 1.788.
t ∗ = 2.365 − 1.788 = 0.577 > 0. Power < 0.5
nESRD = 4. dof = 8. tcrit = 2.306. D = 1.959.
t ∗ = 2.306 − 1.959 = 0.347 > 0. Power < 0.5
nESRD = 5. dof = 9. tcrit = 2.262. D = 2.088.
t ∗ = 2.262 − 2.088 = 0.174 > 0. Power < 0.5
nESRD = 6. dof = 10. tcrit = 2.228. D = 2.190.
t ∗ = 2.228 − 2.190 = 0.038 > 0. Power < 0.5
nESRD = 7. dof = 11. tcrit = 2.201. D = 2.273.
t ∗ = 2.201 − 2.273 = −0.072 < 0. Power > 0.5
The answer is that we need to recruit at least 7 patients.

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 26 / 35
ORAIP before and after dialysis

ORAIP data (ng/ml)


Patient # Before dialysis After dialysis Difference
1 109.07 88.90 20.17
2 70.78 75.75 -4.97
3 73.48 141.40 -67.92
4 112.54 73.28 39.26
5 92.18 77.03 15.15
6 60.60 88.35 -27.75
7 109.25 119.79 -10.54
8 87.74 89.25 -1.51
... ... ... ...
62 87.96 102.43 -14.47

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 27 / 35
About the paired t test

If the ORAIP data AFTER the dialysis session were collected from a
group of patients that is completely different from the group of
patients used for the ORAIP data before the dialysis session, would
you still use a paired t test for your analysis? Why?

Answer: No, paired t test is only used when data are collected from
the same patient before and after a treatment.

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 28 / 35
ORAIP before and after dialysis

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 29 / 35
Paired t test steps
H0 : mean difference between before and after = 0
H1 : mean difference between before and after 6= 0
1 Compute average of the differences
20.17 − 4.97 − 67.92 + 39.26 + ...
X diff = = −9.48
62
2 Compute standard deviation of the differences
s
(20.17 − (−9.48))2 + (−4.97 − (−9.48))2 + ...
sdiff = = 24.5
62 − 1

3 Compute the test statistic

X diff − 0
tstat = √
sdiff / 62
= −3.05

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 30 / 35
Determination of tcrit using tables

We choose α = 0.05
to identify tcrit ∼ 2.000
(dof is actually 61)

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 31 / 35
Performing the paired t test

T (61)

Area = 0.025 Area = 0.025

-3.05 −2.0 0 2.0 3.05


Rejection Region No Rejection Region Rejection Region

|t| > tcrit : we reject the NULL hypothesis


The sum of the areas in purple is the p-value.
Without further computations, we already know p < 0.05
The exact p-value can be easily computed by any software or
approximated using tables.
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 32 / 35
How results are reported


Note that the numbers in the paper are different from our case study because I had no access to the original data
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 33 / 35
How results are reported


Note that the numbers in the paper are different from our case study because I had no access to the original data
BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 34 / 35
Lecture Summary

1 Intro on Dialysis and ORAIP

2 Power of a Student t test

3 Example of a paired t test

BN2102 Bioengineering Data Analysis Power and sample size case study: dialysis 35 / 35

You might also like