Anda di halaman 1dari 12

BIOSTATISTICS (L-7)

Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)

THE BRITISH UNIVERSITY IN EGYPT (BUE)

FACULTY OF PHARMACY
Biostatistics - Lecture 7

Testing hypotheses about the

difference between two
population parameters
Two-sample t test: Student's t test for independent, un-paired samples:
Used to test whether or not the difference between two independent
population means is zero (i.e. the two means are equal).
The null assumption is that it is.
Independent: means that an individual in one sample is unrelated to
any particular individual in the other sample.

Matched or Paired

To use this test:

1. Both variables must be metric and normally distributed (this is a
parametric test).
2. In addition the two population standard deviations should be similar
(but for larger sample sizes this becomes less important).

1
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

STEP 1: TO TEST FOR EQUALITY OF VARIANCES (F TEST):

Calculate F(calc) = S12(large) / S22(small) this is called the variance
ratio test (or F test).
F(calc) should be less than F(tab) at p=0.05 and (n1-1) & (n2-1) i.e:
NOT significantly different. If not follow the steps in page 3.
If this assumption is satisfied then calculate the common
variance which is the weighted mean S2 of the two variances:
S2 = (n1-1) S12 + (n2-1) S22 / (n1+n2-2)

STEP 2: TO TEST THE DIFFERENCE BETWEEN TWO SAMPLE MEANS:

2
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

If the two variances are SIGNIFICANTLY DIFFERENT, i.e: F(calc) is

equal to or more than F(tab), we have two situations:

A- If sample size is large; i.e. both n1 and n2 20

3
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

N.B.

1- NOTE that after ln or log transformation, the conclusion SHOULD be

written as follows:

The difference is/is not significant after log (or Ln) transformation (The
antilog/ anti Ln of the mean & SD should be calculated in this case).

2- The EXACT P-value can be determined using Statistical Software

Programs.

3- In all the above cases, if the difference between the two means is
significant, you can test if its highly significant or not, by comparing or
using T(tab), at p = 0.01, two tailed and df = n1+n2-2

4
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

5
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

WORKING EXAMPLES

Example 1:

The table shows number, mean and variance of two independent samples.
Test the significance of difference between the two means.

Sample 1 2
Number 9 19
Mean 22 27
Variance 30 56

F(tab) = 3.15 therefore, NOT Significant.

2- S2 = [(8*30)+(18*56)]/(9+19-2) = 48

which includes zero NOT Significant.

6
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

Example 2:

The table shows number, mean and variance of two independent samples.
Test the significance of difference between the two means.

Sample 1 2
Number 9 19
Mean 22 29
Variance 30 56

1- F(calc)= 56/30= 1.87

F(tab) = 3.15 therefore, NOT Significant.

2
2- S = [(8*30)+(18*56)]/(9+19-2) = 48

Both are positive, does not include zero, therefore SIGNIFICANT.

7
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

Example 3:

The table shows number, mean and variance of two independent samples.
Test the significance of difference between the two means.

Sample 1 2
Number 20 22
Mean 22 27
Variance 30 69

F(calc) = 2.3 which is significant compared with F(tab) = 2.12.

95% CL = 5 2.02*2.15 = 0.65 9.35 it is SIGNIFICANT

8
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

Example 4:

The table shows number, mean and variance of two independent samples.
Test the significance of difference between the two means.

X1 X2 LnX1 LnX2
85 4.4427

80 4.3820
81 195 4.3944 5.2730
87 186 4.4659 5.2257
79 209 4.3694 5.3423
65 208 4.1744 5.3375
90 240 4.4998 5.4806
94 274 4.5433 5.6131
80 267 4.3820 5.5872
91 227 4.5109 5.4250
81 274 4.3944 5.6131
90 225 4.4998 5.4161
95 251 4.5539 5.5255

Number 13 11 13 11
Sum 1098 2556 57.613 59.839
Mean 84.46 232.36 4.4318 5.4399
Variance 65.44 984.05 0.0102 0.0185
SD 8.09 31.37 0.1008 0.1361
CV% 9.58 13.50 2.2753 2.5017
15.04 1.822

F(tab) 2.75 sig Not-sig

9
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

T(tab) = 1.717 significant & very highly significant after ln

transformation at p<0.001

10
Mohey Elmazar
Professor of Pharmacology & Toxicology
Dean of Pharmacy (BUE)
Biostatistics - Lecture 7

Lecture checklist:
Student's t test for independent, un-paired samples
Testing for equality of variances (Step 1)
Testing for the difference between 2 sample means (Step 2)
Summary