One-tailed z-test

In the first article about z-test, we showed how the two-tailed test works. It is also possible to construct an one-tailed test. The one-tailed test differs with a sign of alternative hypothesis. The two-tail test had the inequality sign (\neq ) in the alternative hypothesis formula. For an one-tailed test, there are two options:

  • left-tailed test which has less than (< ) sign,
  • right-tailed test which has greater than (> ) sign.

The formula for the test statistics stay the same, whereas the critical region is now different. It lays only in one side of the x axis. More specifically, the whole critical region is in the left side for the left-tailed test or in the right side for the right-tailed test (pretty straightforward if you ask me). The computation of the p-value also changes.

Left-tailed test

Let’s start with the left-tailed test. Our assignment stays with a small modification. We will assume that the machine does not allow to set the length of the component to more than 190 mm, it can be set to shorter length though. So we only need to check if the components are in average shorter, or not. We now have a new set of 20 observations.

189.3828188.1783189.2116190.6886190.0598188.4774189.5478189.1187188.5021189.9077191.3365190.1061189.76189.1427189.8124189.1332190.7368189.4031190.099189.5483

As we said, the null hypothesis stays and the alternative has < sign, so:

  • H_0: \mu_0 = 190 ,
  • H_1: \mu_0 < 190 .

The critical region consists only of one part now, as you can see at the figure below. Because the area under the probability density function must still equal to the significance level, the border values are closer to zero. You can compare the figure with the figure for two-tailed test.

The formula for the critical region is

W = ( - \infty, u_{\alpha} \rangle \, .

Please note that \alpha is not divided by 2. We will keep the level of significance on 5 % so the critical region for our example is

W = ( - \infty, - 1.6449 \rangle \, .

We can get the value – 1.6449 from a statistical table. Please note we use the value for 0.95 because the normal distribution is symmetric. We only add the minus sign.

The value of the statistics is:

Z =  \frac{ \bar{x} - \mu_0}{\sigma} \cdot \sqrt{n} =  \frac{189.61 - 190}{0.9} \cdot \sqrt{20} = -1.9497

and it lies in the critical region so we reject the null hypothesis for \alpha = 5 % . The conclusion of the test is that the expected value of the length of the component is lower than 190 mm, i.e. the machine was set incorrectly.

Right-tailed test

Now we will go through the last variant which is called right-tailed test. We will work with the same example with a one modification: We assume the machine could not be set to produce shorter components than 190 mm but it set be by mistake set to produce longer one. We will use a new sample of data.

189.7755189.2872189.8255189.4385190.1141189.4514190.7601189.7654190.0965190.0603189.9051188.8833190.8449190.2563190.8725189.3535191.1673189.1358189.3755190.7177

The new hypotheses are:

  • H_0: \mu_0 = 190 ,
  • H_1: \mu_0 > 190 .

It is not surprising that the critical region now lies in the right part of the x axis.

The formula for the critical region is

W = \langle u_{1 - \alpha}, \infty) \, ,

and if we stay on \alpha = 5 % we get

W = \langle 1.6449, \infty) \, .

The value of the statistics is now

Z =  \frac{ \bar{x} - \mu_0}{\sigma} \cdot \sqrt{n} =  \frac{189.95 - 190}{0.9} \cdot \sqrt{20} = -0.2269

and it does not lies in the critical region so we do not reject the null hypothesis for \alpha = 5 %.

Leave a Reply

Name and email address are required. Your email address will not be published.

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

You may use these HTML tags and attributes:

<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <pre> <q cite=""> <s> <strike> <strong> 

%d bloggers like this: