Statistics is a discipline of applied mathematics that deals with gathering, describing, analyzing, and inferring conclusions from numerical data. Differential and integral calculus, linear algebra, and probability theory are all used substantially in statistics' mathematical theories. Statisticians are especially interested in learning how to derive valid conclusions about big groups and general occurrences from the behavior and other observable features of small samples. These small samples reflect a subset of a larger group or a small number of occurrences of a common occurrence.
Table of Content
What is Hypothesis Testing in Statistics?
Hypothesis testing is a statistical procedure in which an analyst verifies a hypothesis about a population parameter. The analyst's approach is determined by the type of the data and the purpose of the study. The use of sample data to assess the validity of a hypothesis is known as hypothesis testing. Such information might originate from a wider population or a data-gathering mechanism.
Hypothesis Testing Definition
Hypothesis testing is a statistical method used to figure out if the results of an experiment actually mean something. It works by creating two different guesses: one is called the 'null hypothesis' and the other is the 'alternative hypothesis.' These two guesses never overlap. For example, we might use hypothesis testing to see if a new medicine is better at treating a disease. If the null hypothesis is true, then the alternative hypothesis must be false, and vice versa.
Steps in Hypothesis Testing
Step 1: Identifying the research questions and hypotheses is the first stage. Keep in mind that these are mutually incompatible options. If one theory asserts a truth, the other must contradict it.
Step 2: Consider statistical assumptions such as observation independence from one another, normality of data, random mistakes and their probability distribution, randomization during sampling, and so on.
Step 3: The third step involves deciding on the test that will be used to verify the hypothesis. At the same time, we need to figure out how we'll test the null hypothesis with sample data.
Step 4: The data from a sample is evaluated in the fourth stage. It's when we look for scores such as mean values, normal distributions, t distributions, and z scores, among other things.
Step 5: The final stage entails deciding whether there shall be a rejection of the null hypothesis in favour of the alternative or not to reject it.
Hypothesis Testing Formula
We use a hypothesis test to see if the evidence in a sample data set is sufficient to establish that research conditions are true or untrue for the full population. A Z-test is used to determine the assumption of a given sample. Normally, we compare two sets in hypothesis testing by comparing them to a synthesized data set and an idealized model.

z=\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} where,
\overline{x} is the sample mean,μ represents the population mean,
σ is the standard deviation and
n is the size of the sample.
Check this Hypothesis Testing Short Lesson: Click Here ✅
Types of Hypothesis Testing
When you want to test a hypothesis, you might feel lost about which test to choose. These tests help us figure out if our idea about something is likely true or not. Here are some important tests we use for this:
Hypothesis Testing Z Test
This is for big groups (more than 30 people). We use it to see if there's a difference between what we think the whole group is like and what we found in a smaller part of the group. We can also compare two smaller groups. To do this test, we use some formulas.
Hypothesis Testing T Test
This one's for smaller groups (less than 30 people). Like the Z test, we use it to compare what we found in a small group with what we think the whole group is like. But here, we don't know the exact numbers for the whole group, so we use what we found in the small group instead. Again, we can compare two small groups.
Hypothesis Testing Chi Square
This test helps us see if things in a big group are connected or if they happen randomly. We use it when the numbers we get from our test follow a special pattern.
Check: Hypothesis in Machine Learning
Sample Problems
Question 1. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 533, 6 and 140.
Solution:
Given:
\overline{x} = 600μ = 533
σ = 6
n = 140
As per the formula for hypothetical testing,
z=\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{600-533 }{\frac{6 }{\sqrt{140}}} ⇒ z = 132.125
Question 2. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 585, 100 and 150.
Solution:
Given:
\overline{x} = 600μ = 585
σ = 100
n = 150
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{600-585 }{\frac{100 }{\sqrt{150}}} ⇒ z = 1.837
Question 3. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 577, 77 and 140.
Solution:
Given:
\overline{x} = 600μ = 577
σ = 77
n = 140
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{600-577 }{\frac{77 }{\sqrt{140}}} ⇒ z = 2.765
Question 4. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 456, 77 and 140.
Solution:
Given: \overline{x} = 600
μ = 456
σ = 77
n = 140
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{600-456 }{\frac{77 }{\sqrt{140}}} ⇒ z = 2.987
Question 5. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 533, 45 and 120.
Solution:
Given: \overline{x} = 410
μ = 256
σ = 45
n = 120
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{410-256 }{\frac{45 }{\sqrt{120}}} ⇒ z = 6.879
Question 6. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 322, 125, 6 and 140.
Solution:
Given: \overline{x} = 322
μ = 125
σ = 6
n = 15
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{322-125 }{\frac{6 }{\sqrt{15}}} ⇒ z = 4.9765
Question 7. Conduct the z test if the sample means, the population mean, standard deviation and sample size are given to be 600, 533, 6 and 120.
Solution:
Given: \overline{x} = 600
μ = 533
σ = 6
n = 120
As per the formula for hypothetical testing,
z =
\frac{\overline{x}-\mu }{\frac{\sigma }{\sqrt{n}}} z =
\frac{600-533 }{\frac{6 }{\sqrt{120}}} ⇒ z = 142.15