# Two-Tailed Test of Population Mean with Known Variance

The null hypothesis of the two-tailed test of the population mean can be expressed as follows:

where μ0 is a hypothesized value of the true population mean μ.

Let us define the test statistic z in terms of the sample mean, the sample size and the population standard deviation σ :

Then the null hypothesis of the two-tailed test is to be rejected if z ≤−zα∕2 or z zα∕2 , where zα∕2 is the 100(1 α∕2) percentile of the standard normal distribution.

#### Problem

Suppose the mean weight of King Penguins found in an Antarctic colony last year was 15.4 kg. In a sample of 35 penguins same time this year in the same colony, the mean penguin weight is 14.6 kg. Assume the population standard deviation is 2.5 kg. At .05 significance level, can we reject the null hypothesis that the mean penguin weight does not differ from last year?

#### Solution

The null hypothesis is that μ = 15.4. We begin with computing the test statistic.

> xbar = 14.6            # sample mean
> mu0 = 15.4             # hypothesized value
> sigma = 2.5            # population standard deviation
> n = 35                 # sample size
> z = (xbarmu0)/(sigma/sqrt(n))
> z                      # test statistic
[1] 1.8931

We then compute the critical values at .05 significance level.

> alpha = .05
> z.half.alpha = qnorm(1alpha/2)
> c(z.half.alpha, z.half.alpha)
[1] 1.9600  1.9600