Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
26 views26 pages

Hypothesis Testing

statistic

Uploaded by

terno fire
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)
26 views26 pages

Hypothesis Testing

statistic

Uploaded by

terno fire
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/ 26

Chapter (5)

Testing of Hypothesis
(5.1) Introduction
One type of statistical inference, estimations, is discussed
in the preceding chapter. The other type, testing of hypothesis is
the subject of this chapter. As is true with estimation, the purpose
of hypothesis testing is to aid the clinician researcher or
administrator is reaching a conclusion concerning a population
by examining a sample from that population. Estimation and
hypothesis testing are not as different as they are made to appear
by the fact that most textbooks devote a separate to each. As we
will explain later.
Definition (5-1):
A hypothesis may be defined simply as a statement about
one or more parameter of populations.
The hypothesis is frequently concerned with the
parameters of the populations about which the statement is made,
example a hospital administrator may hypothesize that the
average length of stay of patients admitted to the hospital is five
days; a physician may hypothesize that a certain drug will be
effective in 90 of the cases with which it is used.

- 98 -
By means of hypothesis testing one determines whether or
not such statement are compatible with available data.
Definition (5-2):
Statistical hypothesis are hypothesize that are stated in
such a way that they may be evaluated by appropriate statistical
techniques.
In this book the hypotheses that we will focus on are
statistical hypothesis. We will assume that the research
hypotheses for the examples and exercises have been considered.
Hypothesis Testing Steps:
For convenience hypothesis testing will be presented as a
5- step procedure.
1) Data; the nature of the data that form the basis of the
testing procedures must be under stood, since this
determines the particular test to be employed.
2) Assumptions; as we learned in the chapter on estimation,
different assumptions lead to modifications of confidence
intervals. The same is true in hypothesis testing. We have
seen that these include, among others assumptions about
the normality of the population distribution, equality of
variances and independent of samples.

- 99 -
3) Hypotheses; there are two statistical hypotheses involved
in hypothesis testing, the null hypothesis is the hypothesis
to be tested, it is designated by the symbol H o which is
sometimes referred to as a hypothesis of no difference. The
alternative hypothesis is a statement of what we will
believe is true if our sample data causes us to reject the
null hypothesis. We shall designate the alternative
hypothesis by the symbol H a .
In summary, we may state the following rules of
assumption for deciding what statement goes in the null
hypothesis and what statement goes in the alternative hypothesis:
Ho : o against (i) Ha : o

(ii) Ha : o or H a : o

where o is a hypothesized value of a population mean,


Ho : o means that there is no true difference between and

o .
4) Test statistic; the test statistic is some statistic that may be
computed from the data of the sample. As a rule, there are
many possible values that the test statistic may assume, an
x
example of a test statistic is the function Z o

- 100 -
x
This test statistic is related to the statistic Z o
which we are
n

used in the interval estimation.


5) Decision Rule; all possible values that the test statistic can
assume are points on the horizontal axis of the graph of the
distribution of the test statistic and are divided into two
groups; one group constitutes what is known as the
rejection region and the other group makes up the
acceptance region (non rejection region) decision rule tell
us to reject the null hypothesis H o if the value of the test
statistic that we compute from our sample is one of the
values in the rejection region and to not reject (accepte) the
null hypothesis H o if the computed of the test statistic is
one of the values in the nonrejection region.

Figure (5-1): Critical region for two tailed test

- 101 -
Definition (5-3):
Critical region; the critical region is the set of all values of
the test statistics that cause us to reject the null hypothesis.
Definition (5-4):
Level of significance; the decision as to which values go
into the rejection region and which ones go into the non rejection
region is mode on the basis of the desired level of significance,
designated by .
Definition (5-5):
When the rejection region is on either the right-hand side
or the left-hand side of the mean the test is called a one tailed
test.

One-tailed test One-tailed test


Fig. (5-2)
Definition (5-6):
When the rejection region is on both sides of the mean, the
test is called a two-tailed test.

- 102 -
The procedures for testing
statistical hypothesis can be
summarized as follows:

Step (1): State the hypotheses to be tested.


Step (2): Specify the significance level .
Step (3): Choose a test statistic and perform the required
calculation for the statistical test.
Step (4): Find the critical value and define the rejection region.
Step (5): Decide to accept or reject H o .
Step (6): Draw conclusion and make interpretations.
(5-2) Testing of Hypothes of the Population Mean and
Variance Known:
In this section we consider the testing of a hypothesis about a
population mean under two different conditions:
1- When sampling is from a normally distributed population
of values with known variance,
2- When sampling is from a normally distributed population
with unknowing variance.

