Math 105, Topics in Mathematics

Lesson 8 :Testing Hypotheses

Satya Mandal

Due Date: See the Lecture Notes Site.

The Philosophy of Testing Hypothesesback to top

The Testing of hypotheses is another approach to estimation of parameters. A hypothesis H0, called the Null hypothesis, is tested against another hypothesis HA, called the alternative hypothesis. Only one of these two hypotheses is true. Based on the collected sample and established testing criterion, one of them is accepted and the other one rejected. The following two examples would provide further insight.

Example 1. An assertion is made that the disparity between the wages (annual income) of working men and women does not exist any more. To test this assertion, the mean annual incomes μ1, μ2, respectively, of the working male and female populations were compared. Our Null hypothesis H0 would be that the mean annual income μ1 of the working male population would be higher than the mean annual income μ2 of the working female population. The Alternative Hypothesis HA would be, as the assertion suggests, that these two means would be equal. We write them formally as:

H0 : μ1- μ2 > 0
HA : μ1- μ2 = 0

Example 2. A TV commentator mentioned that, during the last decade, the life expectancy of human being has increased substantially from 75 years. To test this assertion, the mean life expectancy μ was compared with 75. The Null hypothesis H0 would be that the mean life expectancy μ remains equal to 75, as it was before. The Alternative Hypothesis HA would be that, as the assertion suggests, the mean μ rose above 75 year by now. We write them formally as:

H0 : μ =75
HA : μ >75

Definitions and Terminologies.

Following are some definitions and terminologies.

  1. Definition. A statistical hypothesis is defined to be a statement, claim, or proposition regarding a population. Usually, it would be about the values of the population parameters. The hypotheses H0 and HA in the above two examples would examples of statistical hypotheses.

  2. It would be important to distinguish which one would be the Null hypothesis and which one would be the alternative hypothesis in a given context. One of them would, essentially, be the negation of the other.

  3. The Null hypothesis H0 represents the status quo. It would be the conventional wisdom. It represents something that was accepted for a long time, or some assumption or method that has been working reliably for a long time. Null hypothesis would remain as the default, unless the collected data provides very strong evidence against it, in favor of the alternative. There is a clear bias in favor of the Null Hypothesis.

    The alternative hypothesis represents a new claim or something out of the ordinary. It could be a researcher's new technology or some sales person's claim. The bar for acceptance of the Alternative Hypothesis is very high. The burden of proof of its validity belongs to those who assert the same. There may even be resistance or skepticism about its validity. It would be accepted only if there is very strong evidence, in the collected data, in its support.

    There are reasons for such favoritism in favor of Null Hypothesis. This is because an incorrect decision to reject the Null may have more serious consequences than rejecting the Alternative incorrectly. For example, in any medical test, erroneously concluding that the patient does not have an ailment would have more grievous consequences than erroneously concluding that the patient has the same ailment. Similarly, when one designs a pregnancy test, the priority would be to minimize chances (probability) of erroneously concluding that one is not pregnant when one is indeed pregnant, than the converse. Common sense dictates that such a test could only allow a maximum of five percent of such erroneous conclusions. Such erroneous conclusions are also known as false negative and false positive.

  4. Given a Null hypothesis H0 and an alternative hypothesis HA, a test of hypothesis is a rule or a procedure to decide, based on the collected sample, whether to accept H0 or HA. The test will be based on the value of a test statistic. The rule is also called the decision rule.

    A test of hypothesis is also known as a Significance Test. The test will be based on the value of a test statistic.

  5. Two Types of errors. In such testing of hypotheses, two types of mistaken conclusions (errors) are possible as follows.
    1. Rejecting the Null H0 when it is in fact true would be called the type one error. The analogy would be a false negative.
    2. Accepting the Null H0 when it is in fact false would be called the type two error. The corresponding analogy would be a false positive.
    3. The probability of type one error would be called the level of significance. It would be denoted by α. Since the priority would be to minimize the frequency of false negative, α would be a small number. Most often, α will be a .1, .05, .01 or a small number.

The rest of this chapter would be analogous to Lesson 7. Corresponding to each interval estimation we considered, there would be one Significance Test.


8.1 A Significance Test for mean μ, when σ is knownback to top

Let X be a random variable with mean μ and standard deviation σ. Some of our hypotheses testing would look like the following.


Two Tail Test Left Tail Test Right Tail Test

H0 : μ = 75
HA : μ ≠ 75

H0 : μ = 75
HA : μ > 75

H0 : μ = 75
HA : μ < 75


More generally, they would look like one of the following.

Two Tail Test Left Tail Test Right Tail Test

H0 : μ = μ 0
HA : μ ≠ μ 0

H0 : μ = μ 0
HA : μ > μ 0

H0 : μ = μ 0
HA : μ < μ 0


In this course, all the Null Hypotheses H0 would be an equality. The alternative Hypotheses HA would be one of the three inequalities as above.

Develop a Significance Test

A Significance Test for the mean μ would be developed for the following Null and Alternative hypotheses:

