Math 365, Elementary Statistics

Lesson 9 :Testing Hypotheses

9.1 The Philosophy of Testing Hypothesesback to top

In this lesson we will test a hypothesis H0, called Null hypothesis, against hypothesis HA, called the alternative hypothesis. Only one of these two hypotheses is true. Based on the collected sample and testing criterion that we will set up, we will accept only one of them and reject the other.

Example 1. Suppose we want to test the hypothesis that the disparity between the wages (annual income) of working men and women does not exist any more. Let μ1 be the mean annual income of men and μ2 be the mean annual income of working women. So, our Null hypothesis H0 and the alternative hypothesis HA may be written as

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

Example 2. A TV commentator mentions that only about 10 years ago the average life expectancy of a human being was 75, and now it has increased substantially. To test the claim of this commentator, we let μ be the average life expectancy of a human being. Then we set up our Null and alternative hypotheses as follows:

H0 : μ =75
HA : μ >75

  1. Definition. A statistical hypothesis is a statement, claim, or proposition regarding a population. Most often, it is about the values of the population parameters. In the above two examples, H0 and HA are statistical hypotheses.
  2. It is important to consider which is a Null hypothesis and which is an alternative hypothesis in a given context. Essentially, one is the negation of the other.
  3. The Null hypothesis H0 represents the status quo; it is something that you have believed for a long time, or it is some assumption or method that has been working reliably for you for a long time. You want to hold on to the Null hypothesis unless there is very strong evidence, in the collected data, that the alternative hypothesis is better.
  4. 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 that his/her product is better. We would be very skeptical about the alternative hypothesis and would accept it only if there is very strong evidence, in the collected data, in favor of it.
  5. 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.

    Our test will be based on the value of a test statistic. The rule is also called the decision rule or a test of significance.

  6. Two Types of errors. In this process of testing, we may commit two types of errors.
    1. If we reject H0 when it is in fact true, then it is called a type one error.
    2. If we accept H0 when it is in fact false, then it is called a type two error.
    3. The probability of committing a type one error is called the level of significance and is, normally, denoted by α. Usually, α will be a .1, .05, .01 or a small number.

9.2 Developing a Testback to top

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

H0 : μ = 75
HA : μ ≠ 75

or

H0 : μ = 75
HA : μ > 75

or

H0 : μ = 75
HA : μ < 75

More generally, we test hypotheses like

H0 : μ = μ 0
HA : μ μ 0

or

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

or

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


To Develop a test:

Suppose we have a random variable X with mean μ and standard deviation σ. We want to develop a test procedure for the following null and alternative hypotheses.

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

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

  1. We assume that sample size m is large enough, so we have by CLT that X has

    N(μ, σX)

    distribution, where

    σX = σ/m.


  2. Both type one and type two errors can be controlled by increasing the sample size m. But once the sample size is fixed, it is not possible to control both simultaneously. If you want to reduce the probability of type one error, the probability of type two error will go up. The converse is also true. Since we are more concerned about type one error, we will try to minimize the probability of type one error, which is also called the level of significance. So we want to develop a test at the level of significance α.

  3. Since X is a good estimator for μ, and since the alternative hypothesis is

    HA : μ ≠ μ0

    we will reject our null hypothesis H0 only if X and μ0 are far apart, that is, if

    | X - μ0| is large.
  4. Also, 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 ( -zα /2, zα/2 ))  =  α

  6. So, at the level of significance α, our decision rule is

    Reject H0 if z ( -zα/2, zα/2 )where z = (x-μ0) /σX

    Accept H0 otherwise
    .

  7. The above decision rule works only if we know the value of σ.

Some Hypotheses and Decision Rules. We will assume that the value of σ is known.

  1. Two-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is

    Reject H0 if z ( -zα/2, zα/2 ) where z = (x-μ0) /σX

    Accept H0 otherwise.
  2. Left-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is

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

    Accept H0 otherwise.


  3. Right-tail test: Suppose we are testing
    H0 : μ = μ0
    HA : μ > μ0


    At the level of significance α, our decision rule is

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

    Accept H0 otherwise.

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.

