You are on page 1of 32

UNIVERSITAS

GADJAH MADA

Introduction to Biostatistics: Laboratory Excercise 5

Hipothesis Testing
Continues Data
Prof. Siswanto Agus Wilopo
Faculty of Medicine, Public Health and Nursing,
Universitas Gadjah Mada,
Yogyakarta
Departement of Biostatistics, Epidemiology and Population Health
Table of Contents

1 Learning Objectives
2 Activities
3 Exercise in Class
Hypothesis Tests: I
Hypothesis Tests II
Hypothesis Tests: III
Exercise with data using stata
4 Homework
5 Output
6 Required Reading

UNIVERSITAS
GADJAH MADA 2 of 32
Learning Objectives

Upon completion of the course unit, students should be able to:


a. describe unknown population parameters, based on observed
sample data with continues measure
b. apply concepts of statistical inference on interval estimation for
continues data
c. describe relationships between hypothesis testing and interval
estimation
d. apply concepts of statistical inference on hypothesis testing
using parametric and non-parametric methods for continues
data
e. appraise published research which used hypothesis testing for
continues data
UNIVERSITAS
GADJAH MADA 3 of 32
Activities

Discussion: Statistical Inference – Hypothesis Testing


1. Laboratory session:
1 Hypothesis testing and types of errors (type I and II)
2 P values and power
3 Interval estimation for continues data
4 the hypothesis testing for the difference in means between two
groups
5 Hypothesis testing for continues data – Independent and paired
test
6 Non-parametric tests for continues data

UNIVERSITAS
GADJAH MADA 4 of 32
Activities

2. Homeworks:
1 Critical appraisal on comparing means of two groups
2 Calculating the difference in means between two groups using
parametric and non-parametric
3 Reading and presenting computer outputs on the difference in
means between two groups using parametric and
non-parametric

UNIVERSITAS
GADJAH MADA 5 of 32
Instruction

• Every student should read laboratory material and/or the


journal before the class exercise and discuss these following
questions with his/her friends under the guidance of your tutor.
• In the group discussion, you are encouraged to discuss
questions and possible answers with other students.
• During the group discussion your tutor will be able to help a few
concepts that you have not exposed before.

UNIVERSITAS
GADJAH MADA 6 of 32
Hypothesis Tests: I

3.1 Hypothesis Tests: I


1. The level of significance, alpha, is the probability of
a) rejecting a false null hypothesis
b) accepting a true null hypothesis
c) rejecting a true null hypothesis
d) accepting a false null hypothesis

UNIVERSITAS
GADJAH MADA 7 of 32
Hypothesis Tests: I

2. If an investigator rejects the null hypothesis


a) s/he has committed a Type II error
b) s/he has committed a Type I error
c) s/he has committed no error
d) s/he may have committed a Type II error
1) a, b, and c
2) a and c
3) b and d
4) d only
5) none of the above

UNIVERSITAS
GADJAH MADA 8 of 32
Hypothesis Tests: I

3. A Type II error is
a) the probability that the null hypothesis is true
b) the probability that the null hypothesis is false
c) made if the null hypothesis is accepted when it is false
d) made if the null hypothesis is rejected when it is true
e) none of the above

UNIVERSITAS
GADJAH MADA 9 of 32
Hypothesis Tests: I

4. The p-value is
a) the probability of the null hypothesis being true
b) the probability of the null hypothesis being false
c) the probability of the test statistic or any more extreme results,
assuming the null hypothesis is true
d) the probability of the test statistic or any more extreme results,
assuming the null hypothesis is false
e) none of the above

UNIVERSITAS
GADJAH MADA 10 of 32
Hypothesis Tests: I

5. A 95% confidence interval for the mean cholesterol level of


adults over 65 years of age is (198, 208) mg/dl. The mean
cholesterol level for adults 40-60 years of age is 190 mg/dl. If a
two-sided hypothesis test of Ho: µ=190 mg/dl were performed,
we would:
a) accept Ho at the 5% significance level
b) reject Ho at the 5% significance level
c) accept Ho at the 1% significance level
d) reject Ho at the 1% significance level
e) can’t tell

UNIVERSITAS
GADJAH MADA 11 of 32
Hypothesis Tests: I

6. The 5% level of significance means:


a) we’re taking a 5% risk of misstating the null hypothesis
b) we’re taking a 5% risk that our sample is unrepresentative if the
null hypothesis is true
c) we’re taking a 5% risk of getting an unrepresentative sample if
the alternative hypothesis is true
d) we’re taking a 5% risk of making a wrong decision, regardless of
which hypothesis is true

UNIVERSITAS
GADJAH MADA 12 of 32
Hypothesis Tests: I

7. Iron-deficiency anemia is an important nutritional health


