Testing of Hypothesis
Testing of Hypothesis
chi-square test)
By
Dr Mohd Usman
Assistant Professor
Department of Community Medicine
SMCW-SUHRC
TESTING OF HYPOTHESIS
A hypothesis may be defined simply as a statement about one
or more populations
If the testing procedure leads to rejection, we will say that the data at
hand are not compatible with the null hypothesis, but are supportive
of some other hypothesis.
As a rule, there are many possible values that the test statistic may
assume, the particular value observed depending on the particular
sample drawn.
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 nonrejection
region
The decision rule tells us to reject the null hypothesis 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 the null hypothesis if the
computed value of the test statistic is one of the values in the
nonrejection region.
Significance Level- The decision as to which values go
into the rejection region and which ones go into the
nonrejection region is made on the basis of the desired
level of significance, designated by α.
Data: The data available to the researchers are the ages of a simple
random sample of 10 individuals drawn from the population of
interest. From this sample a mean of x̅̅ = 27 has been computed.
Test statistic
We may state the decision rule for this test as follows: Reject H0 if
the computed value of the test statistic is either ≥ 1.96 or ≤ — 1.96.
We are able to reject the null hypothesis since — 2.12 is in the
rejection region. We can say that the computed value of the test
statistic is significant at the .05 level.
The value .0340 is obtained from Table D and is the probability of observing a z
2.12 or a Z —2.12 when the null hypothesis is true. That is, when Ho is true, the
probability of obtaining a value of z as large as or larger than 2.12 is .0170, and the
probability of observing a value of z as small as or smaller than —2.12 is .0170.
The probability of one or the other of these events occurring, when H0 is true, is
equal to the sum of the two individual probabilities, and hence, in the present
example, we say that p = .0170 + .0170 = .0340. The quantity p is referred to as the
p value for the test.
Definition: The p value for a hypothesis test is the probability of
obtaining, when H0 is true, a value of the test statistic as extreme
as or more extreme (in the appropriate direction) than the one
actually computed.
The p value for a test may be defined also as the smallest value of α for
which the null hypothesis can be rejected. Since in example , our p
value is .0340, we know that we could have chosen an α value as small
as .0340 and still have rejected the null hypothesis. If we had chosen an
α smaller than .0340, we would not have been able to reject the null
hypothesis. A general rule worth remembering then is this: If the p
value is less than or equal to α, we reject the null hypothesis. If the p
value is greater than α, we do not reject the null hypothesis.
One-Sided Hypothesis Tests: The hypothesis test illustrated by
example is an example of a two-sided test, so called because the
rejection region is split between the two sides or tails of the distribution
of the test statistic. A hypothesis test may be one-sided, in which case
all the rejection region is in one or the other tail of the distribution.
Whether a one-sided or a two-sided test is used depends on the nature
of the question being asked by the researcher. If both large and small
values will cause rejection of the null hypothesis, a two-sided test is
indicated. When either sufficiently "small" values only or sufficiently
"large" values only will cause rejection of the null 'hypothesis, a one-
sided test is indicated.
Refer to the previous exercise. Suppose, instead of asking if they could
conclude that μ ≠ 30, the researchers had asked: Can we conclude that
μ < 30? To this question we would reply that they can so conclude if
they can reject the null hypothesis that μ ≥ 30.
Test Statistic
Decision Rule Let us again let α = .05. To determine where to place
the rejection region, let us ask ourselves what magnitude of values
would cause rejection of the null hypothesis. If we look at the
hypotheses, we see that sufficiently small values would cause
rejection and that large values would tend to reinforce the null
hypothesis. We will want our rejection region to be where the small
values are—at the lower tail of the distribution.
This time, since we have a one-sided test, all of α will go in the one
tail of the distribution. By consulting Table D, we find that the value of
Z to the left of which lies .05 of the area under the unit normal curve
is —1.645 after interpolating. Our rejection and nonrejection regions
are now specified and are shown in Figure 7.2.2. Our decision rule
tells us to reject Ho if the computed value of the test statistic is less
than or equal to — 1.645.
Statistical Decision: We are able to reject the null hypothesis
since -2.12 < -1.645.
Z=
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 consist of serum uric acid readings on 12
individuals with Down's syndrome and 15 normal individuals. The
means are x̅1 = 4.5 mg/100 ml and x̅2= 3.4 mg/100 ml
1. Test of Proportions
2. Test of Association
3. Goodness of fit.
Test of association
Chi-square statistics are calculated from observed and
expected frequencies. Observed frequencies (Oi) are the
data in the R-by-C table. Expected frequencies (Ei) are
calculated according to this formula:
Observed frequencies (Oi)
Expected frequencies (Ei)
Data (Education level and smoking). We want to learn about the
relationship between education and the prevalence of smoking in a
particular community. A sample of 585 adult individuals with at least a
high school degree is selected from a certain high socioeconomic
status neighborhood. Educational level is classified by highest degree
received as follows: (1) high school graduate, (2) associate degree, (3)
some college, (4) undergraduate degree, or (5) graduate degree.
Individuals are classified as smokers if they had smoked at least 100
cigarettes during their lifetime and currently smoke every day or nearly
every day (binary response variable). The explanatory variable is
education, with five categorical levels. The data may be viewed as a
naturalistic sample of a particular high socioeconomic community.
Table 18.1 shows cross-tabulated results
The is wedged between landmarks of 11.14 (right tail =
0.025) and 13.28 (right tail = 0.01) on the distribution.