Definition. Suppose we have a test statistic T to test H0 against HA. Let the observed value of T = t. The P-value 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, our test statistic is

Z = (X-μ0) /σX

If Z = z is the observed value of Z, then we have the following.

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

    p=P(Z (-|z|,|z|))

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

    p=P(Z < z)

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

    p=P(Z > z)

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the Z-Test, which comes under TESTS.
  2. When we use calculators (say TI-83) for testing hypotheses, the calculator will give us z-values and p-values.
  3. We can use the z-values with the above decision rules to test hypotheses.
  4. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Remark. For the rest of this chapter, we will test hypotheses for various parameters.

  1. In each case, as above, we will have three tests—the two-tail test, the left-tail test, and the right-tail test.
  2. In each case, the calculator will give the value of the test statistic (as the z-value above) and the p-value.
  3. If we use the p-value for a test, then the decision rule will remain the same for all the tests to come:

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Problems on 9.2: Developing a Test —σ Known

Exercise 9.2.1. Assume that you have a normal population with mean μ and standard deviation σ = 15. Suppose you have collected a sample of size 25 and the sample mean X was found to be 81. We want to test the null hypothesis

H0 : μ = 75
HA : μ 75

At the 5 percent level of significance will you reject or accept the null hypothesis?
Solution

Exercise 9.2.2. (Change the level of significance.) Assume that you have a normal population with mean μ and standard deviation σ = 15. Suppose you have collected a sample of size 25 and the sample mean X was found to be 81. We want to test the null hypothesis

H0 : μ = 75
HA : μ ≠ 75


At the 1 percent level of significance will you reject or accept the null hypothesis?
Solution : Same as 9.2.1

Exercise 9.2.3. (Change the alternative hypothesis) Assume that you have a normal population with mean μ and standard deviation σ = 15. Suppose you have collected a sample of size 25 and the sample mean X was found to be 81. We want to test the null hypothesis

H0 : μ = 75
HA : μ > 75

At the 5 percent level of significance will you reject or accept the null hypothesis?
Solution

Exercise 9.2.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 mean 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 the alternative hypotheses.
  2. At 5 percent level of significance, would the coach accept or reject his belief that the athlete has improved?

Solution


9.3 Testing on a Single Populationback to top

In this section, we assume that X is a N(μ,σ) random variable. In the last section, we assumed that σ was known; but in this section we assume that σ is not known. We will do all three tests as in the above section, but assume that the value of σ is not known.

Once again, we draw a sample X1,X2,…,X m of size m from the X population. Let X and S2 be the sample mean and variance, respectively. The test statistic we use is

T=((X-μ0) m) /S

If H0: μ = μ0 is true then T has t-distribution with degrees of freedom m-1. Using the same kind of arguments, we formulate the following decision rules.

  1. Two-tail test: Suppose we are testing

    H0 : μ= μ0
    HA : μμ0

    At the level of significance α, our decision rule is

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

    Accept H0 otherwise
    .

  2. Left-tail test: Suppose we are testing
    H0 : μ = μ0
    HA : μ < μ0


    At the level of significance α, our decision rule is

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

    Accept H0 otherwise.


  3. Right-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


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

    Accept H0 otherwise.

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the T-Test, which comes under TESTS. Use it when σ is not known.
  2. The calculator will give us t-values and p-values.
  3. We can use the t-values with the above decision rules to test hypotheses.
  4. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Problems on 9.3: Testing on a Single Population —σ Unknown


Exercise 9.3.1. 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 6000 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 life expectancy of the bulbs is more than the average bulbs on the market.

  1. Formulate your null and alternative hypotheses.
  2. Write down your decision rule.
  3. At one percent level of significance, what will you decide?

Solution

Exercise 9.3.2. 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  

Last year the mean weight was found to be 35 pounds. You want to test to determine if the mean weight has changed significantly this year.

  1. Formulate your null and alternative hypotheses.
  2. Write down your decision rule.
  3. At one percent level of significance, what will you decide?

