0% found this document useful (0 votes)
10 views48 pages

Understanding Hypothesis Testing Basics

Uploaded by

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

Understanding Hypothesis Testing Basics

Uploaded by

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

Hypothesis

Testing
Hypothesis Testing
• The majority of statistical analyses
involve comparison, most obviously
between treatments or procedures or
between groups of subjects.

• Hypotheses are formulated,


experiments are performed, and results
are evaluated for their consistency
(non-consistency) with a hypothesis.
•As we saw in the previous
chapter; one approach is by
constructing confidence
interval; and the other
approach is hypothesis
testing.
•The purpose of HT is to aid the
clinician or researcher in reaching
a decision (conclusion) concerning
a population by examining a
sample from that population.
Hypothesis
Hypothesis: is an assumption or a
statement which may or may not be true
concerning one or more population.
 It’s a statement about a population
parameter.
• E.g. – the mean BMI of Haramaya
university students is 21 kg/m².
• -- The prevalence of HIV among non-
married adults is higher than that of
married adults.
Types of Hypothesis
1. The Null Hypothesis, Hο
· Is a statement claiming that there is
no difference between the
hypothesized value and the population
value.
(The effect of interest is zero = no
difference)

· The main hypothesis that we wish to


The Null Hypothesis
 Hο is a statement of agreement
(or no difference)
 Hο is always about a population
parameter, not about a sample
statistic.
 Hο: µ = 21 kg/m²
 Hο: P₁ = P₂
2. The Alternative Hypothesis, HA
•Is a statement of what we will
believe is true if our sample data
causes us to reject Ho.
• Is generally the hypothesis that
is believed (or needs to be
supported) by the researcher.
Alternative Hypothesis
•Is a statement that disagrees
(opposes) with Ho.
(The effect of interest is
not zero)
·Never contains equality “=”
sign.
Example
• For example if the mean BMI is questioned
then the alternative hypothesis would be
written as:
H :
A µ ≠ 21 m/kg²
Similarly for the prevalence of HIV;

 H : P₁ ≠ P₂
A
Steps in Hypothesis Testing
[Link] the appropriate
statistical hypotheses clearly.
(a) Specify the null hypothesis
H0:  = 0
(b) Choose an alternative
hypothesis, which is accepted if
H0 is rejected
H :
2. Specify the desired level of significance
for the statistical test (=0.05, 0.01, etc.)
3. Determine the critical value.
• A value the test statistic must attain to be
declared significant.

-1.96 1.96 1.645 -1.645


