10 Hypothesis Testing
10 Hypothesis Testing
Popul
ation
• Unknown Population parameters
para
mete
r
• Establish hypothesis about the population that’s testable on the
Rese
arch sample.
Hypo • Hypothesis is clear, brief, testable.
thesi
s
• Sample data, analysis and interference
Hypo
thesi
• Support or refute the research hypothesis
s • Make conclusions about the sample statistics
testin
g
Hypothesis Testing
• The general goal of a hypothesis test is to rule
out chance (sampling error) as a plausible
explanation for the results from a research
study.
• Hypothesis testing is a technique to help
determine whether a hypothesis is true (e.g.
treatment, procedure has an effect in a
population), or simply if a relationship exists
between two or more variables.
Research hypothesis vs Null hypothesis
Research hypothesis (H1) is what the research believes to be a true
reflection on the general population. Another word, a true
explanation for a phenomena in the population. The researcher
wants to prove that his sample statistics is different than the
population parameters. Research hypothesis is also called
alternative hypothesis
Null hypothesis (H0) is the opposite of H1. The H0 assumes no
difference of test statistics and the population parameter. This
means that the researcher hypothesis about a certain phenomena
is not correct, and that there is no real difference between sample
and population for a certain feature or difference is due another
reason (that is not tested).
Null Hypothesis vs Alternative Hypothesis
Null hypothesis H0 Alternative Hypothesis H1
There is no relationship or There is a relationship or
difference difference
Refers to the population Refers to the examined sample
Research aims to reject the null Research aims to accept the
alternative
Represent an original Prove statistically a systemic
assumption difference or relationship
Assumes a difference is due to Assumes that difference is less
chance likely to be due to chance.
How to establish a good hypothesis?
• Clear and declarative statement. Not a
question.
• Show a relationship between variables
• Reflect a body of literature or a theory
• Be direct, explicit, and to the point.
• Be testable and measurable.
Six Steps of Hypothesis testing
1. Set your hypothesis.
2. Set level of significance associated with the hypothesis.
3. Compute the appropriate test statistics (t-test, F-test, Chi-
square, etc.).
4. Set the critical value needed to reject the null hypothesis
(from Tables).
5. Compare the test statistics value with the critical value of
rejection.
6. Decide whether to reject the null hypothesis and confidence
statement.
Step 1
• Set your hypothesis
Set both H0 & H1.
Step 2
• Set level of significance associated with the
hypothesis.
1% 2.5% 5% 5% 2.5% 1%
Step 3
• Compute the appropriate test statistics (t-test,
F-test, Chi-square, etc.).
1. Determine which test statistics you should
used based on the research question.
2. Determine the comparison measurement (i.e.
mean, variance).
3. Do the statistical test to define where the
obtained value is located on the standardized
curve of the distribution
Step 4
• Set the critical value needed to reject the null
hypothesis (from Tables).
• You might need the table of Z-test, t-test, F-
test.
• Based on the chosen table, look for the cut off
value based on the level of significance you
determined in step 2.
Step 5
• Compare the test statistics value with the
critical value of rejection.
Does Z-value = or value from the table
Step 6
• Decide whether to reject the null hypothesis
and confidence statement.
No difference
The locations of the critical region boundaries for three different levels of significance:
α = .05, α = .01, and α = .001.
Type 1 & Type 2 errors
• Type 1 error: reject the null when the null is true
– P (Type I error) = α level or level of significance
• Type 2 error: accept the null when the null is false
– P (Type II error): β level
– Type 2 error reflects what’s called Power
– Power = 1 – β
– As sample size increases, Type II error decreases
– If other factors are constant, raising α level from .05 to
.10, β level decreases
Questions on Type 1 & 2 errors
• If the power of the study decrease, what
happens to α level ? decrease
• If a researcher is less confident about his
hypothesis, which error will increase? Beta
• If you are about to loose a million $ from
rejecting the null, which error should you
decrease? Alpha
• If you increase your sample size, what will
happen to α, β, and power? Increase, dec, inc
Hypothesis Testing for m
• Step 1:Set your hypothesis
H0: m=m0, H1: m>m0, m<m0, m≠m0
• Step 2: Set level of significance associated with the hypothesis
a = 0.05
• Step 3: Compute the appropriate test statistics
Test Statistic
When n>30 n<30
X - μ0
t
s/ n
• Step 4: Set the critical value needed to reject the null hypothesis (from Tables).
Critical values for a = 0.05 is 1.96 in a 2-tailed test.
• Step 5: Compare the test statistics value with the critical value of rejection.
Suppose we got a test statistics of 2. This is larger than 1.96.
• Step 6: Decide whether to reject the null hypothesis and confidence statement.
reject the H0. ….
Z-test
• Used to determine probability that a given
sample is representative of the known
population
• H0 : the two means represent the same
population
(hypothesized population mean = known
population mean)
• You can use the z test only when μ and σ are
known
‘Z’ as a statistical test
• Z test-statistic converts a sample mean into a z-score from the
null distribution.
•Zcrit is the criterion value of Z that defines the rejection region
•Ztest is the value of Z that represents the sample mean you
calculated from your data
X H0
Z test
X
• p-value is the probability of getting a Ztest as extreme as yours
under the null distribution
• All test statistics are fundamentally a comparison between what
you got and what you’d expect to get from chance alone
One-tailed tests
Points Right
alpha
Values that
differ “significantly”
100 Zcrit
from 100
Left-tailed tests
H0: µ = 100
H1: µ < 100
Points Left
alpha
Values that
differ “significantly” 100
Zcrit
from 100
Two-tailed hypothesis testing
• HA is that µ is either greater or less than µH0
HA: µ ≠ µH0
alpha
2. a=0.05
X - μ0
3. Z
s/ n
2. a=0.05
p̂ - p 0
Z
3. p 0 (1 - p 0 )
n
Salem weighs himself once a week for four weeks. The average
of these four measurements is 75.4kg.
2. a=0.05
z = 75.4-72 = 2.26
3
Reject H0
4
0.01
x = 72
x= 1.5 75.4
0 1.65 2.26
Zcrit Ztest
Confidence Intervals
• CI = Interval that contain the sample statistics
gained to estimate a population parameter.
• A powerful statistics to support your findings.
• In todays world, CI are required to report in
statistical results that’s meant for publication.
• It’s a percentile in the normal distribution
curve. So what’s percentile?
Percentiles of the Normal Distribution
Eg., 90th percentile is the score that holds 90% of the scores
below it.
97.5th 1.960 0
-4 -3 -2 -1 0 1 2 3 4