problem in Indonesia. A dietary assessment was performed in
51 children of 9 to 11 year-old males whose family were below
the poverty line. The mean daily iron intake among these
children was found to be 12.50 mg with a standard deviation of
4.75 mg. Suppose that the mean daily iron intake among a
large population of 9-11 year-old boys from all income strata is
14.44 mg. We wish to test if the mean iron intake among the
low-income boys is different from that of the boys in the general
population. State the hypothesis that can be used to consider
this question.

UNIVERSITAS
GADJAH MADA 13 of 32
Hypothesis Tests: I

Questions:
a) H0 : µ = 12.50 versus H1 : µ 6=12.50
b) H0 : µ = 14.44 versus H1 : µ = 12.50
c) H0 : µ = 14.44 versus H1 : µ < 14.40
d) H0 : µ = 14.44 versus H1 : µ 6=14.44
e) H0 : µ < 14.44 versus H1 : µ = 14.44

UNIVERSITAS
GADJAH MADA 14 of 32
Hypothesis Tests: II

1. A study was done to determine the effectiveness of an


instruction booklet in improving nurses’ knowledge of testing for
glycosuria in diabetes mellitus. A sample of 12 nurses was
given a pretest prior to reading the booklet. After reading the
booklet, the same nurses were given a post-test.

UNIVERSITAS
GADJAH MADA 15 of 32
Hypothesis Tests: II

1. Questions:
a) State the null hypothesis for determining if the instruction
booklet was effective.
b) State the appropriate alternative hypothesis.
c) The appropriate t-statistic is:
1) Paired t-test
2) 2-sample t-test
d) The degrees of freedom associated with this test statistic are .

UNIVERSITAS
GADJAH MADA 16 of 32
Hypothesis Tests: II

2. One method for assessing the effectiveness of a drug is to note


its concentration in blood and/or urine samples at certain
periods of time after giving the drug. Suppose we wish to
compare the concentrations of two types of aspirin in urine
specimens at one time and measure the 1-hour urine
concentration. One week later, after the first aspirin has
presumable been cleared from the system, we give the same
dosage of the other aspirin to the same person and note the
1-hour urine concentration. Since the order of giving the drugs
may affect the results, we use a table of random numbers to
decide which of the two types of aspirin to give first. We
perform the experiment on 10 people. What statistical
procedure would be appropriate for comparing the two types of
aspirin?
UNIVERSITAS
GADJAH MADA 17 of 32
Hypothesis Tests: II

3. A study was performed in 1086 to relate the use of oral


contraceptives with the levels of various lipid fractions in a
groups 163 non-pregnant, pre-menopausal women ages
21-39. The serum cholesterol among 66 current users of oral
contraceptives was 201 + 37 (mg/dl) (Mean + Standard
deviation), whereas for 97 nonusers it was 193 + 37 mg/dl.
What statistical procedure would be appropriate for determining
if cholesterol levels are affected by the oral contraceptive use?

UNIVERSITAS
GADJAH MADA 18 of 32
Hypothesis Tests: II

4. In a pediatric clinic a study is carried out to see how effective


aspirin is in reducing temperature. Twelve 5-year-old girls
suffering from influenza had their temperatures taken
immediately before and 1 hour after administration of aspirin.
What is the appropriate statistical procedure for determining if
aspirin is reducing the temperature? State the appropriate null
and alternative hypothesis. An investigator wishes to determine
if sitting upright in a chair versus lying down on a bed will affect
a person’s blood pressure. The investigator decides to use
each of 10 patients as his or her own control and collects
systolic blood pressure data in both the sitting and lying
positions. What statistical procedure would be appropriate to
determine the effect of position on blood pressure?
UNIVERSITAS
GADJAH MADA 19 of 32
Hypothesis Tests: III

1. A clinical trial was designed to test a drug that was believed to


decrease blood-clotting time. Forty subjects were selected and
randomized to yield two groups, each with n=20. One group
was given the drug and the other group was given a placebo,
and served as a control. The mean clotting time, given in
minutes, for the drug treatment group is 4.90 minutes with
variance of 10.24 minutes squared. The mean clotting time for
the control group is 7.45 and the variance is 12.96 minutes
squared.

UNIVERSITAS
GADJAH MADA 20 of 32
Hypothesis Tests: III

Questions
a) State the null hypothesis to test differences between the
treatment and control groups.
b) State the appropriate alternative hypothesis.
c) Using the above results, set up the appropriate test.

UNIVERSITAS
GADJAH MADA 21 of 32
Hypothesis Tests: III

2. A class experiment in pharmacology consisted of distributing


packets of instant coffee to students. The contents of the
packet were to be mixed with hot water and drank shortly
before bedtime. The student received packets on two
occasions: one time the packet contained a placebo and the
other time it contained coffee with caffeine. Among other
measurements, the students took their pulse rates (in beats per
minute) before consuming the instant coffee or placebo and
then again afterward.