Solution

Exercise 9.3.3. A supplier of light bulbs claims that the mean lifetime of his bulbs is longer than that of the bulbs available on the market. It is known that the mean lifetime of the bulbs on the market is 3456 hours. To test the claim of the supplier, you test a sample of 26 bulbs and find the sample mean to be 3720 hours and the sample standard deviation to be s = 1152 hours. At 5 percent level of significance, would you accept the claim of the supplier?
Solution

Exercise 9.3.4. It is believed that the mean length of babies at birth in the United States is higher than the world wide mean of 18.7 inches. A sample of 26 babies in the United States was collected, and the sample mean and standard deviation was found to be x = 19 inches, s = 1 inch. At 1 percent level of significance, do you believe that babies in the United States are longer?
Solution

Exercise 9.3.5. 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, 9 cars from the new model were tested and the sample mean was found to be x = 35 miles and standard deviation s = 2.2 miles. At 5 percent level of significance, would you accept the claim of this manufacturer?
Solution


9.4 Testing Hypotheses on Variance σ2back to top

Once again, let X be a N(μ, σ) random variable. We would like to test the Null hypothesis that

H0 : σ2  =  σ20.

As usual we draw a sample X1,X2, …,Xm of size m from the X population. Let S2 be the sample variance. The test statistic we use is

Y = (m-1)S2/σ02.

If H0 : σ2 = σ02 is true, then Y has χ2-distribution with degrees of freedom m-1. Using the same kind of arguments, we formulate the following decision rules.

  1. Two-tail test: Suppose we are testing


    H0 : σ2 = σ02
    HA : σ2σ02

    At the level of significance α, our decision rule is

    Reject H0 if y ∉ ( χ2 m-1,1-α/2, χ2 m-1, α/2 ) where y = (m-1)s2/σ02

    Accept H0 otherwise.


  2. Left-tail test: Suppose we are testing

    H0 : σ2 = σ02
    HA : σ2 < σ02


    At the level of significance α, our decision rule is


    Reject H0 if y < χ2 m-1,1-αwhere y = (m-1)s2/σ02

    Accept H0 otherwise.

  3. Right-tail test: Suppose we are testing

    H0 : σ2 = σ02
    HA :
    σ2 > σ02

    At the level of significance α, our decision rule is


    Reject H0 if y > χ2 m-1,α where y = (m-1)s2/σ02

    Accept H0 otherwise.

Remark. The TI-83 does not have a test for σ2. So, one has to use the above decision rules for this section.


Problems on 9.4: Testing Hypotheses on Variance σ2

Exercise 9.4.1 Suppose that we have collected a sample of size n = 23 from a normal population with mean μ and variance σ2. The sample variance was found to be s2 = 46.7. At 5 percent level of significance, would you conclude that σ2 is bigger than 25?
Solution

Exercise 9.4.2 Following is data on the life expectancies of a group of people older than 75.

87 92 81 76 81
87 79 88 88 79
81 89 97 91 82

At one percent level of significance, would you conclude that the variance, σ2, of life expectancies is higher than 16?
Solution


Exercise 9.4.3 Following is data on a household's monthly gas consumption (in ccf) during the winter months.
154 222 264 257 127
228 240 393 278 140

At 5 percent level of significance, would you conclude that the variance σ2 of gas consumption is less than 6400 ccf2?
Solution


9.5 Population Proportionback to top

Let p be the population proportion that has a particular attribute A. We want to test Null hypothesis

H0 : p  =  p0.

