TEST OF HYPOTHESIS - FCAMPENAfrancisjosephcampena.weebly.com/uploads/1/7/8/6/17869691/...In a...
Transcript of TEST OF HYPOTHESIS - FCAMPENAfrancisjosephcampena.weebly.com/uploads/1/7/8/6/17869691/...In a...
Chapter 7
TEST OF HYPOTHESIS
In a certain perspective, we can view hypothesis testing just like a jury in a court trial. In
a jury trial, the null hypothesis is similar to the jury making a decision of not- guilty, and the
alternative is the guilty verdict. Here we assume that in a jury trial that the defendant isn't guilty
unless the prosecution can show beyond a reasonable doubt that defendant is guilty. If it has been
established that there is evidence beyond a reasonable doubt and the jury believes that there is
enough evidence to refute the null hypothesis, the jury gives a verdict in favor of the alternative
hypothesis, which is a guilty verdict.
In general, when performing hypothesis testing, we set up the null (Ho) and alternative
(Ha) hypothesis in such a way that we believe that Ho is true unless there is sufficient evidence
(information from a sample; statistics) to show otherwise.
7.1 Statistical Hypothesis
A statistical hypothesis is an assertion or conjecture concerning one or more
populations.
Types of statistical hypothesis:
1. Null hypothesis – the hypothesis that we wish to focus our attention on. Generally
this is a statement that a population parameter has a specified value.
The hypothesis that is tested and the one which the researcher wishes to reject or
not to reject.
Specifies an exact value of the population parameter.
Denoted by Ho.
2. Alternative hypothesis -
The hypothesis that is accepted if the null hypothesis is rejected.
Allows for the possibility of several values.
Denoted by Ha or H1.
May be directional (quantifier is < or >) or non-directional (quantifier is ).
Example
State the null and alternative hypothesis in the following statements:
1. The percentage of junior high school students who pass math subjects during summer is
65%.
65 :H 65 :H ao
2. At least 5 typhoons on the average hit the country every year.
5 :H 5 :H ao
3. Forty-eight percent of high school graduates are computer illiterate.
48% :H 48% :H ao
4. At most 6 out of 10 married women in the rural areas are house wives.
60% :H 60% :H ao
Exercise 7.1(a)
State the null and alternative hypothesis.
1. At most 65% of public school children are malnourished.
2. On the average at least 2/3 of high school students who pass their math subjects pass
their physics subjects.
3. Less than half of the newly nursing board passers immediately get their visa in a year.
4. A man should have at least 8 hours of sleep everyday.
5. 55% of elected public officials came from the same university.
A test of hypothesis is the method to determine whether the statistical hypothesis is true
or not. In performing statistical test of hypothesis we consider the following situations:
The probability of committing a TYPE I error is also called the level of significance and
is denoted by a small Greek symbol “alpha” . Some of the common values used for the level of
significance are 0.1, 0.05, and 0.01. For example, if = 0.1 for a certain test, and the null
hypothesis is rejected, then it means that we are 90% certain that this is the correct decision.
Null hypothesis
TRUE FALSE
Reject TYPE I Error Correct Decision
Do not Reject Correct Decision TYPE II Error
Important things to know before conducting a test of hypothesis:
1. Level of significance, .
The level of significance, , is the probability of committing an error of rejecting the
null hypothesis when, in fact, it is true.
2. One-tailed tests vs. Two-tailed tests
One-tailed test of hypothesis
A one tailed test is performed when the alternative hypothesis is concerned with
values specifically below or above an exact value of the null hypothesis.
The alternative hypothesis is directional.
Two-tailed test of hypothesis
A two-tailed test is performed when the alternative hypothesis is concerned with
values that are not equal to an exact value of the null hypothesis.
The alternative hypothesis is non-directional.
3. Test Statistic
The value generated from sample data.
Test value to be compared with the critical values.
4. Critical Region (Region of rejection/region of acceptance)
Depends on the type of test to be performed.
If test is one tailed, then the critical region is concentrated on either the left tail
(for <) or the right tail of the distribution (for >).
If test is two tailed, then the critical region is distributed on each tail of the
distribution.
Critical values are obtained depending on the type of test to be performed
If the test is one tailed, the significance level will be the area either on the left
tail or on the right tail of the distribution.
If the test is two tailed, the area in each tail of the distribution will be /2.
Steps in hypothesis testing
1. Set up the null and alternative hypothesis.
2. Specify the level of significance.
3. Determine the critical region and the corresponding critical values.
4. Compute the value of the test statistic.
5. Make a decision.
Reject H0 in favor of H1 if test statistic falls in the critical region.
Do not reject H0 if it falls in the acceptance region.
6. Draw appropriate conclusions.
7.2.Testing a single population mean,
Suppose a random sample of size n is taken from a normal population with mean
and standard deviation . To test the claim that the population mean is equal to a
certain value 0, we perform the test of hypothesis for the population mean, .
Null and alternative hypothesis
H0 : = 0
H1: < 0 , > 0, or 0.
CASE 1: 2 is known or
2 unknown but n 30.
Test statistic: The test statistic depends on the case where the problem falls under.
n
xz
0
Remark
Although most textbooks in statistics use the term “accept” and “reject”
when interpreting results of statistical test of hypothesis, it is very important to
understand that the rejection of a hypothesis is to conclude that it is false. While the
acceptance of a hypothesis merely implies that there is no significant evidence to say
that it is false.
Critical region/ value/s:
For a one tailed test: Reject H0 if
z < - z for a left-tailed test
z > z for a right-tailed test
For a two tailed test: Reject H0 if
z < -z/2 or z > z/2 for a two tailed test
Example
1. A random sample of 100 recorded deaths in Mindanao during the past year showed an
average life span of 71.8 years. The sample also showed a 8.9 years of standard
deviation. Does this data indicate that the average life span of people living in Mindanao
is greater than 70 years? Use a 0.05 level of significance.
Note
z denotes the z value with an area of “ ” to the right.
z
Solution:
Step 1. 700 :H and 701 :H
Note that the alternative hypothesis is directional, we are performing a one tailed
test; specifically a right tailed test.
Step 2. 050. (Level of significance)
Step 3. Critical Region
6451050 .zzzz .
Step 4. Test Statistic
Since the population standard deviation is unknown but the sample size is large
enough, that is, 30n , we can substitute the sample standard deviation for “ ”, thus we
have
02210098
708710 ./.
.
ns
xz
Step 5.
Critical
Region
Since the value of the test statistic falls under the critical region, we reject the null
hypothesis in favor of the alternative hypothesis.
Step 6.
Since the null hypothesis is rejected, we say that there is sufficient evidence to say
that the average life span of people living in Mindanao is greater than 70 years.
2. A salon owner believes that the average number of their regular customers gets a
haircut and pedicure is 25. A random sample of 25 regular customers showed that 20 of
them did a haircut and pedicure. With =5% is the belief of the salon owner true?
Solution
Step 1. 250 :H and 251 :H
Note that the alternative hypothesis is bi-directional, we are performing a two
tailed test.
Step 2. 050. (Level of significance)
Step 3. Critical Region
96102502 .zzzz ./
Critical
Region
1.96
Step 4. Test Statistic
Since the population standard deviation is unknown but the sample size is large
enough, that is, 30n , we can substitute the sample standard deviation for “ ”, thus we
have
022100
25200 .
ns
xz
Step 5.
Since the value of the test statistic falls under the critical region, we reject the null
hypothesis in favor of the alternative hypothesis.
Step 6.
Since the null hypothesis is rejected, we say that there is sufficient evidence to say
that the average life span of people living in Mindanao is greater than 70 years.
CASE 2: 2 unknown and n < 30
Test statistic
n
s
xt 0
Critical Values/Regions
For a one tailed test: Reject H0 if
t < - t with df = n -1 for a left-tailed test
t > t with df = n -1 for a right-tailed test
For a two tailed test: Reject H0 if
t < -t/2 or t > t/2 with df - n -1 for a two tailed test
Example
1. It is believed that on the average more than 70% of female mall goers regularly shop
for shoes. A random sample of 20 female mall goers showed a mean of 80% regularly go
to malls to shop shoes with 10% sample variance. With 95% confidence, test whether
70% of female mall goers regularly shop for shoes.
2. In the past a study has been made on call center agents on their sleeping habits. The
result showed that the average number of hours they took for sleeping is at most 8 hours.
A random sample of 25 call center agents where asked and showed that the average
number of hours they took for sleeping is 6.5 with a sample variance of 2 hours. Test
whether past the study still true. Use α=0.01.
Exercise 7.1(b)
1. Ritz grocery store declared that their average daily income is P 15, 000 with a
standard deviation of P 2, 000. A random sample of 20 grocery stores of the same kind
had been asked of their daily income and said to have P19, 000 on the average. If we
assume that the daily income is normally distributed can we conclude that Ritz grocery
store daily income declaration is right with 95% confidence?
2. Last 2000, Central Luzon farmers demanded more supply on the fertilizers the
government is providing them. They said that the supply should be 20 kilos on the
average for 10 hectares of land. In 2007, a random sample of 35 farmers was asked the
number kilos of fertilizers a 10-hectare land would need. The result showed 24 kilos on
the average with 3 kilos standard deviation. With 90% confidence is it true that the
average kilos of fertilizers needed for a 10 hectare land have changed since their last
demand? Assume normal distribution.
3. The daily average number of major defects detected per module by the Quality
Assurance team that is considered normal is less than or equal to 6. To access the
Software Development team’s quality of developed modules a random sample of 35
modules was tested and found out that the mean number of major defects per module is 8
with a standard deviation of 2 major defects. Based on the result with α=5% is the daily
average number of major defects not normal?
4. The mayor of Las Piñas City wanted to hire a batch of teachers for his newly
constructed elementary school. Based from previous studies by his education committee,
the average age of elementary school teachers in Las Piñas is 40 years old with a standard
deviation of 5. A sample of 36 newly hired elementary teachers was taken and the
following information is obtained: average age is 35. Does this indicate that the average
age of elementary school teachers decreased? Use a 0.05 level of significance and assume
normality.
5. A random sample of 8 cigarettes of a Marlboro has an average nicotine content of 4.2
milligrams and a standard deviation of 1.4 milligrams. Is this I line with the
manufacturer's claim that the average nicotine content does not exceed 3.5 milligrams?
Use a 0.01 level of significance and assume the distribution of nicotine contents to be
normal.
6. A new process for producing synthetic diamonds can be operated at a profitable level
only if the average weight of the diamonds is greater than 0.5 karat. To evaluate the
profitability of the process, six diamonds are generated, with recorded weights: 0.46,
0.61, 0.52, 0.48, 0.57, and 0.54 karat.
a. Is there evidence to suggest that the variance of these measurements is greater
than 0.02 karat?
b. Do the six measurements present sufficient evidence that the process will be
profitable? Test at the 0.01 level.
7.2 Testing a value of a single population proportion, p
Suppose there are x successes in a random sample of size n drawn from a normal
population. We wish to test whether the proportion of successes in a certain population is
equal to some specified value.
Null and alternative hypothesis
H0 : p = p0
H1 : p > p0; p < p0; or p p0
Critical values/ critical region
For a one-tailed test: Reject H0 if z < -z for a left tailed test
z > z for a right tailed test
For a two-tailed test: Reject H0 if z < -z/2 or z > z/2
Test statistic
n
qp
ppz
00
0ˆ where
n
xp ˆ
Example
1. A chocolate manufacturer targets an 8 out of 10 public approval of their new chocolate
recipe to release in the market. A random sample of 70 people where given a taste test
and resulted a 75% approval of the product. Will the company release the product in the
market with 0.05 level of significance?
Exercise 7.2
1. A new papaya soap, claims that 80% of women who used it observed skin whitening
within two weeks of use. A known competitor of the said product surveyed if the claim is
true. The survey result said that 6 out of 10 women observed whitening on their skin in
two weeks of use. With α= 5% is the claim of the newly produced papaya soap true?
2. An environmental non-government organization (NGO) declared that 7 out of 10
endangered birds in the country dies by hunting. The alarming report pushed the
government environmental department to conduct their survey if such report is true to be
able to put an immediate action to it. The result showed that 67% of the endangered bird
species dies in hunting. With 90% confidence can the government environmental
department conclude that the NGO’s report is true?
3. The student government is preparing for this year school’s foundation day. They are
having a hard time where to conduct the talent’s night to make sure there are enough
seats for attendees. In the past, 70% of the total number of students attends talent’s night.
They conducted a survey on 120 students and found out that 80 will be attending. Test
whether the number of attendees this year will be the like the past with 95% confidence.
7.3 Testing the value of a population variance, 2
Suppose we wish to test whether the population variance is equal to a specified value 20 .
Null and alternative hypothesis
H0 : 2 = 2
0
H1 : 2 < 2
0 ; 2 > 2
0 ; or 2 2
0
Critical values/region
For a one-tailed test: Reject H0 if
21
2 for a left tailed test with df = n -1
22 for a right tailed test with df = n -1.
For a two-tailed test: Reject H0 if :
2
1
2
2
or 22
2
with df = n -1.
Test statistic:
20
2)1(2
sn
Example
1. A known candy manufacturer claims that their high-speed machines minimize the
defected candies produced. They claim that their daily production only contains a
variance of 100 defected candies. A random sample of 15 days candy production
resulted a sample variance of 165 defected candies. Using =5% is the claim true?
2. The agency that monitors earthquakes said intensity of earthquakes in the Philippines
has a variance of 2. A study was conducted on 30 earthquakes that hit the country
since 1980. A standard deviation of 1.2 resulted. With =1% is the agency correct?
Exercise 7.3
1. A bottling company wants to access the state of their machines in terms of defects or over
spilling on their daily production of bottled juices. If the over spilling does not exceed a
variance of 20 bottled juices daily, the machines are said to be in good condition. A
random sample of 60 juices resulted standard deviation of 25 bottles. Using α= 5% are
the machines still in good condition?
2. A publishing company considers a book to be error free and ready to be out in the market
if the variance error is less than 5 per page. A random sample of 30 pages was gathered
on a book and found a variance of 7 errors. Using α= 10% is the book ready to be out in
the market?
3. Ten encoders from Clark Data Center Inc. have applied for a higher position in the typing pool of
company and took a typing test. The following are the duration of each encoders for the test: 75,
70, 59, 60, 63, 55, 52, 70, 45, and 85 seconds. Construct a 90% confidence interval for the true
variance of the times required by encoders to complete the test paragraph.
4. In an experiment with rats, a behavioral scientist used an auditory signal hat food is
available through an open door in the cage. The scientist counted the number of trials
needed by each rat to learn to recognize the signal. Assuming that the population of
number of trials is approximately normal, calculate a 95% confidence interval for the
population variance with the given data below:
18 19 15 14 18 12 14 21 14 11
Does this interval support the claim that the variability of this data set is about 2?
Chapter Summary
Summary of the Test Statistics and Critical Regions for Hypothesis Testing
0H Value of Test Statistic 1H Critical Region
0
n
xz
0 , known or 30n
0
0
0
zz
zz
2
zz and 2
zz
0 ns
xt 0 , =n-1,
unknown and 30n
0
0
0
tt
tt
2
tt and 2
tt
0pp n
qp
ppz
00
0ˆ where
n
xp ˆ
0pp
0pp
0pp
zz
zz
2
zz and 2
zz
2 = 2
0
20
2)1(2
sn
2 < 2
0
2 > 2
0
2 2
0
21
2
22
2
1
2
2
and 22
2
Mostly, values for the level of significance, such as 0.05, 0.01, and 0.1 are used due
to the manner in which we get the critical values back when computers have not been
developed to perform such calculations. But now, in the event of technological
advancements, computations for critical values of certain distributions are easy. However,
textbooks in statistics carry with it the habit of using values in statistical tables, mainly
because of ease of reference and simplicity in discussions.
Fact File
REMARK:
The following article in the book “Probability and Statistics: The Science of Uncertainty”
by John Tabak, Ph.D. provides a clear example of how statistics can be misused and mis
interpreted.
Chapter Review
Choose the letter of the correct answer.
(For numbers 1-4)The average monthly income of a gasoline boy is said to be P6,500. A
random sample was conducted to 35 gasoline boys and found out that the mean monthly income
is P 6,000 with P 300 standard deviation. With α=10% can we conclude that the average monthly
income of a gasoline boy is P6,500?
1. What is the correct alternative hypothesis?
a. The average monthly income of a gasoline boy is P6,500.
b. The average monthly income of a gasoline boy is less than P6,500.
c. The average monthly income of a gasoline boy is not P6,500.
d. The average monthly income of a gasoline boy is at least P6,500.
2. Base on the alternative what type of test is it?
a. one-tailed
b. two-tailed
c. both a and b
d. none
3. What is the value for Z ?
a. 11.23
b. 9.86
c. 21.05
d. 12.57
4. What is the decision?
a. Reject Ho.
b. Reject H1.
c. Both a and b
d. None
(For items 5-8)A certain music club believes that 78% of musicians plays guitar. In
random sample of 25 musicians 22 of them play guitar. With 95% confidence is the belief of
the music club right?
5. What is the value of po ?
a. 0.78
b. 0.88
c. 0.22
d. 0.12
6. What is the value of qo ?
a. 0.78
b. 0.88
c. 0.22
d. 0.12
7. What is the value of Zα/2?
a. 1.64
b. 1.645
c. 1.96
d. 1.7
8. What is the decision?
a. Reject Ho.
b. Reject H1.
c. Both a and b
d. None
9. If σ2 = 2.35, s
2 = 3.56 and n=33 what is the value of χ
2?
a. 48.91
b. 48.48
c. 21.123
d. 22.23
10. If n= 20 and α = 10% what is the tabular value of χ2 if we are dealing with a two-tailed
test?
a. 28.412
b. 30.144
c. 31.410
d. 38.582
11. Commuter students at the University of the Philippines claim that the average distance they
have to commute to campus is 26 kilometers per day. A random sample of 16 commuter students
was surveyed and resulted to the following data: The average distance of 31 km and a variance
of 64. The value of the test statistic for this is
a. z = -2.5.
b. z = 0.0394.
c. t = 2.5.
d. t = 1.25.
12. For a small-sample left-tailed test for the population mean, given the sample size was 18 and
010. . The critical (table) value for this test is
a. -2.878.
b. -2.552.
c. 2.878.
d. -2.567.
13. Rejection of the null hypothesis when it is true is called
a. type I error
b. type II error
c. no error
d. statistical error
14. The type of test is determined by
a. Ho
b. Ha
c.
d.
15. This denotes the probability of committing a TYPE I error.
a. Ho
b. Ha
c.
d.
16. Under the Philippine judicial system, an accused person is presumed innocent until proven
guilty. Suppose we wish to test the hypothesis that the accused is innocent (H0) against the
alternative that he is guilty (H1). A type I error is committed, if any, if the court
a. convicts the accused when, in fact, he is innocent?
b. convicts the accused when, in fact, he is guilty?
c. acquits the accused when, in fact, he is innocent?
d. acquits the accused when, in fact, he is guilty?
17. Which statement is/are correct?
I. A null hypothesis is a claim (or statement) about a population parameter that is
assumed to be true until it declared false.
II. An alternative hypothesis is a claim about a population parameter that will be true if
the null hypothesis is false.
a. I b. II c. Both I and II d. Neither I and II
For numbers 18-20: According to a company’s records, the average length of all long-distance
calls places through this company in a year is 12.55 minutes. The company’s management wants
to check if the mean length of the current long-distance calls is different from 12.55 minutes. A
random sample of 50 such calls placed through this company produced a mean length of 13.55
minutes with a standard deviation of 2.65 minutes. Use a 0.05 level of significance.
18. What is the computed test value?
a. z = 2.67 b. t = 2.67 c. z = -2.67 d. t = -2.67
19. What is the corresponding critical value?
a. 1.645 b. 2.575 c. 2.633 d. 1.96
20. What is the type of test to be used?
a. right tailed test b. left tailed test
c. two tailed test d. cannot be determined