Blog

What is Hypothesis Testing

What do you understand by term Hypothesis? 

Hypothesis is a proposition made as a basis for reasoning, without any assumption of its truth. There are many problems in which, rather than estimating the value of a parameter, we need to decide whether to accept or reject a statement about the parameter. This statement is called hypothesis and the decision making procedure about the hypothesis is called Hypothesis-Testing. There are two types of hypothesis: Null Hypothesis and Alternate HypothesisIn hypothesis testing, we have some claim about the population, and we check whether or not the data obtained from the sample provide evidence in favor or against this claim. 

For e.g.

  1. A new medicine you think might work.
  2. The teaching methods in both the institutes are effective.
  3. The average IQ of a normal human being is 113.

 

  • Null Hypothesis

 

It is represented as H0. It is a statistical hypothesis that contains a statement of equality such as ≥, ≤, or =

For e.g. We want to check whether or not there is a difference between average income of Indian employees in the year 2019 and 2020. So as the word null means zero or no, null hypothesis would be there is no difference or zero difference between the average income for the 2 years. In mathematical terms the null hypothesis can be written as average income for 2019 = average income for 2020.

 

  • Alternate Hypothesis

 

It is represented as Ha or H1. It is a statement that must be true when H0 is false and it contains a statement of inequality such as >, <  or ≠. The alternate hypothesis would say there is a difference between the two values.

For e.g. In our above example it would be that both incomes differ. In mathematical terms alternate hypothesis can be written as average income for 2019 average income for 2020.

Terminology

  1. Type I error: The error is made when the null hypothesis is rejected even if it is true.
  2. Type II error: The error is made when the null hypothesis (H0 ) is accepted when it is false (or H1 is true).
  3. Size of the test / Level of significance of the test / Alpha (α): α = Probability of committing Type-I error. = P(Rejecting H0 when H0 is true)
  4. Beta (β): β = Probability of committing Type-II error. = P(Accepting H0 when H1 is true)
  5. Power of the Test (1-β): 1−β = P(Rejecting H0 when H1 is true)
  6. Test Statistic: The decision is made based on the value of some statistic and the corresponding statistic is called test statistic.
  7. Critical or Rejection region: The values of the test statistic on which the null hypothesis is rejected.
  8. P- Value: The p-value is the probability that the null hypothesis is true. It is the tail area. It is the area under the curve beyond value of interest. The smaller the p-value, the stronger the evidence that you should reject the null hypothesis.

Forms Of Hypothesis Testing

There are generally three forms hypothesis testing

  • Type 1 (Right tailed test)
    • H0 : µ ≤ k or H0 : µ = k
    • H1 : µ > k or H1 : µ > k
  • Type 2 (Left tailed test)
    • H0 : µ ≥ k or H0 : µ = k
    • H1 : µ < k or H1 : µ < k
  • Type 3 ( Two tailed test)
    • H0 : µ = k 
    • H1 : µ ≠ k 

Decision Criteria In Hypothesis Testing

  • When we perform a hypothesis testing we make one of the two decisions:
    • Reject the null hypothesis or
    • Accept the null hypothesis
  • As our decision is based on the sample rather than the entire population there is always a possibility we will make the wrong decision.

Errors in Hypothesis Testing

  • There are two types of errors in statistical hypothesis
    • Type 1 error: When we Reject H0 when H0 is true then type 1 error occurs.
    • Type 2 error: When we Accept H0 when H0 is false or then type 2 error occurs.

Steps for Hypothesis Testing

  1. Set Null Hypothesis H0: with equality “=“ against Alternative Hypothesis Ha: “<“ or “>” or “≠” 
    1. Null Hypothesis says “nothing special is going on i.e. no change from status quo or no relationship”. This is challenged by Alternate Hypothesis.
    2. The alternative hypothesis, Ha, usually represents what we want to check or what we suspect is really going on. Domain claims usually reside here. “<“ and “>” are called one sided alternatives whereas “≠” is called two sided.
  2. Decide the type of hypothesis.
  3. Choose the sample, collect and summarize the data
    1. Obtain a random sample (as far as possible)
    2. Summarize sample statistics. Use these sample statistics to summarize the data
    3. Check whether the data meet the conditions under which the test can be used
  4. Test hypothesis (Assessment of evidence and examine p-value)
    1. Asses how surprising it would be to observe data like that observed if Null hypothesis were true
    2. If this probability is very small, then that means that it would be very surprising to get data like that observed if H0 were true. This probability is denoted by p-value
    3. The smaller the p-value, the more surprising it is to get this data when H0 is true, and therefore, the stronger the evidence the data provide against H0
  5. Conclude in context.
    1. Based on the data, you draw conclusions about whether or not there is enough evidence to reject Ho based on how small the p-value is
    2. Traditionally the cut-off for determining how small the p-value should be is called significance of the test (a). The most common value of a is 0.05 (or 5%). This is largely due to just convenience and tradition
    3. This means that:
      1. If the p-value < α (usually 0.05), then the data we got is considered to be “rare (or surprising) enough” when Ho is true, and we say that the data provide significant evidence against Ho, so we reject Ho and accept Ha.
      2. If the p-value > α (usually 0.05), then our data are not considered to be “surprising enough” when Ho is true, and we say that our data do not provide enough evidence to reject Ho
    4. Another common wording (mostly in scientific journals) is:
      1. “The results are statistically significant” – when the p-value < α
      2. “The results are not statistically significant” – when the p-value > α.

Leave a Reply

Your email address will not be published. Required fields are marked *