As usual, we draw (or interview) a sample of size m. Let X be the number of sample members that has this attribute and X = X/m be the sample proportion. (So, X is the sample proportion of "success.") The test statistic we use 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, our decision rules are

  1. Two-tail test: Suppose we are testing

    H0 : p = p0
    HA : p ≠ p0


    At the level of significance α, our decision rule is


    Reject H0 if z ∉ ( -zα/2, zα/2 ) where z = (x-p0) /σX

    Accept H0 otherwise.


  2. Left-tail test: Suppose we are testing

    H0 : p = p0
    HA : p < p0

    At the level of significance α, our decision rule is

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

    Accept H0 otherwisep.


  3. Right-tail test: Suppose we are testing

    H0 : p = p0
    HA : p > p0


    At the level of significance α, our decision rule is


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

    Accept H0 otherwise.

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the 1-PropZTest, which comes under TESTS.
  2. The calculator will ask for p0, the number of success x, and the sample size n.
  3. The calculator will give us z-values and p-values; p-cap is, in fact, sample proportion of success x = x/n.
  4. We can use the z-values with the above decision rules to test hypotheses.
  5. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Problems on 9.5: Population Proportion

Exercise 9.5.1. In a sample of 197 apples from a lot, 19 were found to be sour.

  1. At one percent level of significance, would you conclude that more than 10 percent of the apples are sour?
  2. At five percent level of significance, would you conclude that more than 10 percent of the apples are sour?
  3. At ten percent level of significance, would you conclude that more than 10 percent of the apples are sour?

Solution

Exercise 9.5.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.

  1. At one percent level of significance, would you conclude that the vaccine is effective?
  2. At five percent level of significance, would you conclude that the vaccine is effective?
  3. At ten percent level of significance, would you conclude that the vaccine is effective?

Solution

Exercise 9.5.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, and 359 said that they would vote for Candidate B.

  1. At five percent level of significance, would you conclude that candidate A will receive more than 40 percent of the vote?
    Solution
  2. At ten percent level of significance, would you conclude that candidate A will receive more than 40 percent of the vote?
  3. At ten percent level of significance, would you conclude that candidate B will receive more than 40 percent of the vote?
    Solution

9.6 Testing of Hypotheses to Compare Two Populationsback to top

As we have computed confidence intervals to compare two populations, in this section we will do significance tests to compare two populations.

Let X be a random variable with mean μ1 and standard deviation σ1 and let Y be a random variable with mean μ2 and standard deviation σ2. (For example, X could be the height of an American male and Y could be the height of an American female.)

We may like to compare the equality (or inequality) of means μ1, μ2. So, our Null hypothesis is given by

H0 : μ1 = μ2

or equivalently

H0 : μ1- μ2 = 0.

So, as before we collect a sample X1,X2, …,Xm, of size m from the X-population and a sample Y1,Y2, …,Yn, of size n, from the Y-population. Let X and S12 be the sample mean and variance, respectively, of the X-sample. Let Y and S22 be the sample mean and variance, respectively, of the Y-sample.


First, assume that σ1, σ2 are known

If σ1, σ2 are known, then the test statistic that we use is

Z  = (X-Y)/σd

where

σd   =   ( σ12 /m + σ22 /n )

If the Null hypothesis H0 : μ1- μ2 = 0 is true, then Z has N(0,1) distribution. As before, our decision rules are formulated as follows.

  1. Two-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if z ∉ ( -zα/2, zα/2 ) where z = (x-y) /σd

    Accept H0 otherwise
    .

  2. Left-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if z < -zα where z = (x-y) /σd

    Accept H0 otherwise
    .

  3. Right-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if z > zα where z = (x-y) /σd

    Accept H0 otherwise
    .

Remark. If sample sizes m,n are large, we can use S1, S2 as an estimate for σ1, σ2 in the above expression for Z. So, the modified formula for Z would be :

Z  = (X-Y)/sd

where

Sd   =   ( S12 /m + S22 /n )

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the 2-SampZTest, which comes under TESTS.
  2. Use it when σ 1 and σ 2 are known.
  3. The calculator will give us z-values and p-values.
  4. We can use the z-values with the above decision rules to test hypotheses.
  5. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Problems on 9.6: Testing of Hypotheses to Compare Two Populations — σ1, σ2 Known

Exercise 9.6.1. Suppose we have two normal populations with means μ1, μ2 and standard deviation σ1, σ2, respectively. It is known that σ1 = 8.1 and σ2 = 11.3. A sample of size m = 64 was collected from the first population, and the sample mean was found to be x = 3.7. A sample of size n = 99 was collected from the second population, and the sample mean was found to be y = 4.1. At 5 percent level of significance, would you conclude that μ1μ2?
Solution