- 103 -
Example (1):
The mean lifetime of electric light bulbs produced by a company
has in the been 1120 hours and a standard deviation equal 124
hours. A sample of 10 electric light bulbs recently chosen from a
supply of newly produced bulbs has a mean 1070 hours, assume
that the lifetime of electric light bulbs have normally distributed,
test the hypothesis that the mean lifetime of the bulbs has not
changed using a level of significance 5% .

Solution:
Let X random variable of the lifetime of bulbs of the
company i.e. X ~ N 1120,1242 .
1- null hypothesis is H a : o 1120 against alternative

hypothesis H a : 1120 this is test of two tailed.

x 1070 1120
2- The test function Z cal o

n 124 10

158.11
1.275
124
For .05 Z Z 0.975 1.96
1
2

3- Since the calculated Z 1.275is greater than Z tab 1.96

- 104 -
then we accept H o : 1120

i.e. there is no difference between and 1120


i.e. the mean lifetime of the bulbs has not changed.
Example (2):
The breaking strengths of cables by a manufacturer have
normal distribution with mean 815 Kg and standard deviation 45
Kg by a new technique the breaking strengths can be increased.
To test this claim a sample of 50 cables tested and it is found that
the mean breaking strength is 840 Kg. can we support this claim
at level of significance 1% ?

Solution:
Let X random variable of the breaking strengths of cables
X ~ N 815, 452

1 null hypothesis H o : o 815 against alternative H a : 815

x One-tailed test
2 test function Z cal o

840 815
Z cal 3.93
45 50

- 105 -
.01 Z tab Z (1 ) Z 0.99 2.33

Since Z cal Z tab 2.33 then we reject H o and accept H a i.e. the
breaking strength can be increased about 815.
(5-3) Hypothesis Testing of Population Mean with Variance
Unknown:
In the previous section, we assumed knowledge of the
variance of the underlying distribution. However in most cases
the information on the variance is not available. We learned in
previous chapter that the variance 2
is estimated by the sample
x
variance S 2 then the random variable T o
follows a
S n

t distribution with the degrees of freedom (n 1) and number of

sample is n 30 .
Example (3):
A study was made of a sample of 25 records of patients
seen at a chronic disease hospital, on an outpatient basis the
mean number of outpatient visits per patient was 5 and the
sample standard deviation was 2. Can it be concluded from these
sample that the population mean is greater than 4 visits per
patient? Test hypothesis for 5% .

- 106 -
Solution:
Let X random variable of number of outpatient
2
X ~N ,

Ho : o 4 against H a : 4

we use one tailed test


x o 4.5 4
Tcal
S n 2 25

1.25 Since Tcal ttab 1.71

then we accept the null hypothes H o : 4 i.e. the mean score for

the sample population is not greater than 4.


Example (4):
Coronary heart disease is the leading cause of morbidity
and mortality throughout the world. Imingil et al investigated the
possible association between periodontal health and coronary
heart disease in patients with acute myocardial infarction (AMI).
Based on the physical examination, it was determined that the
average level of triglycerides for the patients with AMI is 196.5
mg/di. Suppose the investigators claimed that the triglyceride
level for the patients with the CHD should be lower than that for
the patients in the AMI group. To confirm their claim, the
investigators randomly selected 27 patients with CHD and

- 107 -
observed their triglyceride levels. The sample yielded a mean
equal 155.3 mg/dI and SE equal 88 mg/dI. Assume that the
triglyceride levels are normally distributed. Can we support this
claim at 5% ?

Solution:
Since the investigators claim that the triglyceride levels for
the patients with CHD should be lower than 196.5 we state the
Hypothesis H o : 196.5 against

Ha : 196.5 we used a one


tailed test
X 155.3 , S 88 , n 27

X o 155.3 196.5
TCal 2.43 t (0.95 , 26) 1.7
88 n 88 27

Then TCal ttab i.e. we reject the null hypothesis at the significance
level 0.05 and conclude that the mean triglyceride level for

patients with CHD is significantly lower than that for patients


with AME.
Example (5):
The following are the measurements of the systolic blood
pressures (mm/HG) of 12 patients undergoing drug therapy for
hypertension: 183, 152, 178, 157, 194, 163, 144, 114, 178, 152,
118, 158.

- 108 -
Can we conclude on the basis of these data that the population
mean is differs from 165? Let 0.05
Solution:
Hypothesis H o : o 165

against Ha : 165

n 12 X 157.6 S 24.4 S n 7.04

X o 157.6 165 7.4


TCal 1.05
S n 7.04 7.04

