Decision Making by Hypothesis Testing
Decision Making by Hypothesis Testing
URP 2241
Course Instructor:
Md. Sakib Zubayer
Assistant Professor
Dept. of Urban and Regional Planning
Rajshahi University of Engineering & Technology (RUET)
Contact: [email protected]
[email protected]
Decision Making by Hypothesis Testing
Introduction
In a test of hypothesis, we test a certain given theory or belief about a population parameter. We may want to find
out, using some sample information, whether or not a given claim (or statement) about a population parameter is
true. This chapter discusses how to make such tests of hypotheses about the population mean, , and the population
proportion, p.
As an example, a soft-drink company may claim that, on average, its cans contain 12 ounces of soda. A
government agency may want to test whether or not such cans do contain, on average, 12 ounces of soda. Suppose
we take a sample of 100 cans of the soft drink under investigation. We then find out that the mean amount of soda
in these 100 cans is 11.89 ounces. Based on this result, can we state that, on average, all such cans contain less
than 12 ounces of soda and that the company is lying to the public? Not until we perform a test of hypothesis can
we make such an accusation. The reason is that the mean, ounces, is obtained from a sample. The difference
between 12 ounces (the required average amount for the population) and 11.89 ounces (the observed average
amount for the sample) may have occurred only because of the sampling error (assuming that no nonsampling
errors have been committed). Another sample of 100 cans may give us a mean of 12.04 ounces. Therefore, we
perform a test of hypothesis to find out how large the difference between 12 ounces and 11.89 ounces is and to
investigate whether or not this difference has occurred as a result of chance alone.
Two Hypothesis
Consider as a nonstatistical example a person who has been indicted for committing a crime and is being tried in a
court. Based on the available evidence, the judge or jury will make one of two possible decisions:
At the outset of the trial, the person is presumed not guilty. The prosecutor’s efforts are to prove that the person
has committed the crime and, hence, is guilty.
In statistics, the person is not guilty is called the null hypothesis and the person is guilty is called the alternative
hypothesis. The null hypothesis is denoted by H0, and the alternative hypothesis is denoted by H1. In the
beginning of the trial it is assumed that the person is not guilty. The null hypothesis is usually the hypothesis that
is assumed to be true to begin with. The two hypotheses for the court case are written as follows (notice the colon
after H0 and H1)
Fundamentals of Hypothesis Testing
A hypothesis is a statement or proposition that is formulated as a possible explanation for a phenomenon or a
specific set of observations. It is a fundamental component of the scientific method and is used to guide scientific
inquiry and research. Hypotheses are typically expressed as testable statements that can be either supported or
refuted through empirical evidence and experimentation.
1.Null Hypothesis (H0): The null hypothesis is a statement of no effect or no difference. It represents the
status quo or a default assumption. It often includes statements of equality or no change. For example:
1. H0: There is no difference in test scores between Group A and Group B.
2.Alternative Hypothesis (Ha or H1): The alternative hypothesis contradicts the null hypothesis and
represents what you are trying to show or prove. It can take one of three forms:
1. Two-Tailed (≠): There is a difference or effect, but it doesn't specify the direction.
2. Left-Tailed (<): There is a decrease or effect in a specific direction.
3. Right-Tailed (>): There is an increase or effect in a specific direction.
3.For example:
1. Ha (Two-Tailed): There is a difference in test scores between Group A and Group B.
2. Ha (Left-Tailed): Test scores for Group A are less than test scores for Group B.
3. Ha (Right-Tailed): Test scores for Group A are greater than test scores for Group B.
Fundamentals of Hypothesis Testing
Example of a hypothesis:
Hypothesis: If plants are provided with a suitable fertilizer, their average height will increase
compared to plants that do not receive fertilizer.
In this example, the hypothesis suggests a cause-and-effect relationship between the presence of
fertilizer and plant height. It can be tested by conducting experiments where some plants receive
fertilizer, and others do not, and then measuring their heights to see if there is a significant
difference.
Once experiments or data collection are carried out, the results are analyzed to determine whether
they support or contradict the hypothesis. If the evidence supports the hypothesis, it may lead to
further research or contribute to our understanding of the phenomenon. If the evidence contradicts
the hypothesis, it may prompt the formulation of new hypotheses and further investigation.
Fundamentals of Hypothesis Testing
Null Hypothesis (H0): The implementation of a new public transportation system will not significantly reduce traffic
congestion and commuting times in the city.
Alternative Hypothesis (Ha): The implementation of a new public transportation system will significantly reduce
traffic congestion and commuting times in the city.
Test: The urban planners decide to conduct a pilot project where they introduce a new, efficient public transportation
system in a specific area of the city while keeping the existing transportation infrastructure unchanged in another area
(acting as a control group).
Analysis: Over a specified period, data is collected on factors such as traffic congestion levels, average commuting
times, and air quality in both the area with the new transportation system (experimental group) and the area with the
existing system (control group).
- Traffic congestion levels are measured using traffic flow data and congestion indices.
- Commuting times are surveyed and recorded for residents in both areas.
- Air quality is assessed by measuring pollution levels at various points in both areas.
Fundamentals of Hypothesis Testing
Statistical tests are then applied to compare the data between the two groups. If the data analysis reveals:
•A statistically significant reduction in traffic congestion levels in the experimental area compared to the
control area,
•A statistically significant decrease in average commuting times in the experimental area compared to the
control area,
•A statistically significant improvement in air quality in the experimental area,
If we reject the null hypothesis (H0), The urban planners would conclude that the implementation of the
new public transportation system has had a significant positive impact on traffic congestion, commuting
times, and air quality in the city.
This decision-making process in urban planning involves hypothesis testing to assess the effectiveness of a
proposed intervention (the new transportation system) before making broader, long-term decisions about its
implementation throughout the entire city. It helps ensure that decisions are evidence-based and have a
positive impact on the urban environment and the quality of life for residents.
Types of Error
We all know that a court’s verdict is not always correct. If a person is declared guilty at the end of a trial,
there are two possibilities.
1. The person has not committed the crime but is declared guilty (because of what may be false evidence).
2. The person has committed the crime but not declared guilty.
In the first case, the court has made an error by punishing an innocent person. In statistics, this
kind of error is called a Type I or an alpha (α) error.
In the second case, the court has made an error by not punishing a man who committed the crime. In
Statistics, this is called Type II or a beta (β) error.
Types of Error
Hypothesis testing is a common statistical procedure, but it can be prone to various types of errors. These
errors are important to understand when interpreting the results of a hypothesis test. The two primary
types of errors in hypothesis testing are Type I errors and Type II errors:
1.Type I Error (False Positive): This occurs when you reject the null hypothesis when it is actually
true. In other words, you conclude that there is a significant effect or difference when there is none. The
probability of making a Type I error is denoted by α (alpha) and is also known as the significance level.
Common choices for α are 0.05 or 0.01, depending on the desired level of confidence.
2.Type II Error (False Negative): This occurs when you fail to reject the null hypothesis when it is
actually false. In other words, you conclude that there is no significant effect or difference when there is
one. The probability of making a Type II error is denoted by β (beta).
Types of Error
The two types of errors that occur in tests of hypotheses depend on each other. We cannot lower the values
of alpha and beta simultaneously for a test of hypothesis for a fixed sample size.
Lowering the value of alpha will raise the value of beta and lowering the value of alpha will raise the
value of beta. However, we can decrease the both simultaneously by increasing the sample size
To reduce the risk of Type I errors, you can lower the significance level (α) or use more stringent criteria
for rejecting the null hypothesis. However, this may increase the risk of Type II errors. Balancing the
trade-off between Type I and Type II errors depends on the specific context and consequences of the
errors.
Significance Level
Definition: The significance level is the probability of rejecting a null hypothesis when it is actually true.
In other words, it represents the risk of making a false positive error or concluding that there is an effect
or difference when there isn't one.
Why it is important?
Control of Type I Error: It helps control the risk of making Type I errors, which are often considered
more serious in hypothesis testing. A Type I error occurs when you incorrectly reject a null hypothesis
that is actually true. By setting a significance level, you specify the maximum acceptable risk of making
this error.
Standardization: The significance level provides a standardized criterion for decision-making in
hypothesis testing. Researchers and analysts can use a common threshold (e.g., α = 0.05) to ensure
consistency in their results and conclusions.
One and Two-Tailed Hypothesis
Steps of Hypothesis Testing
1. State the Hypotheses:
- Null Hypothesis (H0): Begin by stating the null hypothesis, which represents the default or no-effect
assumption. It often contains an equality statement (e.g., "there is no difference" or "the population mean is equal
to a specific value").
- Alternative Hypothesis (Ha or H1): Define the alternative hypothesis, which contradicts the null hypothesis
and represents what you are trying to show or prove. It can take one of three forms: two-tailed (≠), left-tailed (<),
or right-tailed (>), depending on the nature of the test.
2. Choose the Significance Level (α):
- Select a significance level (α), also known as the alpha level or Type I error rate. Common values for α are
0.05 (5%) and 0.01 (1%). This represents the probability of making a Type I error (rejecting a true null
hypothesis).
- 3. Collect and Prepare Data:
- Gather a sample of data from the population of interest. Ensure the sample is representative and collected
using appropriate sampling techniques.
Steps of Hypothesis Testing
4. Select a Test Statistic:
The p-value approach. Under this procedure, we calculate what is called the p-value for the observed value of
the sample statistic. If we have a predetermined significance level, then we compare the p-value with this
significance level and make a decision. Note that here p stands for probability.
The critical-value approach: In this approach, we find the critical value(s) from a table (such as the normal
distribution table or the t distribution table) and find the value of the test statistic for the observed value of the
sample statistic. Then we compare these two values and make a decision.
Fundamentals of Hypothesis Testing
These steps provide a structured approach to hypothesis testing, allowing researchers and analysts to make informed
decisions based on sample data while considering the risk of making Type I errors (false positives). The choice of
hypotheses, significance level, and test statistic depends on the research question and the context of the study.
Exercise
Write the null and alternative hypotheses for each of the following examples. Determine if each is a
case of a two-tailed, a left-tailed, or a right-tailed test.
a. To test if the mean number of hours spent working per week by college students who hold jobs
is different from 20 hours
b. To test whether or not a bank’s ATM is out of service for an average of more than 10 hours per month
c. To test if the mean length of experience of airport security guards is different from 3 years
d. To test if the mean credit card debt of college seniors is less than $1000
e. To test if the mean time a customer has to wait on the phone to speak to a representative of a mailorder
company about unsatisfactory service is more than 12 minutes
Exercise
Write the null and alternative hypotheses for each of the following examples. Determine if each is
a case of a two-tailed, a left-tailed, or a right-tailed test.
a. To test if the mean amount of time spent per week watching sports on television by all adult men
is different from 9.5 hours
b. To test if the mean amount of money spent by all customers at a supermarket is less than $105
9.1 Hypothesis Tests: An Introduction 389c. To test whether the mean starting salary of college graduates is
higher than $39,000 per year
d. To test if the mean waiting time at the drive-through window at a fast food restaurant during rush
hour differs from 10 minutes
e. To test if the mean hours spent per week on house chores by all housewives is less than 30
Exercise
A highway safety engineer, decides to test the load-bearing capacity of a bridge that is 20
years old. Considerable data are available from similar tests on the same type of bridge.
If the minimum load-bearing capacity of this bridge must be 10 tons, what are the null
and alternative hypotheses?
Exercise
Exercise