Exercise 9.6.2. Suppose the birth weight of babies in developed and developing countries are normally distributed with mean μ1, μ2 and standard deviation σ1, σ2, respectively. (My data is not real, as is often the case.) It is known the σ1 = 2.3 pounds and σ2 = 2.9 pounds. A sample of size m = 35 babies from the developed nations was collected, and the sample mean birth weight was found to be X = 8.9 pounds. A sample of size n = 48 babies from the developing nations was collected, and the sample mean birth weight was found to be y = 7.6 pounds.

  1. At 5 percent level of significance, would you conclude that the mean birth weight of babies in the developed nations is higher than that of the developing nations?
  2. At 1 percent level of significance, would you conclude that the mean birth weight of babies in developed nations is higher than that of developing nations?

Solution

Exercise 9.6.3. African elephants and Indian elephants are different in height, weight, and length of ear and tusk. It is natural to assume that all these are normally distributed. The mean and standard deviation height of African elephants are μ1, σ1= 1.5 feet, respectively. The mean and standard deviation of the height of Indian elephants are μ2, σ2= 1.3 feet, respectively. A sample of size 25 African elephants was collected, and the sample mean height was found to be x = 10.9 feet. A sample of size 28 Indian elephants was collected, and the sample mean height was found to be y = 9.1 feet.

  1. At 5 percent level of significance, would you conclude that the mean height of African elephants is higher than that of the Indian elephants?
  2. At 1 percent level of significance, would you conclude that the mean height of African elephants is higher than that of the Indian elephants?

Solution


9.7 Comparing Means of Two Populations: σ1, σ2 Unknownback to top

As we did with confidence intervals, we consider the case where σ1, σ2 are not known, but we assume that standard deviations are equal:

σ1 = σ2 = σ.

In this case, we have the estimator Sp for σ given by

Sp  =  ( [(m-1)SX2+(n-1)SY2 ]/ [m+n-2] )1/2

where SX and SY are the respective sample standard deviations of the corresponding samples. The test statistic that we use is

T  =  (X-Y) /[Sp ( 1/m+1/n) ]

If the Null hypothesis H0 : μ1- μ2 = 0 is true, then T has a t-distribution with degrees of freedom m+n-2. We formulate the test hypotheses and the decision rules as follows.

  1. Two-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if t ∉ ( -tm+n-2,α/2, tm+n-2,α/2 ) where t = (x-y) / [sp ( 1/m + 1/n )]

    Accept H0 otherwise
    .

  2. Left-tail test : Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if t < -tm+n-2,α where t = (x-y) / [sp √ ( 1/m + 1/n )]

    Accept H0 otherwise.

  3. Right-tail test: Suppose we are testing

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

    At the level of significance α, our decision rule is


    Reject H0 if t > tm+n-2,α where t = (x-y) / [sp ( 1/m + 1/n )]

    Accept H0 otherwise.

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the 2-SampTTest, which comes under TESTS.
  2. Use it when σ 1 = σ 2= σ are UNKNOWN and equals. Either s1 and s2 will be given or raw data will be given.
  3. Always use Pooled estimate of σ by selecting YES for "Pooled".
  4. The calculator will give t-values and p-values and also the pooled estimate SXP.
  5. We can use the t-values with the above decision rules to test hypotheses.
  6. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

Problems on 9.7: Comparing Means of Two Populations — σ1, σ1 Unknown:

Exercise 9.7.1. Suppose that we are comparing two similar normal populations with means μ1, μ2, respectively, equal standard deviation σ. We collected a sample of size m = 11 from the first population that produced a sample mean x = 13.2 and samples standard deviation s1 = 2.33. A sample of size n = 13 was collected from the second population that had sample mean y = 11.5 and sample variance s2 = 2.73.

At 5 percent level of significance, would you conclude that μ1μ2?
Solution