t tab t t (0.975 ,11) 2.2


1 ,n 1
2

Since TCal 1.05 greater than t tab 2.2 then TCal lies in the

accepted region and we accept H o , the population mean is not


differs from 165.
(5-4) Hypothesis Testing of the Difference Between Two
Population Means. (With Known Variances)
All of the statistical test procedures we studied in the
previous section were one-sample problems. In this section we
will discuss hypothesis testing of two sample cases. In most of
the practical situations in biomedical health sciences, it is much
more common to compare the means of two independent
populations consider two in dependent normal populations with
unknown means 1 and 2 and the variances of the populations
- 109 -
are 2
1 and 2
2 and known. The variances are not necessarily
equal. Suppose random samples of size n1 and n 2 are taken from
respective populations hypothesis testing involving the difference
between two population means is most frequently employed to
determine whether or not it is reasonable to conclude that the two
population means are unequal. In such case, one or the other of
the following hypothesis may be formulated:
Ho : 1 2

(1) Ha : 1 2 two tailed test


Ha :
(2) 1 2
one tailed test
Ha 1 2

The test statistic for testing the null hypothesis of equal


population means is
X1 X2 1 2
Z Cal
2 2
1 2

n1 n2

Which equal
X1 X2 0
Z Cal
2 2
1 2

n1 n2

Where the subscript 1 2 0 indicates that the difference is a

hypothesized parameter.

- 110 -
Example (6):
Researchers wish to know if the data they have collected
provide sufficient evidence to indicate a difference in mean
serum uric acid levels between normal individuals and
individuals with Down's syndrome. The data consists of serum
uric acid readings on 12 individuals with Down's syndrome with
mean 4.5 mg/ml and 15 normal individuals with mean 3.4 mg/ml
by assuming the data are taken from two independent normal
populations with variances 1 and 1.5 mg/ml respectively, test that
at 5% .

Solution:
Let 1 is the mean serum of the population of Down's syndrome
and 2 is the mean serum of the normal population
(1) Hypothesis Ho : 1 2 against Ha : 1 2

X1 X2
(2) test statistic Z Cal 2 2
1 2

n1 n2

(4.5 3.4) 1.1


2.57
1 1.5 .428
12 15

- 111 -
Decision Rule:
Let
.05 then the critical values of Z are 1.96 we
reject H o unless 1.96 Z Cal 1.96
Statistical Decision
since ZCal 2.57 1.96 Then we reject H o

i.e. there is an indication that the two population means are not
equal
(5-5) Testing of Hypothesis About the Difference Between
two Population Means (with Unknown Variances):
In general 2
1 and 2
2 are not known, therefore they must
be estimated from the data from the two samples we select, the
sample variances are obtained by S12 and S 22 ; respectively.
In the case of the n1 , n2 30 then we use the same test by replace
X1 X 2
2
1 , 2
2 by S12 , S22 in the form Z Cal .
S12 S 22
n1 n2

We assume in this section that the variances are unknown but


equal 2
1
2
2 the best estimate for the variances is the pooled
n1 1 S12 n2 1 S 22
sample variance S P2
n1 n2 2

Not that S P2 is a weighted average of S12 and S 22 with n1 n2 2


degrees of freedom, n1 , n2 30

- 112 -
We will replace 2
1 and 2
2 by S P2 in the formula
X1 X 2 1 2
TCal
1 1
SP
n1 n2

Under the null hypothesis H o : 1 2 the formula become

X1 X 2
TCal
1 1
SP
n1 n2

Example (7):
A survey was conducted to test the equality of time
devoted by girls and boys in sports. Independent samples of 12
girls and 15 boys were selected. Each of them was asked how
many hours they spent on sports per week. The data were
follows:
15 13 18 13 20 14 16 18 16 17 14 19
Girls X1 :

24 26 22 19 21 20 21 23 16 18 19 12 15 24 22
Boys X1 :

Test if there is a differs between the mean of two populations at


1% .

Solution:
Suppose 1 is the mean time per week devoted by girls and

2 is the mean time per week devoted by boys in their


populations.

- 113 -
Test Ho : µ1 = µ2 against Ha : µ1 2 and 2
1
2
2 . The test has
two tailed
n1 12 n2 15

X 1 16.08 x 2 19.47

S1 2.35 S 2 3.5

S12 5.54 S 22 12.41

n1 1 S12 60.92 n2 1 S 22 173.73

n1 1 S12 n2 1 S 22 234.65
S P2 9.38
n1 n2 2 25

1 1
S P 3.06 , 0.355
n1 n2

1 1
SP 1.087
n1 n2

