Lesson 7 – Hypothesis Testing
Hypothesis Testing
- aids the researcher to decide whether to accept or reject a formulated statement or hypothesis after the
evaluation of the sample
Assumptions vs Hypotheses
- Assumptions
o statements are formulated and accepted to be true without the necessity of proof
o act as a springboard or the starting point of the body
- Hypotheses
o statements are formulated which cannot be accepted to be true unless otherwise proven
o 2 Types:
Null Hypothesis (H0)
no difference or a no relationship hypothesis
neutrality and objectivity which must be present in any research undertaken
tells the exact opposite of what an investigator or experimenter predicts or expects
Alternative/Predictive Hypothesis (H1)
suggests or advises a potential result or an outcome that an investigator or the
researcher may expect
categories:
o Non-directional
specifies an existence of a difference or a relationship
no definite direction of the expected findings being specified
o Directional
specifies one group is better than the other
explains the direction of the expected findings
sometimes, it is developed to examine the relationship among the
variables rather than the comparison between the groups
Example:
TITLE: The NSAT Scores and Academic Achievement of the Students in Private and Public Schools
H0
there is no significant relationship between the NSAT performance and the academic
achievement among the four learning areas of private schools, public schools, and
combination of private and public schools
H1
Alternative Hypothesis
o there is a significant relationship between the NSAT performance and the
academic achievement among the four learning areas of private schools, public
schools, and combination of private and public schools
a non-directional
Predictive Hypothesis
o the NSAT performance among the four learning areas of private schools, public
schools are better than their academic achievement
directional
One-Tailed vs Two-Tailed
- One-Tailed
o the rejection region which is equal to the value of α is placed only on one of the tails of the distribution
o has one critical value, either positive or negative
- Two-Tailed
o considers the two tails of the distribution as the rejected region
o the value of α is equally divided into the two tails of the distribution
o has two critical values, one positive and one negative
- IMPORTANCE
o in statistics hypothesis testing, we need to judge whether it is a one-tailed or a two-tailed test so that we
can find the critical values in tables such as Z distribution table and T distribution table. Then, by
comparing test statistics value with the critical value or whether the statistics value falls in the critical
region, we can make a conclusion either to reject the null hypothesis or to fail to reject it.
- How to know if one tail or two tail?
o depends on the original clam in the question
o one-tailed test
looks for an increase or decrease in the parameter
keywords:
greater
larger
increased
improved
decreased
less
smaller
o two-tailed test
looks for a change, this could be an increase or decrease in the parameter
keywords:
change
the same
different
difference
Type I Error
- committed if the null hypothesis is accepted when it is false
Type II Error
- not rejecting the null hypothesis when it’s actually false
Level of Significance (α)
- probability of committing a type 1 error
- associated with the physical region or rejection of the test
- decided by the researcher
Level of Confidence
- A=(1−∝)
- associated to the acceptance region of the test
Confidence Interval
- interval within which a researcher may exert with a certain degree of confidence that the population parameter
lies
Critical Value
- value that divides the distribution of the test into the rejection and acceptance region
Steps in Hypothesis Testing
1. formulate the null hypothesis, H0
2. select an appropriate alternative null hypothesis, H 1
3. determine the level of significance to be used
4. choose an appropriate test statistic and determine the critical value of the test statistic
5. find the value of test statistic using the sample data
6. make the decision.
o Reject H0 if the absolute computed value of the test statistic is greater than the absolute critical value,
otherwise accept H0
o Notes:
computed value > critical value, reject
computed value < critical value, accept
Testing the Difference between Means of Two Normal Populations
- z-test
o used when the population standard deviation, σ (sigma) is known
o comparison studies make use of the z-test if the population SD is known, or if σ is not known but sample
size is greater than or equal to 30 (n>30)
- t-test
o used when the population SD is unknown
o size is lesser than 30 (n<30)
- One Sample Mean Test
x−μ
z= ( n−μ) √n
o σ or z=
σ
√n
x = sample mean
μ = population mean
σ = population SD
n = size of the sample
Example
It is claimed that the average weight of a bag of biscuit is 250 grams with a standard deviation of 20.5
grams. Would you agree to this claim if a random sample of 50 bags of biscuits showed an average
weight of 240grams, using 0.05 level of significance?
Solution:
H0
μ=250 grams
H1
μ ≠ 250 grams
α = 0.05
Test Statistics
Z-test since the population SD is known
critical value of Z using a two-tailed test at 0.05 level
1.96 and -1.96
Computation
Given
μ = 250 grams
x = 240 grams
σ = 20.5 grams
n = 50 bags
Solution
(240−250) √50
z=
20.5
z=−3.45
Decision:
reject H0 and accept H1 since /-3.45/ is greater than /-1.96/, at the 0.05 level of significance.
Therefore, the claim of the manufacturer that the average weight per bag of biscuit is 250 grams
is not true
- Two Sample Mean Test
( x− y )−(μ x −μ y )
z=
√
o σx 2 σy 2
+
nx ny
μ x = population mean of one sample
μ y = population mean of other sample
x = mean of one sample
y = mean of another sample
σ x = population SD of one sample
σ y = population SD of other sample
n x = size of one sample
n y = size of another sample
Example
Fifteen pupils from school B have mean IQ of 110 and a variance of 64, while 20 pupils from school C
show a mean IQ of 114 and a variance of 78. Is there a significant difference between their IQ using a
0.01 level of significance?
Solution:
H0
μ B=μC
H1
μ B ≠ μC
α = 0.01
Test Statistics
Z-test since the population SD is known
critical value of Z using a two-tailed test at 0.01 level
2.575 and -2.575
Computation
Solution
( 110−114 )−(0)
z=
√
64 78
+
15 20
z=−1.3994∨−1.40
Decision:
accept H0 and reject H1 since /-1.40/ is less than /-2.575/. Therefore, there is no significant
difference between the IQ of pupils from school A and B at the 0.01 level
Test Concerning Proportion
- Test about Any Value of a Population Proportion
o z=
( p−P)
Sp √
; S p= pq
n
p = proportion of the sample possessing the given characteristic
P = proportion of the population possessing the given characteristic
q = 1-p = proportion of the population possessing the given characteristic
n = size of the sample
S p = standard error of the statistic
Example
Thirty five percent (35%) of the people on the average afflicted with a certain disease die from it. Under
a new treatment, only 22% out of 200 patients die from it. Can we say that the new treatment is
effective, using 0.05 level of significance?
Solution:
H0
P=35 %
H1
P<35 %
α = 0.05
Test Statistics
z=
( p−P)
Sp √
; S p=
pq
n
critical value of Z using a two-tailed test at 0.01 level
1.645 and 1.645
Computation
Solution
z=
0.22−0.35
0.03
;S p=
√
(0.22)(0.78)
200
z=−4.3333333∨−4
Decision:
reject H0 and accept H1 since /-4.33/ is greater than /-1.645/. Hence, we can say that the new
treatment is effective at 0.05 level of significance
Small Sample Test of Hypothesis for the Difference in Means
- One Sample Mean Test
(x−μ)
o
t= (x−μ) √ n
s or t=
s
√n
x = sample mean
μ = population mean
s = sample SD
n = size of the sample
o df =n−1
Example
An ice cream dispenser dispenses 5 ounces of ice cream per serving. To set the machine is under control,
a sample of 25 servings showed an average amount of 5.08 ounces with a standard deviation of 0.68
ounces. Is the machine under control, using a 0.01 level of confidence?
Solution:
H0
μ=5.0
H1
μ ≠5.0
α = 0.01
Test Statistics
(x−μ)
t= (x−μ) √ n
s or t=
s
√n
df =25−1=24
critical value of t at 0.01
2.797 and -2.797
Computation
Solution
(5.08−5.0) √ 25
t=
0.68
t=0.59
Decision:
accept H0 and reject H1, since /0.59/ is less than /2.797/. Hence, the machine is under control at
the 0.01 level of confidence
- Two Sample Mean Test
( x− y )−( μ x −μ y )
z=
√ ( nx −1 ) S +( n −1 ) S
√
o
1 1
y
+
2 2
x y
n x +n y−2 nx ny
x = mean of one sample
x = mean of another sample
μ x = population mean of one sample
μ y = population mean of the other sample
S x = sample variance of one sample
2
S y = sample variance of the other sample
2
n x = size of one sample
n y = size of another sample
o df =n x + n y −2
Example
A random sample of 25 brand C softdrinks had a mean content of 237mL with a variance of 8.56mL,
while a sample of 20 brand P softdrinks had a mean content of 240mL with a variance of 9.75mL. Using a
0.05 level, is there a difference in the mean content of the two brands of softdrinks?
Solution:
H0
μc =μ p
H1
μc ≠ μ p
α = 0.05
Test Statistics
( x− y )−( μ x −μ y )
z=
√ ( nx −1 ) S +( n −1 ) S
n x +n y−2
df =25+20−2=43
x
2
y y
2
√ 1 1
+
nx ny
critical value of t at 0.05
2.018 and -2.018
Computation
Solution
( 237−240 )−(0)
z=
√
( 25−1 )8.56+( 20−1 ) 9.75 1 1
t=0.59
25+20−2
+
25 n❑ √
Decision:
reject H0 and accept H1, since/-13.32/ is greater than /-2.018/. Thus, there is a difference in the
mean content of softdrink between the two brands at 0.05 level