Exercise 9.7.2. Suppose we have two normal population with means μ1, μ2 and equal standard deviation σ. A sample of size m = 64 was collected from the first population and the sample mean and standard deviation were found to be x = 3.1, s1 = 9.2 . A sample of size n = 99 was collected from the second population and the sample mean and standard deviation were y = 4.4, s2 = 8.7. At 5 percent level of significance, would you conclude that μ1μ2.
Solution

Exercise 9.7.3. Suppose the birth weight of babies in developed and developing countries are normally distributed with mean μ1, μ2 and equal standard deviation σ. (My data is not real, as is often the case.) The following data about birth weight in developed and developing nations were collected.

8.8 8.1 6.3 9.7 6.3
7.1 5.3 7.7 9.1 8.1
8.2 7.9 8.3 8.9 9.0
10.1 9.9 8.8 7.8 5.2
7.2        
  
6.3 5.2 8.3 5.9 5.5
7.1 8.1 7.9 6.3 6.9
9.1 8.1 7.0 4.9 5.3
6.3 7.1 6.3 6.1 5.8
5.7 6.8 8.3 7.7  
  1. At 5 percent level of significance, would you conclude that the mean birth weight of babies in the developed countries is higher than that in developing countries?
  2. At 1 percent level of significance, would you conclude that the mean birth weight of babies in the developed countries is higher than that in developing countries?

Solution

Exercise 9.7.4. African elephants and Indian elephants are different in height, weight, and length of ear and tusk. It is natural to assume that all these are normally distributed. Assume that the height of Arican and Indian elephants have an equal standard deviation σ. The mean heights of the African elephants and Indian elephants are μ1, μ2, respectively. The following data were collected on the height of the elephants from the two continents (these are not real data):

10.9 11.7 9.3 9.9 11.5
8.8 12.9 11.7 9.1 11.1
9.1 8.7 10.5 11.3 12.3
13.1 12.9 9.5 10.7 11.3
  
7.1 8.3 8.2 9.1 10.3
9.3 9.7 8.9 8.8 9.1
7.9 9.9 9.2 8.8 8.1
8.7 8.8 9.3 10. 1 9.9
9.9        

  1. At 5 percent level of significance, would you conclude that the mean height of African elephants is higher than that of Indian elephants?
  2. At 1 percent level of significance, would you conclude that the mean height of African elephants is higher than that of Indian elephants?

Solution


9.7 Paired t-test

Once again, we are testing equality of means μ1, μ2 of two populations. So, our Null Hypothesis is

H0 : μ1- μ2  =  0.

We continue to denote the first population random variable by X and the second population random variable by Y. We also assume that X and Y have normal distribution, and that they are independent.

In certain situations, it is natural to collect samples in "pairs" (X,Y) from the two populations and consider the difference D = X-Y. So, D has mean

μD = μ1- μ2

and our Null hypothesis becomes

H0 : μD = 0.

Also D has

N(μD, σD )-distribution

where

σD = ( σ12 + σ22 ).

We will collect samples in pairs (X1,Y1), …,(Xn,Yn) and look at the corresponding D-sample:

D1 = X1-Y1, …, Dn = Xn-Yn.

Let

D  =  ( D1+…+Dn )/n
S2D  = 
[ (Di-D)2] / (n-1)

be the sample mean and variance, respectively, of the D-sample.

The test statistic that we will use is

T =  (Dn) /SD

If the Null hypothesis H0 : μD  =  μ1- μ2 = 0 is true, then T has a t-distribution with degrees of freedom n-1.

The following are decision rules for the Paired t-test.

  1. Two-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if t ∉ ( -tn-1,α/2, tn-1,α/2 ) where t = (Dn) /SD

    Accept H0 otherwise.

  2. Left-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if t < -tn-1,α where t = (Dn) /SD

    Accept H0 otherwise.

  3. Right-tail test: Suppose we are testing

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


    At the level of significance α, our decision rule is


    Reject H0 if t > tn-1,α where t = (Dn) /SD

    Accept H0 otherwise.

