Module 6 - Hypothesis Testing - Updated
Module 6 - Hypothesis Testing - Updated
[Link]
Hypothesis Testing
Hypothesis in Research
▪ A hypothesis serves as a primary instrument in research, guiding the
direction of studies and investigations
2
Hypothesis Testing
Hypothesis in Research
▪ In social sciences, where population parameters are rarely known,
hypothesis testing is a commonly used strategy for generalization
4
Hypothesis Testing
What is Hypothesis?
▪ A research hypothesis is often a predictive statement linking independent
and dependent variables
▪ Examples:
“Students receiving counselling will show greater creativity than those
who do not.”
“Automobile A performs as well as Automobile B.”
▪ A hypothesis clearly states what the researcher is looking for and must be
capable of empirical testing
5
Hypothesis Testing
Characteristics
▪ Clarity and Precision: A hypothesis should be clear, specific, and precise,
ensuring reliable interpretation of results
6
Hypothesis Testing
Characteristics
▪ Simplicity: The hypothesis should be simple and easy to understand,
without compromising its significance
7
Hypothesis Testing
Basic Concepts
Null hypothesis and alternative hypothesis
8
Hypothesis Testing
Basic Concepts
Null hypothesis and alternative hypothesis
9
Hypothesis Testing
Basic Concepts
Null hypothesis and alternative hypothesis
10
Hypothesis Testing
Basic Concepts
Null hypothesis and alternative hypothesis
▪ Alternative hypothesis is usually the one which one wishes to prove and the
null hypothesis is the one which one wishes to disprove
▪ Null hypothesis should always be specific hypothesis i.e., it should not state
about or approximately a certain value
11
Hypothesis Testing
Basic Concepts
Why do we proceed on the basis of null hypothesis?
On the assumption that null hypothesis is true, one can assign the
probabilities to different possible sample results, but this cannot be done if
we proceed with the alternative hypothesis. Hence the use of null hypothesis
(at times also known as statistical hypothesis) is quite frequent
12
Hypothesis Testing
Basic Concepts
Level of significance
13
Hypothesis Testing
Basic Concepts
Level of significance
▪ Example: A factory claims that only 2% of its light bulbs are defective. This
claim becomes the null hypothesis:
H₀ (null hypothesis): Defect rate = 2%
H₁ (alternative hypothesis): Defect rate > 2%
A quality inspector randomly samples 200 bulbs and tests them.
▪ Even if the factory is actually correct (true defect rate = 2%), there is still a
small chance (≤ 5%) that random sampling could produce an unusually high
number of defects like this. If that rare event happens, the inspector would
still reject H₀.
15
Hypothesis Testing
Basic Concepts
Decision Rule in Hypothesis Testing
16
Hypothesis Testing
Basic Concepts
Type I and Type II Errors
17
Hypothesis Testing
Basic Concepts
Type I and Type II Errors
18
Hypothesis Testing
Basic Concepts
Type I and Type II Errors
▪ With a fixed sample size (n), reducing Type I error (α) increases Type II
error (β)
▪ On the other hand, a Type II error in the same context could be far more
severe, such as allowing a defective chemical batch to pass, potentially
causing serious harm or danger to users
21
Hypothesis Testing
Basic Concepts
Two-tailed and One-tailed tests
▪ A two-tailed test rejects the null hypothesis if, say, the sample mean is
significantly higher or lower than the hypothesized value of the mean of
the population
▪ Thus, in a two-tailed test, there are two rejection regions*, one on each
tail of the curve
22
Hypothesis Testing
Basic Concepts
Two-tailed and One-tailed tests
23
Hypothesis Testing
Basic Concepts
Z (Test Statistic)
▪ Z tells you how many standard deviations your sample result is away from
the hypothesized population mean
24
Hypothesis Testing
Basic Concepts
Two-tailed and One-tailed tests
▪ One-tailed test would be used when we are to test, say, whether the
population mean is either lower than or higher than some hypothesised
value
26
Hypothesis Testing
Basic Concepts
Two-tailed and One-tailed tests
27
Hypothesis Testing
Basic Concepts
Two-tailed and One-tailed tests
28
Task
Two-Tailed Test (Material Strength)
29
Task
A manufacturer claims that a temperature sensor has a mean error of 0°C
(perfect calibration).
30
Hypothesis Testing
Procedure
▪ Hypothesis testing involves deciding, based on collected data, whether a
hypothesis is valid
▪ The key question:→ Should we accept or reject the null hypothesis (H₀)?
31
Hypothesis Testing
Procedure
1. Making a Formal Statement
▪ Key points:
Proper formulation is crucial
Determines the type of test:
One-tailed test → Hₐ is “greater than” or “less than”
Two-tailed test → Hₐ is “not equal to” 32
Hypothesis Testing
Procedure
2. Selecting a Significance Level
▪ Factors affecting α:
Difference between sample means
Sample size
Variability within samples
Nature of hypothesis: Directional | Non-directional
The chosen level should suit the purpose of the study
33
Hypothesis Testing
Procedure
3. Deciding the Distribution to Use
36
Hypothesis Testing
Procedure
37
Hypothesis Testing
Power of a test
Significance Level (α) is usually fixed in advance
▪ Since hypothesis tests are not perfect, there is always some possibility of
failing to reject a false null hypothesis
38
Hypothesis Testing
Power of a test
Focus is often placed on (1 − β), called the Power of the Test:
▪ The larger the power, the greater the test’s ability to detect departures
from the null hypothesis
▪ The power curve shows how the probability of rejecting H₀ changes as the
true parameter value moves away from the hypothesized value
41
Hypothesis Testing
Power of a test
Power Function:
▪ The mathematical function that defines the power curve is called the
power function
▪ For every possible value of the population parameter, the power function
gives the probability that H₀ will be rejected
▪ In fact, when the true parameter exactly equals the hypothesized value,
the probability of rejecting H₀ equals the significance level α
▪ It describes how likely the test is to retain the null hypothesis under
different conditions
44
Hypothesis Testing
Power of a test
▪ Example:
45
Hypothesis Testing
Power of a test
46
Hypothesis Testing
Power of a test
47
Hypothesis Testing
Power of a test
48
Hypothesis Testing
Tests
▪ Hypothesis testing helps decide whether a population assumption (null
hypothesis, H₀) is likely true or false using sample data
49
Hypothesis Testing
Tests
▪ Non-parametric tests are used when such assumptions cannot be made
▪ Non-parametric tests:
➢ Do not depend on population parameter assumptions
➢ Usually require more observations than parametric tests for similar accuracy
50
Hypothesis Testing
Tests
z-Test:
51
Hypothesis Testing
Tests
z-Test:
▪ Used for:
➢ Testing a sample mean against a hypothesized mean (large samples)
52
Hypothesis Testing
Tests
t-Test:
▪ Used for:
➢ Testing significance of a sample mean
▪ Based on chi-square-distribution
▪ Used for:
➢ Comparing sample variance with population variance
54
Hypothesis Testing
Tests
F-Test:
▪ Based on F-distribution
▪ Used for:
➢ Comparing variances of two independent samples
55
Hypothesis Testing
Tests
56
[Link]
Hypothesis Testing
Tests
1. Population normal, population infinite, sample size may be large or
small but variance of the population is known, Ha may be one-sided or
two-sided:
57
Hypothesis Testing
Tests
3. Population normal, population infinite, sample size small and variance of
the population unknown, Ha may be one-sided or two-sided:
58
Hypothesis Testing
Tests
5. Population may not be normal but sample size is large, variance of the
population may be known or unknown, and Ha may be one-sided or two-
sided:
59
Hypothesis Testing
60
Hypothesis Testing
61
Hypothesis Testing
62
Hypothesis Testing
63
Hypothesis Testing
Tests
Example 1:
64
Hypothesis Testing
Tests
Example 1:
65
Hypothesis Testing
Tests
Example 1:
66
Hypothesis Testing
Tests
Example 2:
67
Hypothesis Testing
Tests
Example 2:
68
Hypothesis Testing
Tests
Example 2:
69
Task
A specimen of steel wires drawn from a large lot has the following breaking
strengths (kg weight): 612, 605, 618, 610, 607, 614, 609, 611, 620, 604
Test, using Student’s t-test, whether the mean breaking strength of the lot
may be taken as: μ0=615 kg. Use a 5% significance level.
Task
▪ Example – Testing whether female workers earn less than male workers
for the same job
Ho: μ1 = μ2
73
Hypothesis Testing
Difference Between Means
1. Population variances are known or the samples happen to be large
samples:
74
Hypothesis Testing
Difference Between Means
2. Samples happen to be large but presumed to have been drawn from the
same population whose variance is known:
75
Hypothesis Testing
Difference Between Means
3. Samples happen to be small samples and population variances not
known but assumed to be equal:
76
Hypothesis Testing
Difference Between Means
Example 3:
77
Hypothesis Testing
Difference Between Means
Example 3:
78
Hypothesis Testing
Comparing Related Means
▪ Paired t-test is a way to test for comparing two related samples
➢ involving small values of n
➢ that does not require the variances of the two populations to be equal
➢ but the assumption that the two populations are normal must continue to
apply
80
Hypothesis Testing
Difference Between Means
Example 4:
81
Hypothesis Testing
Difference Between Means
Example 4:
82
Hypothesis Testing
Difference Between Means
Example 4:
83
Hypothesis Testing
Difference Between Means
Example 4:
84
Hypothesis Testing
Proportions
▪ Used for qualitative data involving the presence or absence of an
attribute, such as success/failure, defective/non-defective, yes/no
outcomes
▪ In a binomial distribution:
p = probability of success
q = probability of failure
p + q = 1 | n = sample size
85
Hypothesis Testing
Proportions
▪ Instead of counting the number of successes, we often use the sample
proportion of successes
86
Hypothesis Testing
Proportions
▪ Formulate the Null Hypothesis (H0) and Alternative Hypothesis (Ha)
▪ The significance of the observed sample result is then judged using this
procedure
87
Hypothesis Testing
Proportions
Example 5:
88
Hypothesis Testing
Proportions
Example 5:
89
Hypothesis Testing
Difference between Proportions
▪ Drawn from different populations, one may be interested in knowing
whether the difference between the proportion of successes is significant
or not
▪ Start with the hypothesis that the difference between the proportion of
success in sample one and proportion of success in sample two
is due to fluctuations of random sampling
▪ Null Hypothesis:
90
Hypothesis Testing
Difference between Proportions
91
Hypothesis Testing
Difference between Proportions
Example 6:
92
Hypothesis Testing
Difference between Proportions
Example 6:
93
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
▪ Used when testing whether a sample variance differs significantly from a
theoretical or hypothesized population variance
▪ This test uses the Chi-Square (χ2) Test, rather than the Z-test or t-test
▪ Test statistic:
94
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
▪ Testing Procedure
➢ Calculate the Chi-square statistic
▪ The test is based on the χ²-distribution, which arises from the summation
of squared quantities
97
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
▪ The distribution is not symmetrical and all the values are positive
▪ For making use of this distribution, one is required to know the degrees of
freedom since for different degrees of freedom we have different curves
▪ The smaller the number of degrees of freedom, the more skewed is the
distribution
98
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
Solution:
99
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
100
Hypothesis Testing
Comparing a Variance to a Hypothesized Population Variance
101
Hypothesis Testing
Chi-Square as a Non-Parametric Test
▪ Chi-square (χ²) is an important non-parametric statistical test requiring
minimal assumptions about the population
▪ The test mainly depends on: sample size, and degrees of freedom
103
Hypothesis Testing
Chi-Square as a Non-Parametric Test
▪ As a test of independence, χ² determines whether two attributes are
associated or independent
104
Hypothesis Testing
Conditions for the Application of Chi-Square Test
▪ Observations recorded and used are collected on a random basis
▪ No group should contain very few items, say less than 10. In case where
the frequencies are less than 10, regrouping is done by combining the
frequencies of adjoining groups so that the new frequencies become
greater than 10
105
Hypothesis Testing
Conditions for the Application of Chi-Square Test
▪ The overall number of items must also be reasonably large
106
Hypothesis Testing
Steps Involved
107
Hypothesis Testing
Steps Involved
108
Hypothesis Testing
Steps Involved
109
Hypothesis Testing
Steps Involved
110
Hypothesis Testing
Yates Correction
▪ Yates’ correction was proposed by F. Yates for improving the accuracy of χ²
tests in small samples
▪ It is specifically applied to: 2 × 2 contingency tables, especially when
expected cell frequencies are small
▪ The correction is recommended when: cell frequencies are close to 5,and the
calculated χ² value is near the significance level
▪ Yates’ correction is also called the: continuity correction
112
Hypothesis Testing
Questions
113
Hypothesis Testing
Questions
114
Hypothesis Testing
Questions
115
Hypothesis Testing
Questions
Two social researchers classified households into economic categories based
on independent sampling studies. Their observations are shown below:
116
Hypothesis Testing
Questions
A university conducted a study to determine whether participation in a
structured stress-management workshop helped students avoid severe
examination anxiety during final exams. The following data were collected:
Using the chi-square test, examine whether the workshop was effective in
reducing severe examination anxiety at the 5% level of significance.
117
Hypothesis Testing
Comparing Variances of Two Normal Populations
▪ Used to test whether two populations have equal variances
118
Hypothesis Testing
Comparing Variances of Two Normal Populations
▪ The larger variance is always placed in the numerator, so: F≥1
▪ Decision Rule:
If calculated F > F-table→ Diff. in variances is significant→ Reject H0
If calculated F < F-table→ Diff. not significant→ Accept H0
120
Hypothesis Testing
Comparing Variances of Two Normal Populations
Example 7:
121
Hypothesis Testing
Comparing Variances of Two Normal Populations
Example 7:
122
Hypothesis Testing
Comparing Variances of Two Normal Populations
Example 7:
123
Hypothesis Testing
Comparing Variances of Two Normal Populations
Example 7:
124
Hypothesis Testing
Correlation Coefficients
1. In case of simple correlation coefficient: We use t-test and calculate the
test statistic as under:
125
Hypothesis Testing
Correlation Coefficients
126
Hypothesis Testing
Correlation Coefficients
127
Hypothesis Testing
Limitations
▪ Hypothesis tests should not be used mechanically; they are aids to
decision-making, not decisions themselves
▪ This limitation becomes more serious with small sample sizes, where the
likelihood of erroneous inferences is generally higher
▪ Larger samples are often needed to improve the reliability and validity of
test results 129
Hypothesis Testing
Limitations
▪ Statistical significance alone should not be the sole basis for conclusions;
subject-matter knowledge is equally important.
▪ Overall, tests of hypotheses are valuable tools, but they have limitations
and should be applied thoughtfully, not blindly
130
Task
A manufacturing company has historically found that 10% of its products are
defective. A supplier introduces a new raw material and claims that using this
material will reduce the defect rate below 10%.To verify this claim, the
company produces a random sample of 400 items using the new raw
material. Out of these, 34 items are found defective. Using a 1% level of
significance, test whether there is sufficient statistical evidence to support
the supplier’s claim that the new material reduces the proportion of
defectives.
Task