Test statistic
X1 X 2 3.39
TCal 3.12
1 1 1.087
SP
n1 n2

t (0.995, 25) 2.78

Since TCal 3.121 2.78 we reject H o , it means that the time

devoted per week for the two population is different.

- 114 -
Example (8):
The mean height of 50 male students who showed average
participation in college athletics was 173.4 Cm with standard
deviation of 6.4 Cm, while 45 male students who showed no
interest in such participation had a mean height of 171.5 Cm
with a standard deviation of 7.2 Cm. Test the hypothesis that
male students who participation in college athletics are taller than
other male students at 5% .

Solution:
Ha : 1 2 against Ha : 1 2

Where 1 is the mean of the first population.


and 2 is the mean of the second population.
n1 50 n2 45

X 1 173.4 X 2 171.5

S1 6.4 S 2 7.2

One tailed test


In large sample n1 30 , n2 30 if 2
1 and 2
2 are unknown
substitute the sample variances S12 and S 22 instead of 2
1 , 2
2

test statistic:
X1 X 2 173.4 171.5 1.9 1.9
Z Cal 1.35
S12 S 22 (6.4) 2 (7.2) 2 0.82 1.152 1.404
n1 n2 50 45

- 115 -
On the basis of a one tailed test Z tab Z1 at level 5% Z 0.95 1.65
since Z cal 1.35 Z tab 1.65 we can accepte the null hypothesis H o
i.e. there is no difference between the two mean heights.
Example (9):
The purpose of a study by a Researcher was to investigate
the nature of lung destruction in the lungs of cigarette smokers
before the development of marked emphysema. Three lung
destructive index measurements were made on the lungs of life
long nonsmokers and smokers who died suddenly outside
hospital of non respiratory causes. A larger score indicates
greater lung damage for one of the indexes the scores yielded by
the lungs of a sample of nine non smokers and a 14 smokers are
shown in the following table. We wish to know if we may
conclude, on the basis of these data that smokers in general have
greater lung damage than do nonsmokers test this for 1% .
Nonsmokers: 18 8 10.5 11 7.7 17 9 13 19
Smokers: 16 14 11 26 17.5 15.4 15.8 12 18 13 24
12 25 16

Solution:
Let 1 is the mean of the population nonsmokers.
and 2 is the mean of population smokers.
Ho : 2 1 against Ha : 2 1

- 116 -
Assumption the lung destructive index scors in both populations
are approximately normally distributed.
n1 9 n2 14 X2 X 1 4.27

X 1 12.57 X 2 16.84

S1 4.39 S 2 4.9

2
n1 1 S 12 n2 1 S 22 154.18 311.87 466.05
S P 22.2
n1 n2 2 21 21

1 1 1 1
SP 4.71 , 3.01 SP 14.18
n1 n2 n1 n2

test statistic X 2 X1 4.27 , ttab 6(0.99, 21) 2.52


Tcal 0.31
1 1 14.18
SP
n1 n2

Since TCal ttab then we accepte H o we conclude that there is no


difference between the two means.
(5-6) The P Values:
In stead of saying that an observed value of the test statistic is
significant or is not significant, most writers in the research literature
prefer to report the exact probability of getting a value as extreme as
or more extreme than that observed if the null hypothesis is true. In
the present example these writers would give the computed value of
the test statistic along with the statement P value = 0.034 the
statement P = 0.034 means that the probability of getting a value
as extreme as Z Cal 2.12 in either

- 117 -
direction, when the null hypothesis is true, is 0.034 the value
0.034 is obtained from table D and is the probability of observing
a Z Cal 2.12 or a Z Cal 2.12 when the null hypothesis is true.

Definition (5-6):
The P value for a hypothesis test is the probability of
obtaining, when H o is true, a value of the test statistic as extreme
as or more extreme than the one actually computers.
The P value for a test may be defined also as the smallest
value of for which the null hypothesis can be rejected, A
general rule worth remembering then is this if the P value is less
than or equal to , we reject the null hypothesis and if the P
value is greater than we accept the null hypothesis.
In the case of test statistic where .05 and

Ho : o , Ha : o , Z Cal 2.4

then P value 2 P Z Z Cal P (Z 2.4)