Example. Suppose we are comparing two models of cars to see how fast they accelerate. In this case, to avoid any variation due to individual drivers, we take n drivers and let each driver drive one of each model of car. So, (xi,yi) are the accelerations of the first and second model driven by driver 1. Thus, we will have n pairs of observations.

Remark. The same technique of paired t-test will give us that a (1-α)100 percent confidence interval for μD  =  μ1- μ2 is

d-tn-1,α/2sd < μ1- μ2 < d-tn-1,α/2sd


9.8 Comparing Proportions p1, p2 of Two Populationsback to top

Once again, we have two populations and let p1 be the proportion of Population 1 that has a certain attribute A and let p2 be the population proportion of Population 2 that has attribute A. We want to compare p1 and p2. We want to test the equality of these two proportions. So,our Null hypothesis is

H0 : p1-p2  =  0.

We take a sample of size m from Population 1 and let X be the number of the sample members that have this attribute A, and X = X/m be the sample mean. Similarly, we take a sample (or interview) of size n and let Y be the number of the sample members that have this attribute A and Y = Y/n be the sample mean. (So, X, Y are proportion of "success" of the two samples.)

Write

P=(X+Y)/(m+n)

If the null hypothesis

H0 : p1  =  p2

is true, then p is the natural estimate for p1 = p2.

The sample statistic we use here is

Z = (X-Y) /sD

where

sD = [P(1-P)(1/m + 1/n) ]

If H0 : p1-p2 = 0 is true, then Z has, approximately, N(0,1) distribution. Now our test hypotheses and the decision rules are as follows.

  1. Two-tail test: Suppose we are testing

    H0 : p1 - p2 = 0
    HA : p1 - p2 ≠ 0


    At the level of significance α, our decision rule is


    Reject H0 if z ∉ ( -zα/2, zα/2 ) where z = (X-Y)/sD

    Accept H0 otherwise.

  2. Left-tail test: Suppose we are testing

    HO : p1 - p2 = 0
    HA : p1 - p2 < 0


    At the level of significance α, our decision rule is as follows:


    Reject H0 if z < -zα where z = (X-Y)/sD

    Accept H0 otherwise.

  3. Right-tail test: Suppose we are testing

    H0 : p1 - p2 = 0
    HA : p1 - p2 > 0


    At the level of significance α, our decision rule is


    Reject H0 if z > zα where z =  (X-Y)/sD

    Accept H0 otherwise.

Use of Calculators and P-values:

  1. In the TI-83 menu the above test is called the 2PropZTest, which comes under TESTS.
  2. The calculator will give us z-values and p-values. Also, in our notations, p1-cap = X, p2-cap = Y, p-cap = P
  3. We can use the z-values with the above decision rules to test hypotheses.
  4. Alternately, at the level of significance α, if the P-value=p then

    Reject H0 if p <  α
    Accept H0 otherwise
    .

9.8: Problems on Comparing Proportions p1, p2 of Two Populations

Exercise 9.8.1. Suppose two independent samples were collected from two populations. We want to compare the proportions p1,p2 , respectively, of an attribute A present in these two populations. We are given that x = 55 had the attribute A in a sample of size m = 117 from the first population, and y = 37 had the attribute A is a sample of size n = 79 from the second sample.

At 1 percent level of significance, would you conclude that p1 > p2?
Solution

Exercise 9.8.2. To compare the proportions p1,p2 of defective items produced by new and old machines, respectively, samples were collected. In a sample of 57 items from the new machine, 6 were found to be defective; and in a sample of 41 items from the old machine, 9 were defective.

At 5 percent level of significance, would you conclude that p1 < p2?
Solution

Exercise 9.8.3. Data was collected to compare the proportions p1,p2 of men and women, respectively, who watch football. In a sample of 199 men, 83 said that they watch football; and in a sample of 161 women, 51 said they watch football. (These are not real data).

  1. At 5 percent level of significance, would you conclude that the proportion of men who watch football is higher than the proportion of women who watch football?
  2. At 1 percent level of significance, would you conclude that the proportion of men who watch football is higher than the proportion of women who watch football?

Solution

back to top