All you need to know when calculating Hypothesis Testing using one mean population.

Lamina Mary
Nov 1 · 4 min read

Outline

  • The basic concept of hypothesis testing.
  • Two-tailed and one-tailed tests.
  • Steps in conducting hypothesis tests.
  • Type I error and Type II error in hypothesis testing.

The basic concept of hypothesis testing

A statistical hypothesis is an assumption about a population that may or may not be true. Hypothesis tests are an important tool to analyze data and make some inferences out of it.

All hypothesis follows a basic logic.

  • An assumption or claim is made.
  • If your data contradicts this assumption or claim then you conclude that the claim or assumption made might be wrong.

A statistical hypothesis is of two types:

  • Null Hypothesis: Is the default hypothesis, or the currently accepted value for a parameter, which is denoted by H0
  • Alternative Hypothesis: It is also called a research hypothesis. It represents a hypothesis of observations that are influenced by some non-random causes and contradict the null Hypothesis. It is denoted by HA.

For example, it is believed that a candy machine makes chocolate bars that are on average 5g. a worker claims that the machine after maintenance no longer makes 5g bars.

H0: µ = 5g

HA: µ ≠ 5g

In this case, the null hypothesis is equal to 5g because that is the default chocolate bar the machine can produce; while, the alternative hypothesis is that the machine no longer makes 5g bars.

We have two possible outcomes for this test.

  • Reject the null hypothesis H0
  • Fail to reject the null hypothesis.

Two-tailed and one-tailed tests

A two-tailed test has two rejection regions, one in each tail. Therefore, it is a test for no difference. Consequently, the 5 percent (industrial standard) rejection region is split into two halves with 2 percent of the total area under the curve in each tail i.e. ∝/2. In contrast, one-tailed deals with a situation where we are interested in testing the hypothesis that the population mean µ is specifically greater than or less than the hypothesis value, in such cases there is only one rejection region, therefore the area under the curve is α. (Fleming and Nellis, 2000). This will be seen in figure 1.0 below.

Two-tailed tests: H0: µ = 5g

HA: µ ≠ 5g

One-tailed tests: either

(a) H0: µ = 5g; HA: µ > 5g

(b) H0: µ = 5g; HA: µ < 5g

Figure 1.0

Steps in conducting a hypothesis test

  • Formulate the hypothesis: this determines whether a two-tailed or one-tailed test is required.

E.g. H0: µ = 5g

HA: µ ≠ 5g.

  • Specification of the level of significance(α): having formulated the hypothesis to be tested, the next step is to determine the region of acceptance and rejection.

For Instance, It is believed that a candy machine makes chocolate bars on an average of 5g, a worker claims that the machine after maintenance no longer makes 5g bars. Calculate the level of significance (α) if the confidence level is 95%.

The level of significance (α) in this case is equal to 5% which is sometimes written as decimal 0.05.

  • Selection of the test statistic and its critical value (t statistic or z statistic): t-statistic is used when the population standard deviation is not provided while z statistic is used when the sample population standard deviation is provided.
  • Determine the actual value of the test statistic i.e. (calculate the t-statistic or z-statistic)
  • Decision rule: Results from a statistical test will fall into one of the two regions: the rejection region which will lead you to reject the null hypothesis or the acceptance where you accept the null hypothesis. The acceptance region is the supplement of the rejection region; if your result does not fall into the rejection region, it must fall into the acceptance region. Therefore, it is important to understand what a rejection region is.

For example, It is believed that a candy machine makes chocolate bars on an average of 5g, a worker claims that the machine after maintenance no longer makes 5g bars. The z-value is calculated to be 2.0. The assumed value for the z-value is 1.96.

Since the derived z-value is 2.0 which is larger than 1.96. The test found that the machine no longer makes 5g bars, therefore, rejecting the null hypothesis at a 5% significance level.

Decision rule: two-tailed test statistic:

Accept H0: if the actual value of z or t statistic falls between the two critical values.

Reject H0: Otherwise. (Fleming and Nellis, 2000)

Decision rule: one-tailed test statistic:

Accept H0: if the actual value of z or t statistic falls above or below the critical values. (Fleming and Nellis, 2000)

Reject H0: Otherwise.

Type I error and Type II error in Hypothesis testing

Type I error occurs when you reject a null hypothesis when it is true. While type II error occurs when you fail to reject the null hypothesis when it is false. The probability of type I error is set by our choice of α, and the industry-standard is 0.05 or 0.01 while the probability of a Type II error can be reduced by taking a larger sample size.

Reference

Michael C. Fleming and Joseph G. Nellis “principle of applied statistics” second edition published Thomson learning (2002).pg 181–185

https://www.youtube.com/watch?v=VK-rnA3-41c

Lamina Mary

Written by

I'm a Data analyst, web developer and Tech enthusiast

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade