What is Hypothesis Testing?

The concept of hypothesis works on the probability of an event’s occurrence. It confirms whether the primary hypothesis results are correct or not. It is widely applied in research—biology, criminal trials, marketing, and manufacturing.

You are free to use this image on you website, templates, etc., Please provide us with an attribution linkHow to Provide Attribution?Article Link to be HyperlinkedFor eg:Source: Hypothesis Testing (wallstreetmojo.com)

Key Takeaways

  • Hypothesis testing is a statistical interpretation that examines a sample to determine whether the results stand true for the population.The test allows two explanations for the data—the null hypothesis or the alternative hypothesis. If the sample mean matches the population mean, the null hypothesis is proven true.Alternatively, if the sample mean is not equal to the population mean, the alternate hypothesis is accepted.This method requires superior analytical abilities and, therefore, is inaccessible for most. Also, this method heavily relies on probability.

Hypothesis Testing in Statistics Explained

Hypothesis testing uses sample data to validate the research. Researchers speculate on relationships between various factors. They then collect data to test those relationships. Based on the data, researchers draw conclusions. In statisticsStatisticsStatistics is the science behind identifying, collecting, organizing and summarizing, analyzing, interpreting, and finally, presenting such data, either qualitative or quantitative, which helps make better and effective decisions with relevance.read more, it is very important to eliminate randomness. The data should not have been caused by chance or a random factor. Hypothesis testing eliminates such uncertainties.

For every research experiment, there are mainly two explanations: the null hypothesisNull HypothesisNull hypothesis presumes that the sampled data and the population data have no difference or in simple words, it presumes that the claim made by the person on the data or population is the absolute truth and is always right. So, even if a sample is taken from the population, the result received from the study of the sample will come the same as the assumption.read more and the alternative hypothesis. It is often difficult to prove a theory; therefore, investigators test to reject the null hypothesis. So, when the null hypothesis is rejected, the remaining alternate theory is believed to be true.

For example, if we believe that the returns from the NASDAQ stock indexStock IndexThe stock index, which is also known as the stock market index, is a tool used to determine the performance of shares/securities in the market and to calculate the return on the stock of their investment investors use it to have knowledge about the performance of investments and access the total value they possess.read more are not zero. Then the null hypothesis would state: ‘the recovery from the NASDAQ is zero.’ Tests are conducted for different levels of statistical significanceStatistical SignificanceStatistical significance is the probability of an observation not being caused by a sampling error.read more.

Hypothesis tests are prone to two errors—type 1 and type 2. If the null hypothesis is rejected by the sample outcome despite being true—it is considered a type 1 error. Similarly, if the sample data fails to reject the null hypothesis, despite the null hypothesis being false, it is considered a type 2 error.

Hypothesis Testing Types

Based on population distribution, hypothesis testing is further categorized into sub-types:

  • Simple: In a simple hypothesis, the population parameter is stated as a specific value, making the analysis easier.Composite: In a composite hypothesis, the population parameter ranges between a lower and upper value.One-tailed: When the majority of the population is concentrated on one side, it is called a one-tailed test. In a one-tailed test, the sample test is either higher or lower than the population parameter.

  • Two-tailed: The two-tailed hypothesis test works when the critical distribution of the population is two-sided. Here the test sample is either higher or lower than a number of given values.

Hypothesis Testing Steps

Hypothesis tests involve the following steps:

  • Researchers first mention whether the idea is a null theory or an alternative hypothesis. If the variables are not correlated, then it is assumed null. Alternatively, if the variables show correlation, then it is the alternative hypothesis.Then they collect relevant data for sampling—it closely represents the whole population on which the test is to be performed.Next, researchers choose a statistical test that suits the collected data.Based on the test results and level of significance, they either accept or reject the null hypothesis.Finally, the statistical findings are compiled and summarized into a research report.

Hypothesis Testing Formula

