Professional Documents
Culture Documents
HYPOTHESIS TESTING
1. POPULATION PARAMETERS I.
György Benoist
2022/2023 Spring
INFERENTIAL STATISTICS
1. ESTIMATION
determining a value of an unknown parameter of the
population by using a sample
2. HYPOTHESIS TESTING
testing a statement (assumption) concerning the population
(parameter or other feature - stochastic relation) with the help
of a sample
2
STEPS
1. Determining the parameter/relation in question
2. Setting up null- and alternative hypotheses
3. Defining test statistic and collecting/calculation necessary
information (data)
4. Calculating test-function
test statistic
5. Calculating critical value(s)/rejection region
6. Decision making
7. Answering the original question/statement
3
Hypothesis testing
1 POPULATION 2 POPULATIONS
4
PARAMETRIC
5
POPULATION PARAMETERS
• expected value (μ)
„the average working time is 2 years”
• proportion (P)
„40% of the customers spend more than 2000 HUF”
„the rate of red boxes is at least 200”
• standard deviation (σ)
„the standard deviation of filling weights is at most 5 grams”
6
HYPOTHESES
Null-hypothesis Alternative hypothesis
H0 H1 (HA)
Θ = Θ0 Θ ǂ Θ0 two-tailed (two-sided)
Θ ≥ Θ0 Θ < Θ0 one-tailed (one-sided) left/lower tailed (left sided)
Θ ≤ Θ0 Θ > Θ0 one-tailed (one-sided) right/upper tailed (right sided)
7
TEST STATISTIC
= a tool for testing the hypothesis
• its value depends on the sample
• two components:
• value of test-function
• critical value(s) rejecting region
• significance level (α): the probability that the test-function falls
into the rejection region
• testing one or two population parameters
8
1 POPULATION
9
TEST-FUNCTIONS
Testing for the population mean (expected value; μ)
• large sample (n ≥ 100) xത − m0
z=
s/ n
• normal distribution, small sample, standard deviation of the
population (σ) is known xത − m0
z=
σ/ n
• normal distribution, small sample, standard deviation of the
population (σ) is unknown
xത − m0
t=
s/ n
10
TEST-FUNCTIONS
Testing for the population proportion (P)
where Q 0 = 1 − P0
11
TEST-FUNCTIONS
Testing for the population standard deviation (variance: σ2)
12
CRITICAL VALUE(S) – REJECTING REGION(S)
H0 : parameter = value
Rejection region = α H1 : parameter ǂ value
(2 * α/2)
two-tailed test
1-α
α/2 α/2
cl cu
Reject H0 Fail to reject (do not reject) H0 Reject H0
13
CRITICAL VALUE(S) – REJECTING REGION(S)
H0 : parameter = (≥) value
Rejection region = α H1 : parameter < value
cl
Reject H0 Fail to reject (do not reject) H0
14
CRITICAL VALUE(S) – REJECTING REGION(S)
H0 : parameter = (≤) value
Rejection region = α H1 : parameter > value
cu
Fail to reject (do not reject) H0 Reject H0
15
FUNCTIONS DETERMINING CRITICAL VALUES
two-tailed one-tailed degree of freedom
Parameter function
lower (cl) upper (cu) lower (cl) upper (cu) one population two populations
NORM.S.INV - -
Expected value (μ)
T.INV n-1 n1+n2-2
α 1-α
Porportion (P) NORM.S.INV α/2 1-α/2 - -
CHISQ.INV n-1
Standard deviation (σ)
F.INV n1-1 and n2-1
16
DECISION
H0 : parameter = value
H1 : parameter ǂ value
α/2 α/2
value of the test-
function
cl cu
Reject H0 Fail to reject (do not reject) H0 Reject H0
17
DECISION
• always about null-hypothesis! (reject or fail to reject)
(never „accepting”)
in research: discredit the statement of H0 and supporting the
statement in H1
• it is probabilistic (another sample could lead to opposite decision)
18
ERRORS
Decision Actual situation
(conclusion) H 0 is true H 0 is false
Correct decision
Fail to reject H0 Type II error (β)
(1-α)
Correct decision
Reject H0 Type I error (α)
(1-β)
The two types of errors can not happen at the same time.
If Type I error probability (α) is decreasing, than Type II error probability (β) is increasing.
19
EXAMPLE 1
cl = - NORM.S.INV(1-α) = -1.6449
cl = NORM.S.INV(α)
decision: H0 is rejected 22
b) According to the quality requirements the standard deviation of the average
operation time should be at most 10 months. Test whether this requirement is
fulfilled or not based on the sample.
parameter: standard deviation (σ)
H0: σ = 10 σ0 [≤]
H1: σ > 10
n − 1 ∗ s 2
test function χ2 = 19 ∗ 8.662
= = 14.24
σ20 10 2
23
b) According to the quality requirements the standard deviation of the average
operation time should be at most 10 months. Test whether this requirement is
fulfilled or not based on the sample.
H0: σ = 10
one-tailed test: „only one” rejection region (α)
H1: σ > 10
upper critical value
test function: 14.24
cu = CHISQ.INV(1-α;n-1) = 30.14
p − P0 0.52−0.5
test function z= = = 0.8
0.5∗(1−0.5)
P0 ∗ Q0 /n 400
25
H0: P = 0.5
one-tailed test: „only one” rejection region (α)
H1: P > 0.5
upper critical value
cu = NORM.S.INV(1-α) = 1.6449
26