# Upper Tail Test of Population Mean with Unknown Variance

The null hypothesis of the upper tail test of the population mean can be expressed as follows:

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

Let us define the test statistic t in terms of the sample mean, the sample size and the sample standard deviation s :

Then the null hypothesis of the upper tail test is to be rejected if t tα , where tα is the 100(1 α) percentile of the Student t distribution with n 1 degrees of freedom.

#### Problem

Suppose the food label on a cookie bag states that there is at most 2 grams of saturated fat in a single cookie. In a sample of 35 cookies, it is found that the mean amount of saturated fat per cookie is 2.1 grams. Assume that the sample standard deviation is 0.3 gram. At .05 significance level, can we reject the claim on food label?

#### Solution

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

> xbar = 2.1             # sample mean
> mu0 = 2                # hypothesized value
> s = 0.3                # sample standard deviation
> n = 35                 # sample size
> t = (xbarmu0)/(s/sqrt(n))
> t                      # test statistic
[1] 1.9720

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

> alpha = .05
> t.alpha = qt(1alpha, df=n1)
> t.alpha                # critical value
[1] 1.6991