H0 : μ = μ 0
HA : μ ≠ μ 0

Take a sample X1,X2, …, Xm of size m from the X population and let X be the sample mean.

  1. The sample size m is assumed to be large. Therefore, by CLT X has

    N(μ, σX)        distribution, where        σ X = σ/m.

  2. By increasing the sample size m, both type one and type two errors can be controlled. Once the sample size is fixed, it is not possible to control both simultaneously. As one of them is minimized the other one goes up. As was mentioned above, priority would be to control the probability of type one error, that is the level of significance α. Therefore, a Test of Significance at the level of significance α will be developed.

  3. As usual, use X as an estimator of μ. As the alternative hypothesis is HA : μ ≠ μ0, the null hypothesis H0 would be rejected, only if X and μ0 are far apart, that is, if

    | X - μ0| is large.
  4. If H0 is true, then μ = μ0 and

    Z=(X-μ0) /σX       has N(0,1) distribution, where      σX   =   σ/m.

    Expression Z above will be called a test statistic and we will accept H0 if the observed (absolute) value |z| of |Z| is small and reject H0 if the observed value |z| of |Z| is large.

  5. If H0 is true, then

    P(Z is not within [ -zα /2, zα/2 ])  =  α

  6. So, at the level of significance α, the decision rule is set as:

    Reject H0       if   z   is not within       [ -zα/2, zα/2 ]       where       z = (x-μ0) /σX  = (x-μ 0)m/σ.

    Accept H0 otherwise.

    Obviously, rejection of H0 is synonymous to acceptance of HA.
  7. The above decision rule works only if we know the value of σ.

The Hypothesis Test for the mean μ,   when σ is known

Arguing similary, set the Decision Rules for all three tests for mean μ. It is assumes that the value of σ is known.

  1. Two-tail test: The decision rule for testing the hypotheses

    H0 :  μ = μ0
    HA :  μ ≠ μ0


    is set as, at the level of significance α,

    Reject H0 if z    is not within   [ -zα/2, zα/2 ]       where       z =  (x-μ 0)m/σ.

    Accept H0 otherwise.
  2. Left-tail test: The decision rule for testing the hypotheses

    H0 : μ = μ0
    HA : μ < μ0


    is set as, at the level of significance α

    Reject H0 if z < -zα       where       z =  (x-μ0)m/σ.

    Accept H0 otherwise.


  3. Right-tail test: The decision rule for testing the hypotheses
    H0 : μ = μ0
    HA : μ > μ0


    is set as, at the level of significance α,

    Reject H0 if z > z α       where       z =  (x-μ0)m/σ.

    Accept H0 otherwise.

  4. Informally, these will be called Z-Tests.

Definition. The set of values (that is, the intervals) that leads to the rejection of the Null hypothesis H0 is called the rejection region or the critical region.

p-Value based Decision Rules

There is an alternative and equivalent way to describe the decision rules, stated above. This is based on some probability computations.

Definition. Let T be a test statistic to test H0 against HA. Let the observed value of T = t. The p-value, for this test, is defined as the probability, assuming H0 is true, that T will take a value at least as extreme as t or worse. In the above decision rules, the test statistic is

Z = (X-μ0) /σX  =  (x-μ0)m/ σ

In particular for the Z-test, if Z = z is the observed value of Z, then p-value is define as follow. The normalcdf function of TI-84 can be used to compute the same.

  1. For the two-tail test, the p-value is given by

    p=P(Z [-|z|,|z|])  =   1 - P(-|z|   < Z  <  |z|) = 1 - normalcdf(-|z|, |z|).

  2. For the left-tail test, the p-value is given by

    p=P(Z < z) = normalcdf(-5, z).

  3. For the right-tail test, the p-value is given by

    p=P(Z > z)  =   normalcdf(z, 5).

p-value based Decision Rules:

For all three Z-Tests, the p-values can be computed as above. Then, the above decision rules could, equivalently, be written as, at the level of significance α,


Reject H0 if p <  α
Accept H0 otherwise
.

Remark. For the rest of this chapter, the decision rules for various significance tests will be described in two ways: (1) By checking whether the value of the test statistics T falls within the critical region or not. (2) By checking whether the p-value < α or not?


Problems on 8.1: On Z-Tests

Exercise 8.1.1. The standard deviation of life expectancy of a population is σ = 15 years. A sample of size 25 had mean life expectancy X = = 81 years. Perform a significence test for the null and alternative hypothesis, regarding the mean life expectancy μ:

H0 : μ = 75
HA : μ 75.

  1. Compute the value of the test statistic Z.
  2. Compute the p-value.
  3. At the 5 percent level of significance will you reject or accept the null hypothesis?
  4. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
