0% found this document useful (0 votes)
16 views33 pages

Lecture - 4 (07-05-2023)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views33 pages

Lecture - 4 (07-05-2023)

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 33

Biostatistics (3 Credit hours)

Spring 2023
Session 4
NUR International University, Lahore

Instructor: Muhammad Zain Ul Abidin


M.Sc. Biostatistics (PU)
MPH (UEF)
([email protected])
HYPOTHESIS TESTING

 Comparing two groups


 Comparing two means: independent samples
 Paired comparisons: dependent samples
Student’s t-test

 Independent samples
 Uses means of both groups.
 Sample size may not be equal.

 Paired sample
 Uses difference between member of each pair
 Sample size must be equal.
HYPOTHESIS TESTING
INDEPENDENT SAMPLES
Testing for differences of two means
 Are both samples/groups similar or not with regard to tested
variable?
 The population mean is not known, but it can be supposed
that the mean of one of the two samples estimates it.
 The mean of sample estimating the population mean may happen
to be identical with the population mean, but it more probably lies
somewhere above or below the population, and there is 95%
chance that it is within ± 1.96 × SEM of the population mean.
 If the other sample comes from same population, its mean will also
have a 95% chance of lying within ± 1.96 × SEM of the population
mean.
Testing for differences of two means: t-test
 Tests whether a difference between two groups is statistically significant.
 Assumptions: Data collected randomly. Populations are normally distributed
Samples are independent of each other. Samples may come from same populations
or different populations. Both samples have equal variances.
 Test statistic: t = difference of means/SE of difference
 Difference of means = difference of means of both groups.
 SE of difference = difference of standard error of means of both groups.

 Test-statistic:
Independent samples t-test
 Example:
One of the inquiries of interest for Rossi et al. 2006 was whether patients with
primary hypertension on the average, have higher total cholesterol levels than
normotensive patients (research hypothesis)? Following table shows total cholesterol
levels (mg/dl) for 133 primary hypertensive patients and 41 normotensive patients.
 Assumptions: Samples are independent of each other. Dependent variable
(cholesterol) is normally distributed. Variances are same. Samples come from
same population.
 Hypotheses:
 H0: Primary hypertensive patients have higher mean cholesterol levels

equal of less than normotensive patients (H0: 𝑥1 ≤ 𝑥2 ).


 H1: Primary hypertensive patients have higher mean cholesterol levels

than normotensive patients (H1: 𝑥1 > 𝑥2 ).


Independent samples t-test
Independent samples t-test
Independent samples t-test
 𝑥1 = 215.44 , 𝑥2 = 193.20
 S1 = 30.413 & S2 = 33.045

 =

 Z-statistic does not need degrees of freedom. Calculated z-score is compared


with z-score in t-distribution table, using α=0.05 (one-sided test).
 3.839 > 1.645, H0 will be rejected and we conclude that patients with

primary hypertension have on average higher cholesterol levels than


normotensive patients.
Independent samples t-test : n > 30

Degrees of freedom are not needed if n >30. For critical z-scores only level of significance
and direction of test needed,. If n ≤ 30 degrees of freedom = (n1 – 1) + (n2 – 1)
Confidence intervals for test of significance

 In independent samples t-test confidence intervals for both sample


means can be used for test of significance.
 If both confidence intervals overlap difference is insignificant (H0 is
not rejected ), and if they do not overlap difference is statically
significant (H0 is rejected).

 95% confidence intervals calculated as: mean ± 1.96 × SEM


 210.23 ── 220.66 (primary hypertensive)
 182.76 ── 203.63 (normotensive)
 Confidence intervals do not overlap, so difference in mean cholesterol levels
between two groups is statically significant and we may conclude primary
hypertensive subjects have on average higher cholesterol levels than
normotensives.
SPSS analysis: Variables

In values groups are coded:


1 = Primary hypertensives
2 = Normotensives
SPSS analysis: Data