UNIVERSITAS
GADJAH MADA 22 of 32
Hypothesis Tests: III

The students were classified as to whether they were coffee drinkers (those
who usually consumed two cups or more per day) or non-coffee drinkers
(those who usually consumed one or fewer cups per day). The results for 65
non-coffee drinkers and 85 coffee drinkers are given below:

65 Non-Coffee Drinkers 85 Coffe Drinkers


Caffein Placebo Caffein Placebo
N 50 15 44 41
Mean 4.1 0.9 4.9 2

UNIVERSITAS
GADJAH MADA 23 of 32
Hypothesis Tests: III

Questions
a) State the null and alternative hypothesis for determining if the response is
the same among Coffee Drinkers.
b) What is the appropriate statistical procedure to test the null hypothesis in (a)?
c) What are the degrees of freedom associated with the test statistic in (b)?
d) State the null and alternative hypotheses to determine if the caffeine
response is the same between Non-Coffee and Coffee Drinkers.
e) What is the appropriate statistic procedure to test the null hypothesis in (d)?
f) What are the degrees of freedom associated with the test statistic in (e)?

UNIVERSITAS
GADJAH MADA 24 of 32
Hypothesis Tests: III

3. A recent study attempted to compare the working environment


in offices where smoking was permitted with that in offices
where smoking was not permitted. Measurements were made
of carbon monoxide (CO) at 1:20 pm in 40 work areas. Where
smoking was permitted, the mean CO=11.6 parts per million
(ppm) and the standard deviation CO=7.3 ppm. Where
smoking was banned, the mean CO=6.9 ppm and the standard
deviation CO=2.7 ppm. What statistical procedure would be
appropriate to see whether or not the mean CO is different in
the two types of working environments?

UNIVERSITAS
GADJAH MADA 25 of 32
Analysis Framingham Data using stata

• Use "framingham.dta" in the previous laboratory modul (modul


4)
• Answer the following questions:
1 Test wether systolic blood pressure for all partcipants at first,
second or third follow-up is equal less than 120 mmHg
(hypothesis Type I). Interprete the finding.
2 Test wether systolic blood pressure for all partcipants at the third
period is lower than first period. What is your finding and
conclusion? (hypothesis Type II)
3 Test wether systolic blood pressure among males are higher
than female for all partcipants. What is your finding and
conclusion? (hypothesis Type III)
4 Read lecture material on the stata programing for this t-test type

UNIVERSITAS
GADJAH MADA 26 of 32
Homework

The following is research articles for your reading assignment. Each


student needs to read this article.
• Vinter, N., Huang, Q., Fenger-Gron, M., Frost, L., Benjamin, E.
J., & Trinquart, L. (2020). Trends in excess mortality associated
with atrial fibrillation over 45 years (framingham heart study):
Community based cohort study. BMJ : British Medical Journal
(Online), 370

UNIVERSITAS
GADJAH MADA 27 of 32
Homework

Pay attention on table 1 from the article given.


1 Conduct statistical test for all partcipants that BMI is lower than
28 at the third follow-up. What is your interpretation?
2 Conduct statistical test for all partcipants that systolic blood
pressure at the first follow-up is lower than third period of
examination. What is your interpretation?
3 Assuming data from participants with atrial fibrillation coming
from difference population than all participants 1 (unequal
variances), did you able to conclude that systolic blood
pressure (mm Hg) among participants with atrial fibrillation is
always higher than sample of all participants? What is the
evidence?
1
which is not true but this is just for exercise
UNIVERSITAS
GADJAH MADA 28 of 32
Hint! Consider to use the following stata commands.
• ttesti #obs #mean #sd #val, level(#)
• ttesti #obs1 #mean1 # sd1 #obs2 #mean2 #sd2, options2
• options1 is:
1 by(groupvar) variable defining the groups
2 reverse reverse group order for mean difference computation
3 unequal unpaired data have unequal variances
4 welch use Welch’s approximation
5 level(#) set confidence level; default is level(95)
• options2 is:
1 unequal unpaired data have unequal variances
2 welch use Welch’s approximation
3 level(#) set confidence level; default is level(95)
Note

• During Laboratory Exercise student will be assisted to use


computer program by your teaching assistants. Every student
should turn in the homework within at most 2 weeks after
laboratory exercise.
• Here’s a link to class web
• http://gamel.fk.ugm.ac.id/course/view.php?id=40088&lang=en

UNIVERSITAS
GADJAH MADA 30 of 32
Output of this laboratory exercise

1 Analysis using t-test with indvidual data


2 Analysis using t-test with summary statistics

UNIVERSITAS
GADJAH MADA 31 of 32
Required Reading

1 Lecture Materials
2 Hypothesis continues data

UNIVERSITAS
GADJAH MADA 32 of 32

You might also like