4. Choose appropriate sample from a
population and compute the appropriate
statistic e.g. mean, proportion etc.
5. Reach a decision and draw the
conclusion
• If Ho is rejected, we conclude that HA
is true (or accepted).
• If Ho is not rejected, we conclude
that Ho may be true.
Rules for Stating
Statistical Hypotheses
1. One population
= ) must appear in Ho.
• Indication of equality (

Ho: μ = μo, H A: μ ≠ μ o
Ho: P = Po, HA: P ≠ Po
• Can we conclude that a certain population mean
is not 50?
Ho: μ = 50 and HA: μ ≠ 50
• Can we conclude that the proportion of
patients with leukemia who survive
more than six years is not 60%?

Ho: P = 0.6 H A: P ≠
0.6
2. Two populations
Ho: μ1 = μ2 H A: μ 1 ≠
μ2
Ho: P1 = P2 H A: P 1 ≠
P2
E.g. can we conclude that the
proportion of individuals with
In summary
1. What you hope to conclude should
be placed in the HA.
2. The Ho should have a statement of
equality.
3. The Ho is the hypothesis that is
tested
4. The Ho and HA are complementary.
• Now think about how the hypothesis
test should be carried out
• We draw a random sample of size n
from the underlying population and
calculate its sample mean (¯x)
• We compare (¯x) to the postulated
mean μ0
• Is the difference between (¯x) and μ0
too large to be attributed to chance
Decision Rule
•Computed from the data of the
sample
•The decision to reject or not to
reject the Ho is based on the
magnitude of the test statistic.
• An example of a test
statistic is the quantity
Example: Two-sided test at α 5%

= 0.025 = 0.025
0.95

-1.96 1.96
Rejection Non-rejection Rejection
region region region
Statistical Decision
• Reject Ho if the value of the test
statistic that we compute from our
sample is one of the values in the
rejection region
• Don’t reject Ho if the computed
value of the test statistic is one of
the values in the non-rejection
region.
Level of Significance, α
•Is the probability of rejecting a
true Ho
•Defines unlikely values of
sample statistic if Ho is true
• Defines rejection region of the
sampling distribution
•The decision is made on the
basis of the level of significance,
• More frequently used
values of α are 0.01, 0.05
and 0.10.
• α is selected by the
researcher at the beginning
Another way to state
conclusion
• Reject Ho if P-value < α
• Accept Ho if P-value ≥ α

P-value is the probability of


obtaining a test statistic as
extreme as or more extreme than
the actual test statistic obtained if
the Ho is true
Types of Errors in Hypothesis
Tests
• Whenever we reject or accept
the Ho, we commit errors.
• Two types of errors are
committed.
• Type I Error
• Type II Error
Type I Error, α

•The probability of a type I error is


the probability of rejecting the Ho
when it is true
•The probability of type I error is α
• Called level of significance of the
test
Type II Error, 
•The error committed when a
false Ho is not rejected
•The probability of Type II
Error is 
Illustration of the two types of
errors
Action Reality
(Conclusion)
Ho True Ho False

Fail to Correct action Type II error (β)


reject Ho

Reject Ho Type I error (α) Correct action


Hypothesis Test for One
Sample
• Test for single mean
• Test for single proportion
Hypothesis Test for Two
Samples
• Test for the difference between two
population means
• Test for the difference between two
population proportions
Hypothesis Testing of a Single Mean

Assumptions:
•The population variance is
known
•Normally distributed population
The test statistic is given by:
Example
• Assume that the mean age of a certain
country is 30 years with a variance of 20
years. A random sample of 10 persons
from city X of the same country has a mean
age of 27 years. Does the mean age of
individuals living in city X differ from
inhabitants of the country in general, at
5% level of significance?
1. Data
• n = 10
• X‾ = 27 years
• α = 0.05
2. Assumptions
• Random sampling
• Normally distributed in the population
• Population variance is known
[Link]
• Hο: μ0 = 30 (the mean age of city X is
the same as that of the
whole country)
•H :
A μ0 ≠ 30
4. Test statistic
5. Decision Rule
• Reject Ho if the Z value falls in the rejection
region.
• Don’t reject Ho if the Z value falls in the non-
rejection region.
• Because of the structure of Ho it is a two tail
test. Therefore, reject Ho if Z ≤ -1.96 or Z ≥
1.96.
6. Calculation of test statistic

7. Statistical decision
We reject the Ho because Z = -2.12 is in the
rejection region. The value is significant at
5% α.
8. Conclusion
We conclude that the mean age of the
country (µ) is not 30 years.
P-value = 0.0340

A Z value of -2.12 corresponds to an area


of 0.0170. Since there are two parts to
the rejection region in a two tail test,
the P-value is twice this which is .0340.
2. Hypothesis Testing about the
Difference Between Two Population
Means
(Normally Distributed)

Ho: µ1- µ2 = 0 i.e. Ho:


µ1 = µ2
HA: µ1 - µ2 ≠ 0 i.e. HA: µ1
≠ µ2
Known Variances
(Independent Samples)
• When two independent samples are
drawn from a normally distributed
population with known variance, the
test statistic for testing the Ho of equal
population means is:
Example:
• Researchers wish to know a difference in mean
serum uric acid (SUA) levels between normal
individuals and individuals with Down’s
syndrome. The means SUA levels on 12
individuals with Down’s syndrome and 15
normal individuals are 4.5 and 3.4 mg/100 ml,
respectively. with variances. (2=1, 2=1.5,
respectively). Is there a difference between the
means of both groups at α 5%?
• Hypotheses:
Ho: µ1- µ2 = 0 or Ho: µ1 =
• With α = 0.05, the critical values of Z are -
1.96 and +1.96. We reject Ho if Z < -1.96
or Z > +1.96.


• Reject Ho because 2.57 > 1.96.
• From these data, it can be concluded
that the population means are not
equal. A 95% CI would give the same
conclusion. P-value=0.01
Hypothesis Testing about
a Single Population
Proportion
Example
• We are interested in the probability of
developing asthma over a given one-year
period for children 0 to 4 years of age
whose mothers smoke in the home. In the
general population of 0 to 4-year-olds, the
annual incidence of asthma is 1.4%. If 10
cases of asthma are observed over a single
year in a sample of 500 children whose
mothers smoke, can we conclude that this
is different from the underlying probability
of p0 = 0.014? α = 5%
•Hypotheses:
Ho: P = 0.014
HA: P ≠ 0.014
The test statistic is given by:
• The critical value of Zα/2 at α=5% is ±1.96.
• Don’t reject Ho since Z =1.14 lies in the
non-rejection region between ±1.96.
• P-value = 0.2548
• We do not have sufficient evidence to
conclude that the probability of developing
asthma for children whose mothers smoke
in the home is different from the
probability in the general population.

You might also like