Researchers opt for different statistical tests like t-testsT-testsA T-test is a method to identify whether the means of two groups differ from one another significantly. It is an inferential statistics approach that facilitates the hypothesis testing.read more or z-testsZ-testsZ-test formula is applied hypothesis testing for data with a large sample size. It denotes the value acquired by dividing the population standard deviation from the difference between the sample mean, and the population mean.read more. The z-test formula is as follows:

Z = ( x̅ – μ0 ) / (σ /√n)

  • Here, x̅ is the sample mean,μ0 is the population mean,σ is the standard deviation,n is the sample size.

Based on the Z-test result, the research derives the hypothesis conclusion. It can either be a null or its alternative. They are measured using the following formula:

H0: μ=μ0

Ha: μ≠μ0

Here,

H0 = null hypothesis

Ha = alternate hypothesis

If the mean valueMean ValueMean refers to the mathematical average calculated for two or more values. There are primarily two ways: arithmetic mean, where all the numbers are added and divided by their weight, and in geometric mean, we multiply the numbers together, take the Nth root and subtract it with one.read more is equal to the population mean, then the null hypothesis is proven true. Otherwise, the alternate hypothesis is taken into consideration.

Hypothesis Testing Calculation with Examples

A battery manufacturing company claims that the average life of its two-wheeler batteries is 2.1 years. The quality inspector surveyed ten customers to know the lasting period of their batteries. The following data was collected:

If the standard deviation is 0.17 and the significance level is 0.05, conduct a hypothesis testing to prove the company’s claim.

Solution:

Given:

μ0= 2.1 years

σ = 0.17

n = 10

Level of Significance = 0.05

Assuming that the company’s claim of average battery life being 2.1 years is true,

We need to prove that:

H0: μ=μ0 , or

Sample mean (x̅) = (1.9 + 2.3 + 2.1 + 2.2 + 1.9 + 2.4 + 2.1 + 2.3 + 2.2 + 2.0) / 10 = 2.14 years.

Applying the Z-test formula:

Z = (2.14 – 2.1) / (0.17 / √10) = 0.744

We already know that the level of significance is 0.05, and the z-score is 1.645. Let us now compare the Z-test with it.

0.744 ˂ 1.645; therefore, the null hypothesis is true.

Thus, the company’s claim that the average life of its batteries is 2.1 years is proven true.

Relevance and Use

Hypothesis testing validates a theory with the help of systematic statistical inference. However, in practice, it is not easy. Therefore, researchers try to reject the null hypothesis in order to validate the alternate explanation.

Hypothesis testing is widely applied in psychology, biology, medicine, finance, production, marketing, advertising, and criminal trials.

Limitations

Hypothesis testing is all about assumptions and interpretations. It, therefore, requires superior analytical abilities. As a result, it is inaccessible for most.

Also, this method heavily relies on mere probability. There can be errors in data. It works better for large sample sizes. For smaller sample sets, this approach may not be the most suitable.

This has been a guide to Hypothesis Testing and its meaning. We explain hypothesis testing steps, types, calculation, significance level, p-value, and z-test using examples. You can learn more about excel modeling from the articles below –

P-value refers to the probability of the null hypothesis getting rejected. P-value calculation determines whether the assumed result will hold true or not. A higher value determines the acceptance of the assumed result, while a lower value signifies rejection of this assumed result and acceptance of the alternate result. 

A null hypothesis is a statement that proves that the sample mean is the same as the population mean. An alternative hypothesis is the opposite of the null hypothesis, i.e., it states that there is a difference between the sample mean and the population mean.

It is a useful statistical tool that interprets data-based conclusions—such that it stands true for the whole population. It is implemented in scientific research, medical research, psychology, manufacturing, marketing, advertising, and criminal trials.

  • Calculate P-Value in ExcelFormula for F-TestFormula of P-ValueBell CurveBell CurveBell Curve graph portrays a normal distribution which is a type of continuous probability. It gets its name from the shape of the graph which resembles to a bell. read more