Hypothesis Testing
Hypothesis Testing
Hypothesis Testing
Hypothesis testing is a tool for making statistical inferences about the population data. It
is an analysis tool that tests assumptions and determines how likely something is within
a given standard of accuracy. Hypothesis testing provides a way to verify whether the
results of an experiment are valid.
A null hypothesis and an alternative hypothesis are set up before performing the
hypothesis testing. This helps to arrive at a conclusion regarding the sample obtained
from the population. In this article, we will learn more about hypothesis testing, its
types, steps to perform the testing, and associated examples.
Hypothesis testing uses sample data from the population to draw useful conclusions
regarding the population probability distribution. It tests an assumption made about the
data using different types of hypothesis testing methodologies. The hypothesis testing
Hypothesis Testing
Hypothesis testing is a formal procedure for using statistics to investigate our ideas about the
world. Scientists most commonly use it to test specific predictions derived from theories,
referred to as hypotheses.
It's crucial to restate your initial research hypothesis as a Null and Alternate hypothesis so that
you can test it mathematically.
Suppose you want to test if there is a relationship between gender and weight. Based on your
knowledge, you hypothesize that males are heavier than females on average.
In this case, the Null hypothesis will be that males are not heavier than females, and the
Alternate hypothesis will be that males are heavier than females.
What Is p-Value?
The p-value is known as the probability value. P-values are used in hypothesis
testing to help determine whether the null hypothesis should be rejected. The
lower the p-value, the more likely the null hypothesis will be rejected.
•If the p-value is less than 0.05, the result is statistically significant. In this case,
you reject the null hypothesis favoring the alternative hypothesis.
•If the p-value is greater than 0.05, then the result is not statistically significant
and hence doesn't reject the null hypothesis.
Definition of Z-Test
Z-test is the statistical test used to analyze whether two population means are different or not when the
variances are known, and the sample size is large.
The z-test is based on the normal distribution.
The assumptions for Z-test are:
•All observations are independent.
•The size of the sample should be more than 30.
•The Z distribution is normal when the mean is 0, and the variance is 1.
The test statistic is defined by:
Example
Let's say that the mean score of students in a class is greater than 70 with a standard deviation of 10. If a sample of 50
students was selected with a mean score of 80, calculate the Z-value to check if there is enough evidence to support
this claim at a 0.05 significance level.
Solution:
Here, the sample size is 50 and we know the standard deviation. This is a case of a right-tailed one-sample z test.
Xbar = 80
μ = 70
n = 50
σ = 10
Substituting the values in the formula, you will get the Z value to be equal to 7.09.
Since 7.09 > 1.645 thus, the null hypothesis is rejected and there is enough to support that the mean of the class is
greater than 70.
Definition Of T-Test
A T-test is a parametric test applied to identify how the average of two data sets
differs when variance is not given.
When the sample size is small, and the population standard deviation is unknown, the
T-test is used in conjunction with the t-distribution. The degree of freedom
significantly impacts the shape of a t-distribution. The number of independent
observations in a given set of observations is the degree of freedom.