Hypothesis Testing P Value
In hypothesis testing, the p value is used to indicate whether the results obtained after conducting a test are
statistically significant or not. It also indicates the probability of making an error in rejecting or not rejecting
the null hypothesis.This value is always a number between 0 and 1. The p value is compared to an alpha
level, α or significance level. The alpha level can be defined as the acceptable risk of incorrectly rejecting the
null hypothesis. The alpha level is usually chosen between 1% to 5%.
Hypothesis Testing Critical region
All sets of values that lead to rejecting the null hypothesis lie in the critical region. Furthermore, the value that
separates the critical region from the non-critical region is known as the critical value.
Types of Hypothesis Testing
Selecting the correct test for performing hypothesis testing can be confusing. These tests are used to determine
a test statistic on the basis of which the null hypothesis can either be rejected or not rejected. Some of the
important tests used for hypothesis testing are given below.
Hypothesis Testing Z Test
A z test is a way of hypothesis testing that is used for a large sample size (n ≥ 30). It is used to determine
whether there is a difference between the population mean and the sample mean when the population standard
deviation is known. It can also be used to compare the mean of two samples. It is used to compute the z test
statistic. The formulas are given as follows:
Hypothesis Testing t Test
The t test is another method of hypothesis testing that is used for a small sample size (n < 30). It is also used
to compare the sample mean and population mean. However, the population standard deviation is not
known. Instead, the sample standard deviation is known. The mean of two samples can also be compared
using the t test.
Hypothesis Testing Chi Square
The Chi square test is a hypothesis testing method that is used to check whether the variables in a population
are independent or not. It is used when the test statistic is chi-squared distributed.
Hypothesis Testing Steps
Hypothesis testing can be easily performed in five simple steps. The most important step is to correctly set
up the hypotheses and identify the right method for hypothesis testing. The basic steps to perform hypothesis
testing are as follows:
• Step 1: Set up the null hypothesis by correctly identifying whether it is the left-tailed, right-tailed,
or two-tailed hypothesis testing.
• Step 2: Set up the alternative hypothesis.
• Step 3: Choose the correct significance level, α, and find the critical value.
• Step 4: Calculate the correct test statistic (z, t or χ) and p-value.
• Step 5: Compare the test statistic with the critical value or compare the p-value with α to arrive at
a conclusion. In other words, decide if the null hypothesis is to be rejected or not.
Hypothesis Testing Example
The best way to solve a problem on hypothesis testing is by applying the 5 steps mentioned in the previous
section. Suppose a researcher claims that the mean average weight of men is greater than 100kgs with a
standard deviation of 15kgs. 30 men are chosen with an average weight of 112.5 Kgs. Using hypothesis
testing, check if there is enough evidence to support the researcher's claim. The confidence interval is given
as 95%.
Step 1: This is an example of a right-tailed test. Set up the null hypothesis as H0: μ = 100.
Step 2: The alternative hypothesis is given by H1: μ > 100.
Step 3: As this is a one-tailed test, α = 100% - 95% = 5%. This can be used to determine the critical value.
1 - α = 1 - 0.05 = 0.95
0.95 gives the required area under the curve. Now using a normal distribution table, the area 0.95 is at z =
1.645. A similar process can be followed for a t-test. The only additional requirement is to calculate the degrees
of freedom given by n - 1.
Step 4: Calculate the z test statistic. This is because the sample size is 30. Furthermore, the sample and
population means are known along with the standard deviation.
Hypothesis Testing and Confidence Intervals
Confidence intervals form an important part of hypothesis testing. This is because the alpha level can be
determined from a given confidence interval. Suppose a confidence interval is given as 95%. Subtract the
confidence interval from 100%. This gives 100 - 95 = 5% or 0.05. This is the alpha value of a one-tailed
hypothesis testing. To obtain the alpha value for a two-tailed hypothesis testing, divide this value by 2. This
gives 0.05 / 2 = 0.025.
Examples on Hypothesis Testing
Example 1: The average weight of a dumbbell in a gym is 90lbs. However, a physical trainer believes that
the average weight might be higher. A random sample of 5 dumbbells with an average weight of 110lbs and
a standard deviation of 18lbs. Using hypothesis testing check if the physical trainer's claim can be
supported for a 95% confidence level.
Solution: As the sample size is lesser than 30, the t-test is used.
Example 2: The average score on a test is 80 with a standard deviation of 10. With a new teaching
curriculum introduced it is believed that this score will change. On random testing, the score of 38 students,
the mean was found to be 88. With a 0.05 significance level, is there any evidence to support this claim?
Solution: This is an example of two-tail hypothesis testing. The z test will be used.