Math 105, Topics in Mathematics |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Lesson 9: Testing of Hypotheses
Introduction
For this lesson on testing hypotheses you need the help of an advanced calculator. We discuss the concepts and theory and then use a calculator to solve the problems. In this lesson we will test a hypothesis H0, to be called Null hypothesis, against another hypothesis HA, to be called the alternative hypothesis. Only one of these two hypotheses is true. Based on the collected sample and testing criterion that we set up, we will accept only one of them and reject the other one. 9.1 The Philosophy of Testing Hypotheses
Example 9.1.1. We may like 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 the men and μ2 be the mean annual income of the working women. Our Null hypothesis H0 and the alternative hypothesis HA may be written as
Example 9.1.2. A TV commentator mentioned that in the early 1990s the average life expectancy of a human being was 75, and now it has increased substantially. We would like to test the claim of this commentator. We let μ be the average life expectancy of a human being. We set up our Null and alternative hypotheses as follows: follows:
|
H0 : | µ | = 75 |
HA : | µ | ≠ 75 |
or
H0 : | µ | = 75 |
HA : | µ | > 75 |
or
H0 : | µ | = 75 |
HA : | µ | < 75 |
More generally, we would 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 will take a sample X1,X2, ... , Xm of size m from the X population and let X be the sample mean.
N(µ, σX)
distribution, where
σX
= σ/m1/2.
HA : | µ | ≠ µ0 |
| X - μ0| is large.
Z=(X-µ0) /σ X
has N(0,1) distribution, whereσX = σ/m1/2.
This expression Z above will be called a test statistic, and we will be accepting H0 if the observed (absolute) value |z| of |Z| is small and reject H0 if the observed value |z| of |Z| is large.
P(Z is not in ( -zα/2 , zα/2 )) = α.
Reject H0
if z is not in ( -zα/2, zα/2)
where z = (x-µ0)
/σ X
Accept H0 otherwise.
Some Hypotheses and Decision Rules. We assume that the value of σ is known.
H0 : | µ | = µ0 |
HA : | µ | ≠ µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0
if z is not in ( -zα/2 , zα/2
)where z = (x-µ0)
/σ X
Accept H0 otherwise.
H0 : | µ | = µ0 |
HA : | µ | < µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0
if z < -zαwhere
z = (x-µ0)
/σ X
Accept H0 otherwise.
H0 : | µ | = µ0 |
HA : | µ | > µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0
if z > zα
where z = (x-µ0)
/σ X
Accept H0 otherwise.
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 that we have given, the test statistic that we are talking about is
Z = (X-µ0) /σ X.
If Z = z is the observed value of Z, then we have:
p=P(Z is not in (-|z|,|z|)).
p=P(Z < z).
p=P(Z > z).
Reject H0 if p < α
Accept H0 otherwise.
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 that we have given, the test statistic that we are talking about is
Z = (X-µ0) /σ X.
If Z = z is the observed value of Z, then we have:
p=P(Z is not in (-|z|,|z|)).
p=P(Z < z).
p=P(Z > z).
Reject H0 if p < α
Accept H0 otherwise.
Use of Calculators: Z-Test (TI-83) | ||
---|---|---|
|
Use a calculator to solve the following problems. Flash-animated solutions may be helpful for conceptual reasons.
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?
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 of σ = 3.5 second. The coach believes that his mean has improved from last year's mean of 34 seconds. To test the belief the athlete ran 16 times, and the sample mean was found to be x = 31 seconds.
Exercise 9.2.5. It is believed that the mean μ starting salary for the fresh KU graduates has increased from last year's mean of $51 K annually. It is known that the standard deviation of the starting salary is σ = 13 K. To test what you believe, you collect a sample of 15 fresh graduates, and the sample mean salary was found to be x= 54 K. At 1 percent level of significance, would you reject or accept that the starting salaries of the fresh KU graduates have increased? Solution
Exercise 9.2.6. The mean weight μ of babies at birth in the United States is believed to be higher than the worldwide mean birth weight of 112 ounces. The standard deviation of the birth weight in the United States is known to be 17 ounces. Data on 96 babies in the United States was collected, and the mean weight was found to be 115 ounces. At 5 percent level of significance, would you conclude that mean United States birth weight is higher than 112 ounces? Solution
Exercise 9.2.7. It is believed, due to pollution, the mean weight μ of salmon in a river is reduced from last year's mean of 23 pounds. It is known from past experience that standard deviation of the weight is σ = 6 pounds. To test such concerns about pollution, 46 fish were caught and the mean weight of the fish was x= 21.1 pounds. At 5 percent level of significance, would you accept or reject that the mean weight of salmon has been reduced?
Exercise 9.2.8. A supplier of light bulbs claims that the mean lifetime of his light bulbs is higher than that of the light bulbs available in the market. It is known that the mean lifetime of the light bulbs in the market is 3456 hours. To test the claim of the supplier you test a sample of 26 light bulbs, and the sample mean was found to be 3720 hours. It is known that the standard deviation of the lifetime of the light bulbs is σ = 1152 hours.
In this section we assume that X is a N(μ,σ) random variable. In the last section, we assumed that σ was known. In this section we assume that σ is not known. We will be doing all the three tests as in the above section, assuming 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) /(S/m1/2).
If H0: μ = μ 0 is true, then T has t-distribution with degrees of freedom m-1. Going through the same kind of arguments, we formulate the following decision rules.
H0 : | µ | = µ0 |
HA : | µ | ≠ µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0 if t is
not in ( -tm-1, α/2 , tm-1, α/2
) where t = (x-µ0)
/(s/m1/2)
Accept H0 otherwise.
H0 : | µ | = µ0 |
HA : | µ | < µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0
if t < -tm-1, α
where t = (x-µ0)
/(s/m1/2)
Accept H0 otherwise.
H0 : | µ | = µ0 |
HA : | µ | > µ0 |
At the level of significance α, our decision rule is as follows:
Reject H0 if t
> tm-1, α where t = (x-µ0)
/(s/m1/2)
Accept H0 otherwise.
Use of Calculators: T-Test (TI-83) | ||||
---|---|---|---|---|
|
Problems on 9.3 : σ Unknown
Use the calculator to solve the following problems. Flash-animated solutions may be helpful for conceptual reasons.
Exercise 9.3.1. It is assumed that the lifetime (in hours) of light bulbs produced in factory is normally distributed with mean μ and standard deviation σ. The mean lifetime for an average light bulb in 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 light bulbs is more than average light bulbs in the market.
Exercise 9.3.2. To estimate the mean time taken by a group of athletes the following sample was collected:
24.7 | 23.8 | 28.2 | 25.3 | 21.8 |
35.3 | 33.1 | 31.3 | 22.5 | 22.3 |
21.8 | 31.5 | 34.5 | 24.2 | 21.3 |
22.6 | 29.5 | 23.1 | 33.3 |
Last year the mean of the same group was 25 seconds. You want to test if the mean time has changed significantly this year.
Exercise 9.3.3. It is believed that the mean length μ of babies at birth in the United States is higher than that of worldwide mean length of 18.7 inches. A sample of 26 U.S. babies was collected, and the sample mean and standard deviation were found to be x = 19 inches and s = 1 inch.
Exercise 9.3.4. A car manufacturer claims that the new model of the car will give more mileage per gallon than the old model. The old model gives 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.
Exercise 9.3.5. Satya claims that the mean time taken to complete an online homework assignment is less than that of traditional homework. You know from your experience that the mean time taken to complete a traditional assignment is 45 minutes. Now you collected a sample of 23 homework times and found that the sample mean time taken to complete this homework is x = 44 minutes and standard deviation s = 4 minutes. Pick the correct answer regarding acceptance or rejection of the claim of Satya.
Now let p be the population proportion that has a particular attribute A. We would like 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)]1/2.
If H0 : p = p0 is true, then approximately Z has N(0,1) distribution. As before, we formulate our decision rules as follows.
H0 : | p | = p0 |
HA : | p | ≠ p0 |
At the level of significance α, our decision rule is as follows:
Reject H0 if z is
not in ( -zα/2 , zα/2 ) where z = (x-p0)
/σ X
Accept H0 otherwise.
H0 : | p | = p0 |
HA : | p | < p0 |
At the level of significance α, our decision rule is as follows:
Reject H0 if z
< -zα where z = (x-p0)
/σ X
Accept H0 otherwise.
H0 : | p | = p0 |
HA : | p | > p0 |
At the level of significance α, our decision rule is as follows:
Reject H0
if z > zα where z = (x-p0)
/σ X
Accept H0 otherwise.
Use of Calculators: 1-PropZTest (TI-83) | ||
---|---|---|
|
Problems on 9.4: Population Proportion p
Use the calculator to solve the following problems. Flash-animated solutions may be helpful for conceptual reasons.
Exercise 9.4.1. In a sample of 197 apples from a lot, 19 were found to be sour.
Exercise 9.4.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 50 percent of the population gets the virus.
Exercise 9.4.3. For the coming congressional election, a poll was conducted. Out of 887 randomly selected voters interviewed, 389 said that they would vote for Candidate A, 359 said that they would vote for Candidate B.