Here the population standard deviation σ = 15,
the sample size n = 25,
the sample mean X = 81,
Also, μ0 = 75

  1. The Test Statistics z =  (x- μ0)n/σ =(81-75)25/15 = 2.
  2. This is a Two Tail Test. So,
    p-value =  1 - P(-|z|   < Z  <  |z|) = 1 - normalcdf(-|z|, |z|) = 1 - normalcdf(-2, 2) = 1 - .9545 = .0455.

  3. Five percent level of significance means α = .05. Since,
    p-value = .0455 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
    That means, at five percent level of significance, we accept that the mean life expectancy μ 75.
  4. Since p-value = .0455, from this possibilities of .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; 5 percent would be the lowest level at which we would reject the null hypothesis.

p-value demo. The problem may have changed.

Exercise 8.1.2. (Change the level of significance.) Assume the same situation as in exercise 8.1.1. At the 1 percent level of significance will you reject or accept the null hypothesis?

Solution by Long Hand Method:
This is also a two tail test. From Exercise 8.1.1, p-value =  .0455.


One percent level of significance means α = .01.Since,
p-value = .0455 is not less than α = .01. We ACCEPT the null hypothesis at one percent level of significance.
That means, at one percent level of significance, we do not accept that the mean life expectancy μ 75.

Exercise 8.1.3. (Change the alternative hypothesis) Assume the same situation as in exercise 8.1.1 and change the hypotheses as follows:

H0 : μ = 75
HA : μ > 75

Answer all the four questions as in exercise 8.1.1.

Solution by Long Hand Method:

  1. From exercise 8.1.1 the test statistics z  =   = 2.
  2. This is a Right Tail Test. So,
    p-value = =P(Z > z)  =   normalcdf(2, 5) = .02275

  3. Five percent level of significance means α = .05. Since,
    p-value = .02275 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
    That means, at five percent level of significance, we accept that the mean life expectancy μ is higher than 75 years.
  4. Since p-value = .02275, from this possibilities of .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; 3 percent would be the lowest level at which we would reject the null hypothesis (i.e. accept the alternative).

p-value demo. The problem may have changed.

Exercise 8.1.4. The time taken by an athlete to run an event is normally distributed with mean μ and known standard deviation σ = 3.5 seconds. The coach believes that his/her mean time μ has improved from last year's mean 34 seconds. To test, the athlete ran 16 times and the sample mean was found to be X = 31 seconds.

  1. Formulate the null and alternative hypotheses to perform a significance test for coach's belief.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 5 percent level of significance will you reject or accept the null hypothesis (or that his/her time has improved or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

  1. The alternative hypothesis is the coach's belief: HA: μ < 34. The null and alternative hypotheses are:

    H0 : μ = 34
    HA : μ < 34.

    We summarize the given data:

    The population standard deviation σ = 3.5,
    the sample size n = 16,
    the sample mean X = 31,
    Also, μ0 = 34
  2. The Test Statistics z =  (x- μ0)n/σ =(31-34)16/3.5 = -3.4286
  3. This is a Left Tail Test. So,
    p-value =  P(Z   <  z) = normalcdf(-5, z) = normalcdf(-5, -3.4286) = 3.0311*10-4.

  4. Five percent level of significance means α = .05. Since,
    p-value = 3.0311*10-4 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
    That means, at five percent level of significance, we accept that the mean time μ has improved from last year's mean 34 seconds.
  5. Since p-value = 3.0311*10-4, from this possibilities of .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; .1 percent (because 3.0311*10-4 < .001) would be the lowest level at which we would reject the null hypothesis.

p-value demo .The problem may have changed.

