HypothesisTesting Terms
HypothesisTesting Terms
Hypothesis testing is a statistical tool whereby we can test the above assumption regarding
the population parameter.
This technique was first introduced by Ronald Fisher, Jerzy Neyman, Karl Pearson and his son
Egon Pearson.
The methodology employed in statistical testing depends on the nature of dataset used and
the reason for the analysis.
So, hypothesis testing is used to infer the result of a hypothesis performed on sample data
from a larger population.
There are various steps in performing hypothesis testing. These are as follows:-
Hypothesis testing allow us to check the sample statistic against a population statistic or
statistic of another sample.
The third step is to set the decision criteria to be used in hypothesis testing.
To set the decision criteria, we state the pre-determined significance level for a test.
Every test produces the significance value for that particular test.
Based on the significance level, we make a decision to reject or not reject the null hypothesis
(Ho).
If the significance value is less than the predetermined significance value, then we should
reject the null hypothesis.
If the significance value is greater than the predetermined significance value, then we should
not reject the null hypothesis.
Null hypothesis is a statistical hypothesis which assumes that the difference in observations
is due to a random factor.
It is denoted by Ho.
It is denoted by H1.
The alternate hypothesis assumes that difference in observations are the result of a real
effect.
===============================================================================
3. p-value
The p-value is the probability value within a hypothesis test representing the probability of
the occurrence of a given event.
The p-value is the probability that a given result would occur under the null hypothesis.
It is the probability of finding the observed results when the null hypothesis (H0) is true.
The p-value does not provide the probability that either hypothesis is correct.
The smaller the p-value, the stronger the evidence that you should reject the null hypothesis.
In a hypothesis test, we compare the p value from the test to the alpha level.
4. Significance level
Significance level is the probability of rejecting the null hypothesis (Ho), when it is true.
It is denoted by alpha or α.
The most practical value of significance level (α), accepted across all business cases is 5%.
Other values of significance level could be 1% or 0.5%.
This 5% is called Significance level also known as alpha level (symbolized as α).
It means that if random chance probability is less than 5% then we can conclude that there is
difference in behaviour of two different population means.
===============================================================================
5. Confidence interval
A confidence interval is a range of values within which our true value may lie.
It is a type of interval estimate, computed from the observed statistics of the distribution.
This interval estimate gives us a range of values in which the population statistic may lie.
So, confidence intervals consist of a range of potential values of the unknown population
parameter.
The confidence interval has an associated confidence level that quantifies the level of
confidence that the parameter lies in the interval.
The confidence level is designated prior to examining the data. Most commonly the 95%
confidence level is used. However, other confidence levels like 90% and 99% can also be
used.
There are various factors which affect the width of the confidence interval. They include the
size of the sample, the confidence level and the variability in the sample.
A larger sample will tend to produce a better estimate of the population parameter, when all
other factors being equal.
===============================================================================
Type I error
A Type I error is a statistical term that describes the error that occurs when we reject the null
hypothesis that is actually true.
It is denoted by α.
Type II error
A Type II error is a statistical term used within the context of hypothesis testing that
describes the error that occurs when one fails to reject a null hypothesis that is actually false.
It is denoted by β.
===============================================================================
We can break down the hypothesis test into one-tailed and two-tailed test.
One-tailed test
When the given statistical hypothesis tests only one value like Ho: µ1 = µ2, it is called
the one-tailed test.
A one-tailed test is a statistical test in which the critical area of a distribution is one-sided so
that it is either greater than or less than a certain value, but not both.
If the sample being tested falls into the one-sided critical area, the alternate hypothesis will
be accepted instead of the null hypothesis.
Two-tailed test
When the given hypothesis assumes a less than or greater than value, it is called the two-
tailed test.
In statistics, a two-tailed test is a method in which the critical area of a distribution is two-
sided and tests whether a sample is greater than or less than a certain range of values.
If the sample being tested falls into either of the critical areas, the alternative hypothesis is
accepted instead of the null hypothesis.
By convention two-tailed tests are used to determine significance at the 5% level, meaning
each side of the distribution is cut at 2.5%.
The diagram below shows the difference between one-tailed and two-tailed test.
===============================================================================
8. Decision criteria
We have carried out a hypothesis test. Now, it is time for decision-making. The decision-making
means to decide whether to reject or do not reject the null hypothesis (Ho). There are two ways to
decide whether we should reject or do not reject the null hypothesis (Ho). These ways are discussed
below:-
Derive the distribution of the test statistic under the null hypothesis from the assumptions.
Select a significance level (α), a probability threshold below which the null hypothesis will be
rejected.
Compute from the observations the observed value tobs of the test statistic.
The decision rule is to reject the null hypothesis H0 if the observed value tobs is in the critical
region or fail to reject the hypothesis otherwise.
Calculate the p-value. This is the probability, under the null hypothesis, of sampling a test
statistic at least as extreme as that which was observed.
Reject the null hypothesis (Ho), in favour of the alternative hypothesis, if and only if the p-
value is less than the significance level (the selected probability) threshold.
Instead, we should say that we do not have sufficient evidence to reject the null hypothesis
(Ho).
We should say that we have sufficient evidence to reject the null hypothesis (Ho).
So, our null hypothesis (Ho) is false and alternate hypothesis is true (H1).
===============================================================================
1. Testing whether more men than women suffer from diabetes or other disease.
===============================================================================