All the values are entered (Primary hypertensive = 133,


Normotensive = 41) and coded as 1 & 2 respectively
SPSS analysis: Confidence intervals
 Using explore function in descriptive statistics. Go to statistics and check 95% CI.

 All the descriptive values are given in “descriptives” box including CIs for both
samples
SPSS analysis: t-test
 Analyze compare means  independent samples t-test  define groups as 1 ,2.

Levene’s test of equality of variances


 shows variances were not equal as p-value
= 0.949 > 0.05. null hypothesis for
equality of variances was not rejected.
Hence, t-statistic will be considered for
assumption of un-equal variances. P-value
for t-test is 0.000 <0.05 so null hypothesis
will be rejected.
SPSS analysis: t-test
 Analyze compare means  independent samples t-test  define groups as 1 ,2.

Levene’s test of equality of variances


 shows variances were not equal as p-value
= 0.949 > 0.05. null hypothesis for
equality of variances was not rejected.
Hence, t-statistic will be considered for
assumption of un-equal variances. P-value
for t-test is 0.000 <0.05 so null hypothesis
will be rejected.
HYPOTHESIS TESTING
PAIRED SAMPLES
t-test: Paired comparison or related samples test
 Matched pairs in randomized trials or in case-control studies.
 Or a subject serves his/her own control: i.e., repeated measurements , case cross over
study.
 Uses difference between the members of each pair. So the variable of interest is
difference between pairs of observations ( di ).
 Test statistic for testing hypotheses about population mean difference μd :

 divided by 𝑛
t-test: Paired comparison or related samples test

 Assumptions: Sample collected randomly from a population


with normal distribution. Since samples are related, assumption
about equality of variances is not needed i.e., variable of
interest is difference between readings in the same individual,
or, matched individuals. Hence only one variable is involved.
t-test: Paired comparison or related samples test
Noting the paucity of information on the effect of estrogen on platelet membrane
fatty acid composition, Ranganath et al. conducted a study to examine the possibility
that changes may be present in postmenopausal women and that these may be
reversible with estrogen treatment. The 31 women recruited had not menstruated for
at least 3 months or had symptoms of the menopause. No woman was on any form of
hormone replacement therapy (HRT) at the time of recruitment. The following are the
platelet membrane linoleic acid values before and after a period of HRT:
t-test: Paired comparison or related samples test
 Hypotheses (possibly two sided):
 H0: there is no change in mean platelet membrane linoleic acid before and after

HRT (H0: 𝑥𝑏𝑒𝑓𝑜𝑟𝑒 = 𝑥𝑎𝑓𝑡𝑒𝑟 )


 Or H0: 𝑑𝑖 = 0
 H1: The mean platelet membrane linoleic acid is different (either lowered or
increased) between before and after HRT (H1: 𝑥𝑏𝑒𝑓𝑜𝑟𝑒 ≠ 𝑥𝑎𝑓𝑡𝑒𝑟 )
 Or H1: 𝑑𝑖 ≠ 0 (research hypothesis)
 Hypotheses (one sided will be):
 H0: there is no change in mean platelet membrane linoleic acid is lowered or

remains same after HRT (H0: 𝑥𝑏𝑒𝑓𝑜𝑟𝑒 ≥ 𝑥𝑎𝑓𝑡𝑒𝑟 )


 Or H0: 𝑑𝑖 ≥ 0
 H1: The mean platelet membrane linoleic acid is increased after HRT.
(H1: 𝑥𝑏𝑒𝑓𝑜𝑟𝑒 < 𝑥𝑎𝑓𝑡𝑒𝑟 )
 Or H1: 𝑑𝑖 < 0 (if mean difference increases after HRT, research hypo)
t-test: Paired comparison or related samples test

 Test statistic: , hypothesized population mean is = 0

 t = z (as, n >30) = 3.643


 Hence, 3.643 > 1.96 at α = 0.05 and two-sided distribution of z statistic.
 H0 will be rejected.

 Conclusion:
 The mean value of platelet membrane linoleic acid is different after HRT.
 and for one-sided research hypothesis (mean value increased after HRT),