Exercise 8.1.5. The effectiveness of a weight loss program is to be tested on a group of 83 participants. At the beginning of the program, the mean weight of group is 210 pounds. At the end of the program the mean weight of the group is 199 pounds. The standard deviation of weight is known to be σ = 53.1 pounds. In terms of mean weight μ, perform a significance test that the program is effective.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Decide if it is a Two Tail, Left Tail or Right Tail Test and compute the p-value.
  4. At the 2 percent level of significance will you reject or accept the null hypothesis (or that the program is effective or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The population mean weight (after completing such a program) will be denoted by μ.

  1. The alternative hypothesis is program was effective to reduce the mean weight feom 210 pounds: HA: μ < 210. The null and alternative hypotheses are:

    H0 : μ = 210
    HA : μ < 210.

    We summarize the given data:

    The population standard deviation σ = 53.1,
    the sample size n = 83,
    the sample mean X = 199,
    Also, μ0 = 210
  2. The Test Statistics z =  (x- μ0)n/σ =(199-210)83/53.1 = -1.8872
  3. This is a Left Tail Test. So,
    p-value =  P(Z   <  z) = normalcdf(-5, z) = normalcdf(-5, -1.8872) = .0296.

  4. Two percent level of significance means α = .02. Since,
    p-value = .0296 is NOT less than α = .02, we accept the null hypothesis at 2 percent level of significance.
    That means, at two percent level of significance, we do not accept that the weight loss program is effective.
  5. Since p-value = .0296, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 3 percent would be the lowest level at which we would reject the null hypothesis.

Exercise 8.1.6. A manufacturer of heating furnace is marketing a new model of energy efficient furnace. The mean gas consumption in January by ordinary furnaces is 153 CCF. A sample of 93 new model furnace had a mean consumption of 142 CCF in January. The standard deviation of consumption in January is known to be σ = 46 CCF. In terms of mean consumption μ, perform a significance test that the new model is really energy efficient.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 1 percent level of significance will you reject or accept the null hypothesis (or that the new model is energy efficient or not)?
  5. What would be the lowest level of significance, percent among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The population mean consumption in January will be denoted by μ.

  1. The alternative hypothesis is the claim of the manufacturer: HA: μ < 153. The null and alternative hypotheses are:

    H0 : μ = 153
    HA : μ < 153.

    We summarize the given data:

    The population standard deviation σ = 46,
    the sample size n = 93,
    the sample mean X = 142,
    Also, μ0 = 153
  2. The Test Statistics z =  (x- μ0)n/σ =(142 - 153)83/46 = -2.3061
  3. This is a Left Tail Test. So,
    p-value =  P(Z   <  z) = normalcdf(-5, z) = normalcdf(-5, -2.3061) = .01055.

  4. One percent level of significance means α = .01. Since,
    p-value = .01055 is NOT less than α = .01, we accept the null hypothesis at 1 percent level of significance.
    That means, at one percent level of significance, we do not accept that the this model is energy efficient.
  5. Since p-value = .01055, from this possibilities of .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent; 2 percent would be the lowest level at which we would reject the null hypothesis.

Exercise 8.1.7. It is believed that due to favorable weather conditions the mean weight μ of King salmon in Anchor River would be higher than the last year's mean of 33 pounds . The standard deviation of the weight is known to be σ = 16 pounds. A catch of 53 King had a mean of 39 pounds. In terms of mean weight μ, perform a significance test that the weight would be higher.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 2 percent level of significance will you reject or accept the null hypothesis (or that the mean weight hasincreased or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The population mean weight will be denoted by μ.

  1. The alternative hypothesis is that the mean weight has increased: HA: μ > 33. The null and alternative hypotheses are:

    H0 : μ = 33
    HA : μ > 33.

    We summarize the given data:

    The population standard deviation σ = 16,
    the sample size n = 53,
    the sample mean X = 39,
    Also, μ0 = 33
  2. The Test Statistics z =  (x- μ0)n/σ =(39 - 33)53/16 = 2.7300
  3. This is a Right Tail Test. So,
    p-value =  P(z   <  Z) = normalcdf(2.7300, 5) = .0032

  4. Two percent level of significance means α = .02. Since,
    p-value = .0032 < α = .02, we REJECT the null hypothesis at 2 percent level of significance.
    That means, at two percent level of significance, we accept that the mean weight has increased.
  5. Since p-value = .0032, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; .5 percent (because .0032 < .005) would be the lowest level at which we would reject the null hypothesis.

Exercise 8.1.8. The instructor of Math 105 claims that due to his updated method of teaching, the student's learning has improved. The mean percent score of all his Math 365 courses before this semester was 68 percent. This semester in his call of 79 students, the mean percent score is 74 percent. The standard deviation of the percent score is known to be σ = 22 percent. In terms of mean consumption μ, perform a significance test that the percent score is higher.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 2 percent level of significance will you reject or accept the null hypothesis (or that the student's learning has improved or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The population mean percent score will be denoted by μ.

  1. The alternative hypothesis is that the mean percent score has increased from 68 percent: HA: μ > 68. The null and alternative hypotheses are:

    H0 : μ = 68
    HA : μ > 68.

    We summarize the given data:

    The population standard deviation σ = 22,
    the sample size n = 79,
    the sample mean X = 74,
    Also, μ0 = 68
  2. The Test Statistics z =  (x- μ0)n/σ =(74 - 68)79 /22 = 2.4241
  3. This is a Right Tail Test. So,
    p-value =  P(z   <  Z) = normalcdf(z, 5) = normalcdf(2.4241, 5)= .0077

  4. Two percent level of significance means α = .02. Since,
    p-value = .0077 < α = .02, we REJECT the null hypothesis at 2 percent level of significance.
    That means, at two percent level of significance, we accept that the mean percent score has increased.
  5. Since p-value = .0077, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent (because .0077 < .001) would be the lowest level at which we would reject the null hypothesis.

Exercise 8.1.9. It is believed that the annual mean expenditure, including tuition, for students has increased from the corresponding mean in year 2000. In year 2000, the mean annual expenditure was $17,000. A sample of 87 students had annual mean expenditure of $19,500. The standard deviation annual expenditure is known to be σ = $7,500 percent. In terms of mean expenditure μ, perform a significance test that the mean annual expenditure μ has increased.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 2 percent level of significance will you reject or accept the null hypothesis (or that the expenditure has or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?


8.2 Significance Test for μ, Case of σ Unknown back to top

Let X be a random variable with mean μ and standard deviation σ. In this section also, another confidence interval of the mean μ. In contrast to Z-Test, this section deals with the situation when σ is unknown. As in the case of T-itervals (section 7.2), X would be assumed to have a normal distribution. Two Tail, Left Tail and Right Tail Tests would be developed to test the null hypothesis H0: μ = μ0, in the case when the value of σ is not known.

A sample X1,X2,…,Xm of size m is drawn from the X population. Let X and S2 denote the sample mean and variance, respectively. The statistic

T=((X-μ0) m) /S        would be the Test Statistic.

Similar to the situation of T-intervals (section 7.2), when the null hypthesis H0: μ = μ0 is true, T has t-distribution with degrees of freedom m-1. Using the same kind of arguments as in section 8.1, the decision rules are set as follows:

  1. Two-tail test: The decision rule for testing the hypotheses

    H0 : μ= μ0
    HA : μμ0

    is set as, at the level of significance α,

    Reject H0   if   t      is not within      [ -tm-1, α/2, tm-1, α/2 ]       where       t =  ((x-μ0) m) /s.

    Accept H0 otherwise
    .

  2. Left-tail test: The decision rule for testing the hypotheses
    H0 : μ = μ0
    HA : μ < μ0


    is set as, at the level of significance α,

    Reject H0   if   t < -tm-1, α      where      t = ((x-μ0) m) /s.

    Accept H0 otherwise.


  3. Right-tail test: The decision rule for testing the hypotheses

    H0 : μ = μ0
    HA : μ > μ0


    is set as, at the level of significance α,


    Reject H0   if   t > tm-1, α       where       t =  ((x-μ0) m) /s

    Accept H0 otherwise.

These are known as T-Tests.

p-Value based Decision Rules

The test statistic

T =  (x-μ0) m/S      has a t-distribution, with degrees of freedom m-1.

For the T-Tests, if T = t is the observed value of T, then p-value is define as follow. The tcdf function of TI-84 can be used to compute the same.

  1. For the two-tail test, the p-value is given by

    p=P(T   not within   [-|t|,|t|])  =   1 - P(-|t|   < Z  <  |t|) = 1 - tcdf(-|t|, |t|, m-1).

  2. For the left-tail test, the p-value is given by

    p=P(T < t) =tcdf(-5, t, m-1) + [1 - tcdf(-5, 5, m-1)]/2 ≈ tcdf(-5, t, m-1)         whenever m is large.

  3. For the right-tail test, the p-value is given by

    p=P(T > t) = tcdf(t, 5, m-1) + [1 - tcdf(-5, 5, m-1)]/2 ≈ tcdf(t, 5, m-1)         whenever m is large.

p-value based Decision Rules:

For all three T-Tests, the p-values can be computed as above. Then, the above decision rules could, equivalently, be written as, at the level of significance α,


Reject H0 if p <  α
Accept H0 otherwise
.

Problems on 8.2: on T-Tests


Exercise 8.2.1. A supplier of lamps claims that the mean lifetime of his lamps is longer than that of the lamps in the market. The mean lifetime of the bulbs on the market is 3456 hours. To test the claim of the supplier, a sample of 26 bulbs were examined. The sample mean was found to be 3720 hours and the sample standard deviation was s = 552 hours. In terms of mean lifetime μ, perform a significance test that the supplier's lamps last longer.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 5 percent level of significance will you reject or accept the null hypothesis (or that the mean lifetime of the lamps is higher or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

Here the population standard deviation is not known. So, the T-test will be used.

  1. The alternative hypothesis is that mean lifetime μ of the supplier's lamps is higher than 3456 hours: HA: μ > 3456. The null and alternative hypotheses are:

    H0 : μ = 3456
    HA : μ > 3456.

    We summarize the given data:

    The sample size n = 26,
    The sample mean X = 3720,
    The sample standard deviation S = 552,
    Also, μ0 = 3456
  2. The Test Statistics t =  (x- μ0)n/S =(3720 - 3456) 26/552 = 2.4387
  3. This is a Right Tail T-Test.
    The degrees for freedom df = m-1 26-1 =25.

    p-value =  P(t   <  T) = tcdf(2.4387, 5, 25) = .0111

  4. Five percent level of significance means α = .05. Since,
    p-value = .0111 < α = .05, we REJECT the null hypothesis at 5 percent level of significance.
    That means, at five percent level of significance, we accept that the supplier's claim.
  5. Since p-value = .0111, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent (because .0111 < .02) would be the lowest level at which we would reject the null hypothesis.


p-Value demo . The problem may have changed.

Exercise 8.2.2. It is believed that the mean length of babies at birth in the United States is higher than the mean of 16.7 inches in some other nation. A sample of 33 babies in the United States was collected, and the sample mean and standard deviation was found to be X = 19 inches, S = 5.5 inches. Perform a of significance test for this beleif as follows.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 1 percent level of significance will you reject or accept the null hypothesis (or that the birth length is higher or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

Here the population standard deviation is not known. So, the T-test will be used.

  1. The alternative hypothesis is that mean birth length μ in US is higher than 16.7 inches: HA: μ > 16.7 . The null and alternative hypotheses are:

    H0 : μ = 16.7
    HA : μ > 16.7 .

    We summarize the given data:

    The sample size n = 33,
    The sample mean X = 19,
    The sample standard deviation S = 5.5,
    Also, μ0 = 16.7
  2. The Test Statistics t =  (x- μ0)n/S =(19 - 16.7) 33/5.5 = 2.4023
  3. This is a Right Tail T-Test.
    The degrees for freedom df = m-1 33-1 = 32.

    p-value =  P(t   <  T) = tcdf(2.4023, 5, 32) = .0111

  4. One percent level of significance means α = .01. Since,
    p-value = .0111 is not less than α = .01, we ACCEPT the null hypothesis at 1 percent level of significance.
    That means, at one percent level of significance, we do NOT accept that the mean birth length μ is longer than 16.7 .
  5. Since p-value = .0111, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent (because .0111 < .02) would be the lowest level at which we would reject the null hypothesis.

p-Value demo
. The problem may have changed.

Exercise 8.2.3. A car manufacturer claims that a new model of car will get more mileage per gallon than the old model. The old model gets a mean mileage of 33 miles per gallon. To test the claim, 19 cars from the new model were tested and the sample mean was found to be x = 35 miles and standard deviation s = 3.3 miles. Perform a significance test for this manufacturer's claim as follows.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 1 percent level of significance will you reject or accept the null hypothesis (or that the milage is higher or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

Here the population standard deviation is not known. So, the T-test will be used.

  1. The alternative hypothesis is that mean milage μ per gallon for the new model is higher than 33 miles: HA: μ > 33 . The null and alternative hypotheses are:

    H0 : μ = 33
    HA : μ > 33 .

    We summarize the given data:

    The sample size n = 19,
    The sample mean X = 35,
    The sample standard deviation S = 3.3,
    Also, μ0 = 33
  2. The Test Statistics t =  (x- μ0)n/S =(35 - 33) 19/3.3 = 2.6218
  3. This is a Right Tail T-Test.
    The degrees for freedom df = m-1 = 19 - 1 = 18.

    p-value =  P(t   <  T) = tcdf(2.6218, 5, 18) = .0086

  4. One percent level of significance means α = .01. Since,
    p-value = .0086 is not less than α = .01, we ACCEPT the null hypothesis at 1 percent level of significance.
    That means, at one percent level of significance, we do NOT accept that the mean milage μ is higher than 33 miles .
  5. Since p-value = .0086, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent (because .0086 < .01) would be the lowest level at which we would reject the null hypothesis.
p-Value demo . The problem may have changed.

Exercise 8.2.4. It is assumed that the lifetime (in hours) of light bulbs produced in a factory is normally distributed with mean μ and standard deviation σ. The mean lifetime for an average light bulb on the market is 4500 hours. To estimate μ, the following data was collected on the lifetime of light bulbs.

5110 4671 6441 3331 5055 5270 5335 4973 1837 5487
7783 4560 6074 4777 4707 5263 4978 5418 5123 5017

The producer claims that the mean lifetime of the bulbs is more than the average bulbs on the market. Perform a significance test for this claim.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 2 percent level of significance will you reject or accept the null hypothesis (or that the lifetime is higher or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

Here the population standard deviation is not known. So, the T-test will be used.

  1. The alternative hypothesis is that the mean lifetime μ of the lamps is higher than 4500 hours: HA: μ > 4500 . The null and alternative hypotheses are:

    H0 : μ = 4500
    HA : μ > 4500.

    Use TI-84, as in Lesson 2, summarize the raw data:

    The sample size n = 20,
    The sample mean X = 5060.5,
    The sample standard deviation S = 1143.1106,
    Also, μ0 = 4500
  2. The Test Statistics t =  (x- μ0)n/S =(5060.5 - 4500) 20/1143.1106 = 2.1928
  3. This is a Right Tail T-Test.
    The degrees for freedom df = m-1 = 20 - 1 = 19.

    p-value =  P(t   <  T) = tcdf(2.1928, 5, 19) = .0204

  4. Two percent level of significance means α = .02. Since,
    p-value = .0204 is not less than α = .02, we ACCEPT the null hypothesis at 2 percent level of significance.
    That means, at two percent level of significance, we do NOT accept that the mean lifetime μ is higher than 4500 hours.
  5. Since p-value = .0204, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 3 percent (because .0204 < .03) would be the lowest level at which we would reject the null hypothesis.
p-Value demo . The problem may have changed.

Exercise 8.2.5. To estimate the mean weight (in pounds) of salmon in a river, the following sample was collected.

34.7 33.8 38.2 20.3 27.8
45.3 43.1 37.3 32.5 32.3
31.8 41.5 44.5 29.2 25.3
29.6 39.5 29.1 37.3  

It is suspected that, due to polution, the mean weight has reduced from last year's the mean weight 37 pounds. Perform a significance test as follows.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 10 percent level of significance will you reject or accept the null hypothesis (or that the mean weight has reduced or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Solution by Long Hand Method:

Here the population standard deviation is not known. So, the T-test will be used.

  1. The alternative hypothesis is that the mean weight μ has reduced from 37 pounds: HA: μ < 37 . The null and alternative hypotheses are:

    H0 : μ = 37
    HA : μ < 37.

    Use TI-84, as in Lesson 2, summarize the raw data:

    The sample size n = 19,
    The sample mean X = 34.3737,
    The sample standard deviation S = 6.7608,
    Also, μ0 = 37
  2. The Test Statistics t =  (x- μ0)n/S =(34.3737 - 37) 19/6.7608 = -1.6933
  3. This is a Left Tail T-Test.
    The degrees for freedom df = m-1 = 19 - 1 = 18.

    p-value =  P(T   <  t) = tcdf(-5, -1.6933, 18) = .0538

  4. Ten percent level of significance means α = .10. Since,
    p-value = .0538 < α = .10, we REJECT the null hypothesis at 10 percent level of significance.
    That means, at ten percent level of significance, we accept that the mean weight μ has reduced from 37 pounds.
  5. Since p-value = .0538, from this possibilities of .1, .5, 1 ,2, 3, 4, 5, 6, 7,8, 9,10 percent; 6 percent (because .0538 < .06) would be the lowest level at which we would reject the null hypothesis.

Exercise 8.2.6. It is speculated that the teenage boys in a certain community are under weight. Under normal circumstances the mean weigh of this age group should be 155 pounds. A sample of 27 teenage boys had a mean weight 135 pound and sample standard deviation 32 pounds. Perform a significance test whether the mean weigh μ of this group is below 155 pounds, as follows.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis (or that the mean weight is lower or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Exercise 8.2.7. A guess is that the mean time μ needed for a student to arrive at the class from his/her residence would be less than 30 minutes. To test his guess, a sample 37 was collected. The sample mean time needed was 27 minutes and the sample standard deviation was 9 minutes. Perform a significance test whether the mean time μ needed would be below 30 minutes, as follows.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic T.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis (or that the mean weight is lower or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?


8.3 Population Proportionback to top

Let p be the population proportion that has a particular attribute A. In this section, decision rules would be formulated to to test the Null hypothesis

H0 : p  =  p0.

As in section 7.3, a sample of size m is drawn. Let X be the number of sample members that has this attribute and X = X/m be the sample proportion. (In other words, X is the sample proportion of "success.") The test statistic to be used is

Z=(X-p0) /σX        where        σX   =   [(p0(1-p0)) /m].

If H0 : p  =  p0 is true, then Z has approximately N(0,1) distribution. As before, the decision rules are set as follows:

  1. Two-tail test: The decision rule for testing the hypotheses

    H0 : p = p0
    HA : p ≠ p0


    is set as, at the level of significance α,


    Reject H0 if z     is not within      [ -zα/2, zα/2 ]      where      z = (x-p0) /σX.

    Accept H0 otherwise.


  2. Left-tail test: The decision rule for testing the hypotheses

    H0 : p = p0
    HA : p < p0

    is set as, at the level of significance α,

    Reject H0 if z   < -zα      where      z = (x-p0) /σX

    Accept H0 otherwise.


  3. Right-tail test: The decision rule for testing the hypotheses

    H0 : p = p0
    HA : p > p0


    is set as, at the level of significance α,


    Reject H0 if z > zα      where      z = (x-p0) /σX

    Accept H0 otherwise.

These are known as 1-Proportion Z-Test


p-Value based Decision Rules

With thhe test statistics

Z = (X - p0) /σX  =  (x- p0)m/ [p0(1-p0)]

p-Values are defined as

  1. For the two-tail test,

    p=P(Z [-|z|,|z|])  =   1 - P(-|z|   < Z  <  |z|) = 1 - normalcdf(-|z|, |z|).

  2. For the left-tail test,

    p=P(Z < z) = normalcdf(-5, z).

  3. For the right-tail test,

    p=P(Z > z)  =   normalcdf(z, 5).

p-value based Decision Rules:

For all three 1-Proportion Z-Tests, the p-values can be computed as above. Then, the above decision rules could, equivalently, be written as, at the level of significance α,


Reject H0 if p <  α
Accept H0 otherwise
.

Problems on 8.3: 1-Proportion Z-Test

Exercise 8.3.1. In a sample of 197 apples from a lot, 26 were found to be sour. The lot will be rejected if more than 10 percent is sour. Perform a significance test for the acceptability of this lot.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis (or whether the lot is acceptable or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The proportion of sour apples will be denoted by p. A 1-Proportion Z-Test will be performed.

  1. The alternate hypothesis is that p is more that .1 (ten percent).
    The null and alternative hypotheses are:

    H0 : p  =  .1
    HA : p   >   .1.

    We summarize the given data:

    The sample size n = 197,
    The number of success X = 26,
    The sample proportion of success X = X/n = 26/197 = .1320
    Also, p0 = .1
  2. The Test Statistics
    Z  =  (X - p0)n/ [p0(1-p0)] = (.1320 - .1) 197/ [.1(1 - .1)] = 1.4971
  3. This is a Right Tail Test. So,
    p-value =  P(z   <  Z) = normalcdf(z, 5) = normalcdf(1.4971, 5) = .0672

  4. Three percent level of significance means α = .03. Since,
    p-value = .0672 is NOT less than α = .03, we accept the null hypothesis at 3 percent level of significance.
    That means, at three percent level of significance, we conclude that the lot is acceptable.
  5. In fact, .06 < p-value = .0296 < .07. Therefore, from these possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 7 percent would be the lowest level at which we would reject the null hypothesis.

a p-Value demo . The problem may have changed.

Exercise 8.3.2. A new vaccine was tried on 147 randomly selected individuals, and it was determined that 61 of them got the virus. It is known that usually fifty percent of the population get the virus. Perform a significance test to decide if this vaccine is indeed effective or not.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis (or that the vaccine is effective or not)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent, at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The proportion of the vaccinated population who benefit from it would be denoted by p.
A 1-Proportion Z-Test will be performed.

  1. The alternate hypothesis is that p is less that .5 (better than 50 percent).
    The null and alternative hypotheses are:

    H0 : p  =  .5
    HA : p   <   .5.

    We summarize the given data:

    The sample size n = 147,
    The number of success X = 61,
    The sample proportion of success X = X/n = 61/147 = .4150
    Also, p0 = .5
  2. The Test Statistics
    Z  =  (X - p0)n/ [p0(1-p0)] = (.4150 - .5) 147/ [.5(1 - .5)] = -2.0611
  3. This is a Left Tail Test. So,
    p-value =  P(Z   <  z) = normalcdf(-5, z) = normalcdf(-5, -2.0611) = .0196

  4. Three percent level of significance means α = .03. Since,
    p-value = .0196 < α = .03, we REJECT the null hypothesis at 3 percent level of significance.
    That means, at three percent level of significance, we conclude that the vaccine in EFFECTIVE.
  5. In fact, .01 < p-value = .0196 < .02.
    Therefore, from these possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 2 percent would be the lowest level at which we would reject the null hypothesis.

a p-Value Demo . The problem may have changed.

Exercise 8.3.3. Before an election for a congressional seat, a poll was conducted. Out of 887 randomly selected voters interviewed, 389 said that they would vote for Candidate A. The election strategists have decided that, to win Candidate A needs to get more than 40 percent votes. Perform a significance test whether he/she will get more than 40 percent or not.

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis (or whether he/she will get more than 40 percent or not.)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Solution by Long Hand Method:
The proportion of the voter population who would vote for the candidate would be denoted by p.
A 1-Proportion Z-Test will be performed.

  1. The alternate hypothesis is that p is more that .4 (higher than 40 percent).
    The null and alternative hypotheses are:

    H0 : p  =  .4
    HA : p   >   .4.

    We summarize the given data:

    The sample size n = 887,
    The number of success X = 389,
    The sample proportion of success X = X/n = 389/887 = .4386
    Also, p0 = .4
  2. The Test Statistics
    Z  =  (X - p0)n/ [p0(1-p0)] = (.4386 - .4) 887/ [.4(1 - .4)] = 2.3466
  3. This is a Right Tail Test. So,
    p-value =  P(z   <  Z) = normalcdf(z, 5) = normalcdf(2.3466, 5) = .0095

  4. Three percent level of significance means α = .03. Since,
    p-value = .0095 < α = .03, we REJECT the null hypothesis at 3 percent level of significance.
    That means, at three percent level of significance, we conclude that the Candidate A will win.
  5. In fact, .005 < p-value = .0095 < .01.
    Therefore, from this possibilities of .1, .5, 1 ,2, 3, 4, 5,4, 7,8, 9,10 percent; 1 percent would be the lowest level at which we would reject the null hypothesis.

a p-Value demo. The problem may have changed.

Exercise 8.3.4. A pollster was asked to make decision whether the proportion p of the US population who would support Government shutdown due to budget dispute, would be above 55 percent or not? A sample 898 were polled and 522 of them said they would support government shutdown. Perform a significance test whether p would be above 55 percent?

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis.?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Exercise 8.3.5. A telephone company wants to know whether the proportion p of calls that are longer than 20 minutes, in a town, would exceed 65 percent. A sample of 1123 class, 761 were longer than 20 minute. Perform a significance test whether p would be above 65 percent?

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis.)?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?

Exercise 8.3.6. It is believed that, this year, proportion p of infected oranges will remain below 15 percent. A sample of 1333 class, 175 were were infected. Perform a significance test whether p would remain below 15 percent?

  1. Formulate the null and alternative hypotheses.
  2. Compute the value of the test statistic Z.
  3. Compute the p-value.
  4. At the 3 percent level of significance will you reject or accept the null hypothesis?
  5. What would be the lowest level of significance, among .1, .5, 1 , 2, 3, 4, 5, 6, 7, 8, 9, 10 percent,at which you would REJECT the null hypothesis?


back to top