2 0.5 P (0 Z 2.4

2[0.5 0.4918] .0164 0.05

Then we reject H o
If H o : o vs H a : o , Z Cal 2.4

P value P ( Z 2.4) 0.5 P (0 z 2.4)

P value 0.0082 0.05

- 118 -
Then we reject H o and accept H a
Other example 1%

Ho : o vs H a : o , n 14 two tailed test

X o
TCal 2.3
S n

P value 2 P T TCal 2 P (T 2.3)

2[1 P (T 2.3), n 1 13]

where n 1 13 the degrees of freedom


P value 2 (0.025) .05 .01

Then we accept H o .
(5-7) The Paired T test:
In our previous discussion involving the difference
between two population means, it was assumed that the samples
were independent. A method frequently employed for assessing
the effectiveness of a treatment or experimental procedure is one
that makes use of related observations resulting from dependent
samples, A hypothesis test based on this type of data is known as
a paired comparisons test.
The objective in paired comparisons test is to eliminate a
maximum number of sources of extraneous variation by making
the pairs similar with respect to as many variables as possible.

- 119 -
Related or paired observations may be obtained in a
number of ways, the same subjects may be measured before and
after receiving some treatment. Pairs of twins or siblings may be
randomly assigned to two treatments in such a way that members
of a single pair receive different treatments. In comparing two
methods of analysis the material to be analyzed may be equally
divided so that one half is analyzed by one method and on half is
analyzed by the other. Or pairs may be formed by matching
individuals on some characteristic. Examples of this sort of
experiment are of follows;
1) To assess a weight loss program, the subjects body mass
index is measured before he begins the program at baseline
and again at the end of the program.
2) To evaluate a certain regiment of exercise program in
reducing blood pressure, the subject's blood pressure is
measured before he or she starts the program and at the
end of the program.
3) To study the effect of beta carotene on reduction of serum
cholesterol, the study subjects are instructed to drink a
prescribed amount of beta carotene rich juice for the
duration of the clinical trial. Their serum cholesterol level
is measured at baseline and at the end of the trial.

- 120 -
Instead of performing the analysis with individual
observations, we use the difference between pairs of observation,
as the variable of interest D x y when the n sample differences
computed from the n pairs of measurements constitute a random
sample from a normally population of difference with mean D

and variance S D2 the hypothesis we wish to test is


Ho : D 0 against H a : D 0 in two-tailed test

Or Ha : D 0 or H a : D 0 in one-tailed test

then the Test statistic is


D
TCal , t tab t ( , n 1)
SD n

and 1 in the case of two-tailed test and


2

(1 ) in the case of one-tailed test

Thus a paired t-test will proceed just like a one sample t-test.
Example (10):
Agents with carbamide peroxide (CP) in various
concentrations are widely prescribed for at home tooth
whitening. A study was conducted to evaluate the efficacy of a
10% CP with nine human subjects with maxillary anterior teeth.
All of the study subjects underwent a professional prophylaxis
and were given specific instructions regarding at-home use of a

- 121 -
10% CP tooth-whitening agent. They were required to use it for 2
weeks. Tooth shade index of their central incisors was measured
at baseline and after the 2 week study period. It is assumed that
the distribution of tooth shade index is normal, the following
table summarizes the data. Would you be able to conclude that
the 10% CP tooth whitening agent is effective? At 5% .

Baseline (X1) : 14 16 14 17 18 11 15 13 12

After 2-week (X 2 ) : 21 15 18 19 15 18 22 16 14

Solution:
D X2 X1 7 -1 4 2 -3 7 7 3 2

We compute the sample mean D and standard deviation S D of


the sample D
D 3.11 S D 3.58

Ho : D 0 against H a : D 0

The test statistic


D 3.11
t Cal 2.6
SD n 3.58 8

t tab t t (0.975 , 8) 2.31


1 ,n 1
2

Since tcal 2.6 ttab then we rejecte the null hypothesis we


conclude that the 10% CP tooth-whitening agent is significantly
effective.

- 122 -
Example (11):
A drug a administered to 15 patients to increase the
hemoglobin (Hb) in blood. Hemoglobin was measured just
before administering the drug. Drug was continued for one
month and again their hemoglobin was tested. Increases in
hemoglobin in mg was as follows:
Increase in Hb: 3.1, 2.5, 1.3, 2.6, 0.6, 1.7, -1.2, 1.5, 1, 0.7, 2.7, 2.8, 1.4, 2.3
Is there a significant increase in blood hemoglobin as an
effect of the drug? Test that for 5%

Solution:
tailed test in this problem the hypothesis is
Ho : D 0 against H a : D 0

D 1.59 S D 1.13

The test statistic


D 1.59 0
t Cal 5.42
SD n 1.134 15

.05

t tab t ( 0.95 ,14 ) 1.76

Since the calculated value of t is greater than tabulated t 1.76


then H o is rejected, this leads that there is significant increase of
homoglboin and the drug is effective.

- 123 -

You might also like