Lesson-4-Quantitative-Methods-with-Modeling-and-Simulation-Hypothesis-Testing
Lesson-4-Quantitative-Methods-with-Modeling-and-Simulation-Hypothesis-Testing
Hypothesis Testing
Hypothesis testing is a structured
method used to determine if the findings of a
study provide evidence to support a specific
theory relevant to a larger population.
It is a type of statistical analysis in which
you put your assumptions about a population
parameter to the test. It is used to estimate
the relationship between 2 statistical
variables.
Hypothesis Testing
Let's discuss few examples of statistical hypothesis from
real-life
• A teacher assumes that 60% of his college's students come
from lower-middle-class families.
• A doctor believes that 3D (Diet, Dose, and Discipline) is
90% effective for diabetic patients.
Statistical analysts validate assumptions by collecting and
evaluating a representative sample from the data set under
study.
The process of hypothesis testing involves four key steps:
defining the hypotheses, developing a plan for analysis,
examining the sample data, and interpreting the final results.
Importance of Hypothesis Testing
in Data Analysis
Here is what makes hypothesis testing so important in data
analysis and why it is key to making better decisions:
Avoiding Misleading Conclusions (Type I and Type II Errors)
One of the biggest benefits of hypothesis testing is that it
helps you avoid jumping to the wrong conclusions. For instance,
a Type I error could occur if a company launches a new product
thinking it will be a hit, only to find out later that the data misled
them. A Type II error might happen when a company overlooks a
potentially successful product because their testing wasn’t
thorough enough. By setting up the right significance level and
carefully calculating the p-value, hypothesis testing minimizes
the chances of these errors, leading to more accurate results.
Making Smarter Choices
Hypothesis testing is key to making smarter,
evidence-based decisions. Let’s say a city planner
wants to determine if building a new park will increase
community engagement. By testing the hypothesis
using data from similar projects, they can make an
informed choice. Similarly, a teacher might use
hypothesis testing to see if a new teaching method
actually improves student performance. It’s about
taking the guesswork out of decisions and relying on
solid evidence instead.
Optimizing Business Tactics
In business, hypothesis testing is invaluable
for testing new ideas and strategies before fully
committing to them. For example, an e-commerce
company might want to test whether offering free
shipping increases sales. By using hypothesis
testing, they can compare sales data from
customers who received free shipping offers and
those who didn’t. This allows them to base their
business decisions on data, not hunches, reducing
the risk of costly mistakes.
Hypothesis Testing Formula:
z-test
Z = ( x̅ – μ) / (σ /√n)
Here,
x̅ is the sample mean,
μ is the population mean,
σ is the standard deviation,
n is the sample size.
How Hypothesis Testing
Works?
An analyst performs hypothesis testing on a statistical
sample to present evidence of the plausibility of the null
hypothesis. Measurements and analyses are conducted on a
random sample of the population to test a theory. Analysts use
a random population sample to test two hypotheses: the null
and alternative hypotheses.
The null hypothesis is typically an equality hypothesis
between population parameters; for example, a null hypothesis
may claim that the population means return equals zero. The
alternate hypothesis is essentially the inverse of the null
hypothesis (e.g., the population means the return is not equal
to zero). As a result, they are mutually exclusive, and only one
can be correct. One of the two possibilities, however, will
always be correct.
Null Hypothesis
and Alternative Hypothesis
The Null Hypothesis is the assumption that
the event will not occur. A null hypothesis has no
bearing on the study's outcome unless it is
rejected.
H0 is the symbol for it, and it is pronounced H-
naught.
The Alternate Hypothesis is the logical
opposite of the null hypothesis. The acceptance
of the alternative hypothesis follows the
rejection of the null hypothesis. H1 is the symbol
Example:
z = ( x̅ – μ ) / (σ /√n)
z = 0.5 / (0.045)
z = 11.11
We will reject the null hypothesis as the result of 11.11 is very
large and conclude that there is evidence to suggest that the average
height of women in the US is greater than 5'4".
Steps in Hypothesis Testing
Hypothesis testing is a statistical method to determine if
there is enough evidence in a sample of data to infer that a
certain condition is true for the entire population. Here’s a
breakdown of the typical steps involved in hypothesis testing:
Formulate Hypotheses
Null Hypothesis (H0): This hypothesis states that there is no
effect or difference, and it is the hypothesis you attempt to
reject with your test.
Alternative Hypothesis (H1 or Ha): This hypothesis is what
you might believe to be true or hope to prove true. It is
usually considered the opposite of the null hypothesis.
Steps in Hypothesis Testing
Choose the Significance Level (α)
The significance level, often
denoted by alpha (α), is the probability
of rejecting the null hypothesis when it
is true. Common choices for α are 0.05
(5%), 0.01 (1%), and 0.10 (10%).
Steps in Hypothesis Testing
Select the Appropriate Test
Choose a statistical test based on the
type of data and the hypothesis.
Common tests include t-tests, chi-square
tests, ANOVA, and regression analysis.
The selection depends on data type,
distribution, sample size, and whether
the hypothesis is one-tailed or two-tailed.
Steps in Hypothesis Testing
Collect Data
Gather the data that will be
analyzed in the test. To infer
conclusions accurately, this data
should be representative of the
population.
Steps in Hypothesis Testing
Calculate the Test Statistic
Based on the collected data and
the chosen test, calculate a test
statistic that reflects how much the
observed data deviates from the
null hypothesis.
Steps in Hypothesis Testing
Determine the p-value
The p-value is the probability of
observing test results at least as
extreme as the results observed,
assuming the null hypothesis is correct.
It helps determine the strength of the
evidence against the null hypothesis.
Steps in Hypothesis Testing
Make a Decision
Compare the p-value to the chosen significance
level:
z=0.47-0.500.50.5/850 −1.74