then we may conclude HRT increases platelet membrane linoleic acid
volume in postmenopausal women or women with symptoms of
menopause.
SPSS analysis: t-test (paired samples)
 Analyze compare means  paired samples t-test 


SPSS analysis: t-test (paired samples)
 P-value = .001 (divided by two if one-sided test) < α, H0 will be rejected!
Paired test: confidence interval method

 A 90 or 95% confidence interval can be calculated for the mean difference (𝑑𝑖 )
 If confidence interval contains 0 (hypothesized population mean) inside of it
then: no difference between samples (H0 will not be rejected) i.e., insignificant
results
 If both lower and upper bounds of the interval are negative (below 0) or positive
(above 0) then results are significant, i.e. H0 is rejected.
 Mean ± 1.96 × SEM ( for 𝑑𝑖 )
 0.5100 ± 1.96 × 0.1400
 CI = 0.22407 - 0.79593
 Interval does not contain 0 as hypothesized population mean. So, H0 will be
rejected and we say results are statistically significant.
HYPOTHESIS TESTING
QUIZ
WHICH TEST TO BE USED?
EXPLAIN WITH REASONS
Which test to be used? (1)
Dora et al. investigated spinal canal dimensions in 30 subjects symptomatic with disc herniation
selected for a discectomy and 45 asymptomatic individuals (control group). One of the areas of
interest was determining if there is a difference between the two groups in the spinal canal
cross-sectional area (cm2) between vertebrae L5/S1. The data in the following table are
simulated to be consistent with the results reported in the paper. Do these simulated data
provide evidence for us to conclude that a difference in the spinal canal cross-sectional area
exists between a population of subjects with disc herniations and a population of those who do
not have disc herniations
Which test to be used? (2)
Some researchers have observed a greater airway resistance in smokers than in nonsmokers.
Suppose a study, conducted to compare the percent of tracheobronchial retention of particles in
smoking discordant monozygotic twins, yielded the following results:

Do these data support the hypothesis that tracheobronchial clearance is slower in smokers?
Which test to be used? (3)
A study by Bell investigated the hypothesis that alteration of the vitamin D–endocrine system
in blacks results from reduction in serum 25-hydroxyvitamin D and that the alteration is
reversed by oral treatment with 25-hydroxyvitamin D3. The eight subjects (three men and five
women) were studied while on no treatment (control) and after having been given 25-
hydroxyvitamin D3 for 7 days (25-OHD3). The following are the urinary calcium (mg/d)
determinations for the eight subjects under the two conditions.
Which test to be used? (4)
Hartard et al. conducted a study to determine whether a certain training regimen can counteract
bone density loss in women with postmenopausal osteopenia. The following are strength
measurements for five muscle groups taken on 15 subjects before (B) and after (A) 6 months of
training:
Answers of quiz
 1. Independent samples test: From data it is clear sample sizes are not equal,
both samples are independent groups either from same or different populations.
Two independent groups, one with disc herniations and the other without
disc herniations (controls). A two-sided test.
 In many case control studies a paired samples test is used in which both

“separate” groups are given some kind of same treatment etc. In above
example both controls and disc herniations groups are independent and
are tested for a variable of interest.

 2. Sample size is equal but this is not a paired test as there are two separate
groups, smoking and non-smoking twins are tested for a variable
(tracheobronchial clearance). This is one sided independent samples test.
Answers of quiz
 3. A paired samples test as data says total 8 subjects were taken and were given
oral treatment with 25-hydroxyvitamin D3 to reverse the condition. Every
subject has its own control in that case. Since this was about to reverse the
condition so possibly it is one-sided test.

 4. Data and research hypothesis says its one-sided paired sample test. Three
paired tests for the effectiveness of a training regimen to counteract bone
density loss on three different body regions.

You might also like