0% found this document useful (0 votes)
8 views58 pages

Testing of Hypothesis

The document discusses hypothesis testing, focusing on the z-test and chi-square test, outlining the steps involved in hypothesis testing, types of hypotheses, and the significance level. It explains the process of testing a single population mean, the difference between two population means, and provides examples of statistical decision-making. Additionally, it covers the chi-square test applications, including tests of proportions, association, and goodness of fit.

Uploaded by

Abhilpsa
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)
8 views58 pages

Testing of Hypothesis

The document discusses hypothesis testing, focusing on the z-test and chi-square test, outlining the steps involved in hypothesis testing, types of hypotheses, and the significance level. It explains the process of testing a single population mean, the difference between two population means, and provides examples of statistical decision-making. Additionally, it covers the chi-square test applications, including tests of proportions, association, and goodness of fit.

Uploaded by

Abhilpsa
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/ 58

Testing of Significance-I (z-test &

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

The purpose of hypothesis testing is to aid the clinician, researcher, or


administrator in reaching a conclusion concerning a population by
examining a sample from that population
Types of Hypotheses

Researchers are concerned with two types of hypotheses—


research hypotheses and statistical hypotheses
Research hypothesis

The research hypothesis is the conjecture or supposition that motivates


the research

❖ It may be the result of years of observation on the part of the


researcher. A public health nurse, for example, may have noted
that certain clients responded more readily to a particular type of
health education program.

❖ A physician may recall numerous instances in which certain


combinations of therapeutic measures were more effective than any
one of them alone
Statistical Hypothesis
Statistical hypotheses are hypotheses that are stated in such a way that
they may be evaluated by appropriate statistical techniques

We are concerned with statistical hypothesis


Steps involved in hypothesis testing
1.Data- The nature of the data that form the basis of the testing
procedures must be understood, since this determines the particular
test to be employed. Whether the data consist of counts or
measurements, for example, must be determined

2. Assumptions- Assumptions about the normality of the distribution,


equality of variances, and independence of samples
3. Hypotheses- There are two statistical hypotheses involved in
hypothesis testing, and these should be explicitly stated.

The null hypothesis is the hypothesis to be tested. It is designated by


the symbol H0. The null hypothesis is sometimes referred to as a
hypothesis of no difference, since it is a statement of agreement with
(or no difference from) conditions presumed to be true in the
population of interest.

In general, the null hypothesis is set up for the express purpose of


being discredited. Consequently, the complement of the conclusion
that the researcher is seeking to reach becomes the statement of the
null hypothesis.
In the testing process the null hypothesis either is rejected or is not
rejected. If the null hypothesis is not rejected, we will say that the
data on which the test is based do not provide sufficient evidence to
cause rejection.

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.

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 HA or H1.
Can we conclude that a certain population mean is not 50?

Suppose we want to know if we can conclude that the


population mean is greater than 50. Our hypotheses are-
If we want to know if we can conclude that the population mean is
less than 50, the hypotheses are
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, the particular value observed depending on the particular
sample drawn.

The test statistic serves as a decision maker, since the decision to


reject or not to reject the null hypothesis depends on the magnitude
of the test statistic.

An example of a test statistic is the quantity


5. Distribution of the Test Statistic- It has been pointed
out that the key to statistical inference is the sampling
distribution. We are reminded of this again when it
becomes necessary to specify the probability distribution
of the test statistic. The distribution of the test statistic

For example, follows the standard normal distribution if the


null hypothesis is true and the assumptions are met
6. 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 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 α.

The level of significance, α, specifies the area under the


curve of the distribution of the test statistic that is above
the values on the horizontal axis constituting the
rejection region.
Types of errors
The level of significance α is a probability and, in fact, is the
probability of rejecting a true null hypothesis

The error committed when a true null hypothesis is


rejected is called the type I error.

The type II error is the error committed when a false null


hypothesis is not rejected. The probability of committing a
type II error is designated by β.
Testing a single population mean

When sampling is from a normally distributed population and


the population variance is known, the test statistic for testing
H0 : μ = μ0 is-
Researchers are interested in the mean age of a certain population. Let
us say that they are asking the following question: Can we conclude
that the mean age of this population is different from 30 years?

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.

Assumptions: It is assumed that the sample comes from a population


whose ages are approximately normally distributed. Let us also assume
that the population has a known variance of σ2= 20.
Hypotheses

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.

We conclude that μ is not equal to 30 and let our


administrative or clinical actions be in accordance with
this conclusion
p Values: Instead 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 instance these writers would give the
computed value of the test statistic along with the statement p = .0340. The
statement p = .0340 means that the probability of getting a value as extreme as 2.12
in either direction, when the null hypothesis is true, is .0340.

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.

Conclusion: We conclude that the population mean is smaller


than 30 and act accordingly.
Difference between two population means (when
population variance is known)
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 cases, one or the other of the following hypotheses may be
formulated:
The test statistic Z is given by

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

The data constitute two independent simple random


samples each drawn from a normally distributed
population with a variance equal to 1 for the Down's
syndrome population and 1.5 for the normal population
Let α = 0.05.The critical values of z are ± 1.96. Reject
H0 unless -1.96 < zcomputed < 1.96. The rejection and
nonrejection regions are shown in figure
Conclusion- On the basis of these data, there is an indication
that the two population means are not equal.
Chi-square Test
Applications

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.

Figure 18.5 depicts the placement of this test statistic,


demonstrating that P ≈ 0.01
The association is significant at α = 0.05 and
is almost significant at α = 0.01

The data demonstrate a negative (inverse) association


between education level and the prevalence of smoking
(P = 0.010)
(Estrogen trial). We considered results from the estrogen trial of the
Women’s Health Initiative study. The incidence of the combined
morbidity index in the treatment group was 751 per 8506 (8.83%). The
incidence in the control group was 623 of 8102 (7.69%). The test
of H0: p1 = p2 yielded zstat = 2.66, P = 0.0078 (two-sided). Apply chi-
square test of association and check for significance.
Hypotheses. H0: no association in source population is
equivalent to H0: p1 = p2. Ha: association in source population is
equivalent to Ha: p1 ≠ p2
This chi-square statistic has df = (R − 1) × (C − 1) = (2 − 1) × (2 − 1) =
1

The results are statistically significant at the α = 0.01 level but


not at the α = 0.005 level.

Conclusion. The group that received estrogen was


significantly more likely to experience the combined index
outcome than the placebo group (8.8% vs. 7.7%, P = 0.0077)

You might also like