Tests of Hypothesis: z test and t-test

One Sample and Two Sample Tests

Introduction

What you’ll learn

  • Hypothesis testing in Research Methodology.

Course Content

  • Introduction –> 2 lectures • 22min.
  • Z test: 1 tailed and two tailed tests –> 1 lecture • 8min.
  • z test for 2 samples –> 1 lecture • 16min.
  • z test of proportions –> 2 lectures • 18min.
  • t test –> 2 lectures • 33min.
  • Paired t test –> 1 lecture • 7min.

Tests of Hypothesis: z test and t-test

Requirements

  • No.

Introduction

Hypothesis is an assumption which needs to be proved and once proved then it becomes a fact. For example, you might want to check the effectivity of a training program on the employees and you can apply t test for 2 samples or paired t test to test the effectivity. When you are evaluating a hypothesis, you need to account for both the variability in your sample and how large your sample is. Based on this information, you’d like to make an assessment of whether any differences you see are meaningful, or if they are likely just due to chance. This is formally done through a process called hypothesis testing. There are 2 important tests in Hypothesis testing : z test and t test and this course gives a great insights on both z test and t test. Lets discuss them briefly:

Z-Test

Z-tests are the statistical tests that can be used to compare population averages to a sample’s. The z-test will tell you how far, in standard deviations terms, a data point is from the average of a data set. A z-test will compare a sample to a defined population that is typically used for dealing with problems relating to large samples (i.e., n > 30) and  are very useful when the standard deviation is known.

T-Test

T-tests are also statistical tests that can be used to test a hypothesis, but they are very useful when we need to determine if there is a statistically significant comparison between the 2 independent sample groups. In other words, a t-test asks whether the comparison between the averages of 2 groups is unlikely to have occurred due to random chance. Usually, t-tests are more appropriate when dealing with problems with a limited sample size (i.e., n < 30).

Five Steps in Hypothesis Testing:

  1. Specify the Null Hypothesis
  2. Specify the Alternative Hypothesis
  3. Set the Significance Level which generally is take as 5%
  4. Calculate the Test Statistic and Corresponding P-Value
  5. Drawing a Conclusion

Step 1: Specify the Null Hypothesis

The null hypothesis (H0) is a statement of no effect, relationship, or difference between two or more groups or factors. In research studies, a researcher is usually interested in disproving the null hypothesis.

Examples:

  • There is no difference between the two samples.
  • The inter college groups have the same IQ
  • There is no association between the administration of vaccine and the disease cure 

Step 2: Specify the Alternative Hypothesis

The alternative hypothesis (H1) is the statement that there is an effect or difference. This is usually the hypothesis the researcher is interested in proving. The alternative hypothesis can be one-sided (only provides one direction, e.g., lower) or two-sided. We often use two-sided tests even when our true hypothesis is one-sided because it requires more evidence against the null hypothesis to accept the alternative hypothesis.

Examples:

  • The  success rate of the students differs with the school they are studying in (two-sided).
  • The time to recover from a  disease is lower due to the administration of the vaccine (one-sided).
  • There is an association between injury type and the skills employed in the sports (two sided).

 

 

Step 3: Set the Significance Level (a)

The significance level (denoted by the Greek letter alpha) is generally set at 0.05. This means that there is a 5% chance that you will accept your alternative hypothesis when your null hypothesis is actually true. The smaller the significance level, the greater the burden of proof needed to reject the null hypothesis, or in other words, to support the alternative hypothesis.

 

 

Step 4: Calculate the Test Statistic and Corresponding P-Value

In another section we present some basic test statistics to evaluate a hypothesis. Hypothesis testing generally uses a test statistic that compares groups or examines associations between variables. When describing a single sample without establishing relationships between variables, a confidence interval is commonly used.

The p-value describes the probability of obtaining a sample statistic as or more extreme by chance alone if your null hypothesis is true. This p-value is determined based on the result of your test statistic. Your conclusions about the hypothesis are based on your p-value and your significance level.

Example:

  • P-value = 0.01 This will happen 1 in 100 times by pure chance if your null hypothesis is true. Not likely to happen strictly by chance.

Example:

  • P-value = 0.75 This will happen 75 in 100 times by pure chance if your null hypothesis is true. Very likely to occur strictly by chance.
  • Step 5: Drawing a Conclusion
  • Test Statistic value <= significance level (a) : Accept your null hypothesis in favor of your alternative hypothesis. Your result is statistically significant.
  • Test Statistic-value > significance level (a): reject your null hypothesis. Your result is not statistically significant.

Hypothesis testing is not set up so that you can absolutely prove a null hypothesis. Therefore, when you do not find evidence against the null hypothesis, you fail to reject the null hypothesis. When you do find strong enough evidence against the null hypothesis, you reject the null hypothesis. Your conclusions also translate into a statement about your alternative hypothesis. When presenting the results of a hypothesis test, include the descriptive statistics in your conclusions as well.

Example:

  • H0: There is no difference in survival between the two samples.
  • H1: There is a significant difference in survival between the two groups.