Nothing Special   »   [go: up one dir, main page]

Day 9 - Module Hypothesis Testing

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 14

Hypothesis Testing

Lesson Objectives: At the end of the module, each student should be able to

1) define statistical hypothesis


2) identify 2 types of statistical errors
3) enumerate the steps in hypothesis testing
4) perform complete tests of hypotheses about population mean

--------------------------------------------------------------------------------------------------------------------

HYPOTHESIS TESTS

The previous chapter covered the first topic on inferential statistics, i.e., we made prediction
about future values of a variable given another variable. This chapter introduces us to another
area of inferential statistics which is hypothesis-testing. We may define a hypothesis as a
statement about one or more population. In a test of hypothesis, we test a certain given
theory or belief about a population parameter. We may want to find out, using some sample
information, whether or not a given claim (or statement) about a population parameter (e.g.,
the mean µ) is true.

Hypothesis-testing is the name of the statistical tool that compares the collected data against
the assumption to determine if the data are consistent or inconsistent with the assumption, the
assumption is either discarded or the hypothesis is reformulated. As you might imagine,
hypothesis-testing can be iterative process.

Any researcher who is about to test a hypothesis faces some fundamental problems that must
be solved before the project can be started. Whom shall I study? What shall I observe? When
will observations be made? How will the data be collected? The research design is the
blueprint that enables the investigator to come up with solutions to these problems and guides
him in the various stages of the research.

Anyone who does research in science, engineering, social science, education, or medicine
needs strong training in hypothesis-testing. Sound management decisions cannot be made
without understanding the basic idea of hypothesis tests.

TWO HYPOTHESES

Null Hypothesis

is a claim (or statement) about a population that is assumed to be true until it is declared false.
The null hypothesis is denoted by Ho. The term null hypothesis reflects the concept that this is
a hypothesis of no difference. For this reasons, the null hypothesis is a statement of
equality. When presented symbolically, it contains an equal sign.

Page 1 of 7
Examples:

a. H o : The defendant is innocent.


b. H o :µ = µ˳
c. Ho : p > p˳
d. H o: σ < 14
2

Alternative hypothesis

It is a claim about a population that will be true if the null hypothesis is false. The alternative
hypothesis is denoted by H 1.

Examples

a. H 1: The defendant is not innocent.


b. H 1: µ ≠ µo
c. H 1: p < po
d. H 1: σ 2 > 14

TWO TYPES OF ERRORS

(1) Type 1 Error

It occurs when a null hypothesis is rejected when in fact it is true. The value of a represents the
probability of committing this type of error, that is,

a = Pr ( H o is rejected | Ho is true)

The probability of committing a type I error is called the level significance of the level of
inconsistency. Most commonly used a – values are 0.10, 0.05, 0.025, 0.01, and 0.005.

(2) Type II Error

It occurs when a null hypothesis is not rejected (or it is accepted) when in fact it is false. The
value of β represents the probability of committing Type II error, that is,

β = Pr (Ho is not rejected | Ho is false)

The two types errors that occur in tests of hypotheses depend on each other. We cannot lower
the values of a and β simutaneously. Lowering the value of a will raise the value of β, and

Page 2 of 7
lowering the value of β will raise the value of a. However, we can decrease both a and β
simultaneously by increasing the sample size.

True Situation
Decision H o is True H o is False
Reject H o Type 1 error Correct Decision
Accept H o Correct Decision Type II error

Consequences of Type I and Type II Errors

The consequences of these two errors are quite different, and the costs are borne by different
parties. Depending on the situation, decision makers may fear one error more than the other.
Consider the following example.

Case: Criminal Trial


H o: Defendant is innocent
H 1: Defendant is guilty

Type I error is convicting an innocent defendant, so the costs are borne by the defendant.
Type II error is failing to convict a guilty defendant, so the costs are borne by society if the
guilty person returns to the secrets.

STEPS IN HYPOTHESIS TESTING

Step 1: State the assumptions to be tested, i.e., state the null hypothesis ( H o) and
alternative hypothesis ( H 1) and identify the claim.

Step 2: Select the distribution to use. Specify the level of significance (a) that will lead
to the rejection of the null hypothesis.

Step 3: Determine the rejection (also called the critical) region and the non-rejection
(also called the acceptance) region based on the distribution chosen.

Step 4: Calculate the value of the test statistic.

Step 5: Make a decision. (Are you going to reject or accept the null hypothesis?)

The Decision Rule: Reject H o if the computed value of the test statistics falls
within the rejection or critical region; otherwise, accept it.

Page 3 of 7
TAILS OF A STATISTICAL TEST

1. Two-tailed test A test with two rejection regions. t is non-directional test.

Reject H o Reject H o

Accept H o

a /2 a/2
-Critical value µo + Critical value

2. Left-tailed test A test with the rejection region on the left tail of the distribution. It is
a directional test.

Accept H o

Reject H o

a
-Critical value µo

3. Right-tailed test A test with the rejection on the right tail of the distribution. It is also a
directional test.

Reject H o

Accept H o

a
µo + Critical value

Decision Rule

Page 4 of 7
When performing a statistical hypothesis test, we compare a sample statistic to the
hypothesized value of the population parameter stated in the null hypothesis.

Test Type Decision Rule

Left-tailed Reject H o if the test statistic < left-tail critical value


Two-tailed Reject H o if the test statistic < left-tail critical value
Or if the test statistic > right-tail critical value
Right-tailed Reject H o if the test statistic > right-tail critical
value

Page 5 of 7
ACTIVITY 9 Name: ________________________

A. Write the null hypothesis and the alternative hypothesis to be used in testing each of the
following claims. Indicate whether it is a left-tailed, right-tailed or a two-tailed test.
1. The average age of incoming plebes is 18.4 years old.
H0: _______________
H1: _______________ Type of test: ___________________
2. The proportion of yearlings taking coffee inside the classroom is not more than 12.5%.
H0: _______________
H1: _______________ Type of test ____________________
3. At least 75% of PMA personnel take the shuttle bus in coming to the office.
H0: _______________
H1: _______________ Type of test ____________________
4. The average running time of the cadets from the parade ground to the checkpoint and
back is 21 minutes. The PE instructors believe that it is higher.
H0: _______________
H1: _______________ Type of test _____________________
5. The mean grade of Sec A is lower than that of Sec B in the last UE in HBO.
H0: _______________
H1: _______________ Type of test _____________________
6. A physician claims that the mean cost for an MRI is less than Php44,000.
H0 _______________
H1 ________________ Type of test ____________________
7. A consumer advocate claims that the mean price of a cellular phone is not Php12,500.
H0 _______________
H1 _______________ Type of test ____________________
8. The population mean IQ is 100. A psychologist wants to test the hypothesis that the
mean IQ for alcoholics is different from 100.
H0 _______________
H1 _______________ Type of test _____________________

B. Biometric Security
If your ATM could recognize your physical characteristics (e.g. fingerprint, face, palm, iris)
you wouldn’t need an ATM card or a PIN. A biometric ID system could also reduce the risk
of ID theft- eliminate computer passwords and speed up security screening. Yet, up to now,
you are still using your ATM card for your banking transactions (primarily, withdrawals). The
hypotheses are
H0: User is authorized
H1: User is not authorized.
Identify the
a) Type 1 error. ________________________________________________________
b) Type 2 error ________________________________________________________
c) Which of the two errors is more to be feared and why? ______________________
___________________________________________________________________

Page 6 of 7
C. You are an inspector for the Bureau of Fish and Aquatic Resources or BFAR and you are
given the task of determining whether to prohibit fishing along parts of the Lingayen Gulf. You
will close an area to fishing if it is determined that fish in that region have an unacceptably high
mercury content. Assuming that a mean mercury concentration of 5 ppm is considered the
maximum safe concentration, determine
a) H0 ___________________ H1 _____________________
b) in the context of this problem, identify the
Type 1 error ____________________________________________________
Consequence of this error? _________________________________________
Type 2 error _____________________________________________________
Consequence of this error?__________________________________________

C . Define a Type 1 and a Type II error for this scenario and discuss the possible
consequence of each:
Cdt Rally, a 1CL cadet is trying to finish a lengthy research and print it for his evening
submission. His printer is very low on ink , and he just has time to go to Cadets store for a
new cartridge. But it’s raining hard and he needs every minute to finish the report. The
hypotheses are:
H0: Cartridge has enough ink.
H1: Cartridge has not enough ink.

a) Type I error:

Consequence:

b) Type II error:

Consequence:

Page 7 of 7
--------------------------------------------------------------------------------------------------------------------

TEST OF HYPOTHESES: MEAN

A statistical hypothesis is a statement about the value of population parameter we are


interested in. For example, the population parameter could be a population mean µ or a
population proportionρ. The hypothesized value of the population parameter is the center of
interest. The parameter we shall test in this chapter is typically a population mean. Stating the
null hypothesis requires a benchmark value for µ. This value does not come from a sample but
is based on past performance or maybe an industry standard (i.e., it comes from the
population in question).

The application will dictate which type of test we should construct. When testing a mean µ, we
choose between three tests:

Left-tailed test Two-tailed test Right-tailed test


H o: µ > µo or H o: µ = µo H o: µ < µo or
µ = µo
H 1: µ < µo H 1: µ ≠ µo H o: µ > µo

A one-tailed test is a directional test while a two-tailed is non-directional.

8.1 TESTING A MEAN: LARGE SAMPLES

The sample statistic used _ to estimate the mean µ is the sample mean x̅ . The sampling
distribution of x is approximately normal for large sample size (n > 30). Consequently whether
or not the population standard deviation σ is known, the normal distribution is used to test
hypotheses about the population mean when a sample size is large/

Test Statistic
In tests of hypotheses about the mean µ for large sample size, the random variable

z = x̅ - µ or z = x̅ - µ
σ / √n s/√n

is called the test statistic. The test statistic can be defined as a rule or criterion used to make
the decision whether or not to reject the null hypothesis.

Large sample size: n > 30


Small sample size: n < 30

Example 1.

The Metro Baguio Fire Department aims to respond to fire calls 4 minutes or less, on the
average. Response times are normally distributed with a standard deviation of 1 minute. A
sample of 30 fire calls has a mean of 4 minutes and 30 seconds. Does this provide sufficient
evidence to show that the goal is not being me at a = 0.01?

Page 8 of 7
Solution

From the given information: µ =4 x̅ = 4.5 σ =1 n=30

We follow the 5-step process in testing hypotheses.

Step 1: State the 2 hypotheses


We use a right-tailed test. The null hypothesis is in conformance with the desired
performance.
H o: µ < 4 min
H 1: µ > 4 min

Step 2: Select the distribution and specify the a-value.


We use the z-distribution with a = 0.01 level of significance.

Step 3: Find the critical region.


Since this is a one-tailed test to the right, the critical or rejection region lies on the
right tail of the z-curve. The z-value leaving an area equal to 0.0100 (this is our a =
0.01) on the right is 2.326 (this is read from the table of z-values).

Critical value: z = 2.326


Critical region: z > 2.326

Rejection region

0.01 Z
µ=0 2.326

Decision rule: Reject H o if Z calc > 2.326


Otherwise, do not reject H o

Step 4: Calculate the test statistics.

Z calc = x̅ - µ = 4.5 - 4 = 2.739


σ / n 1 / √ 30

Step 5: Make a decision.

Since the calculated z=value = 2.739 is greater than the critical value of 2.326, it
means that the computed test statistic falls within the critical or rejection region. Thus,
Page 9 of 7
the null hypothesis H o is rejected at a 0.01 level of significance. There is reason to
believe then that the average response time of 4 min or less is not valid. Hence, fire
fighters do not respond to fire calls in 4 minutes or less, on the average. It takes them
more than an average of 4 minutes to respond.

Example 2.

Based on SPDU’s records, the average length of time cadets in the past ran the stretch from
the parade ground to the checkpoint is 12.58 minutes. The unit’s head, Capt. Pauly wanted to
check if the mean length of time the present corps of cadets runs this distance is now different
from 12.58 minutes. A sample of 150 cadets had their running time recorded giving a mean of
12.44 minutes with a standard deviation of 2.65 minutes. Using the 5% level of significance,
can you conclude that the mean running time of all the cadets now is different from 12.58
minutes?

Solution

From the given information, µ = 12.58 x̅ = 12.44 s = 2.65 n = 150 We


are to test if the mean running time of the cadets now is different from that of the past. This is,
thus, a two-tailed test since the objective is to detect a deviation from the desire mean in either
direction

Following the 5-step procedure,

Step 1: State the two hypotheses


H o: µ = 12.58
H 1: µ ≠ 12.58
Step 2: Select the distribution and specify the level of significance.

We use the z-distribution (since n is large) with a = 0.05

Step 3: Determine the critical region.


Since this is a two-tailed test, we need a/2 on the two tails of the z-curve.

a/2 = 0.025 a/2 = 0.025

//// | /// z
-1.96 0 +1.96

Page 10 of 7
Critical values: ⫨ 1.96
Decision rule: Reject H o if Z calc < -1.96 or if Z calc > +1.96.

Step 4: Calculate the test statistic.

Z calc
= x̅ - µ = 12.44 - 15.58 = -0.647
s/√ n 2.65 / √ 150
Step 5: Make a decision
The computed z-value does not fall in the critical region. Hence, we do not reject
the null hypothesis at a 0.05 level of significance. Accepting H oimplies that the mean running
time of the present corps of cadets is not different from the mean running time of the present
corps of cadets is not different from the mean running time of cadets in the past.

TESTING A MEAN: SMALL SAMPLES

When the population standard deviation σ must be estimated from the sample and the sample
size n is small (i.e., n < 30), the test statistic to use is modified. We shall use the Student’s
T-distribution instead of the Z-distribution.

The T-distribution

The t-distribution is a specific type of bell-shaped distribution with a lower height and wider
spread than the standard normal curve. As the sample size becomes larger, the t-distribution
approaches the standard normal distribution. It has only one parameter called the degrees of
freedom (df). The mean is zero and the standard deviation is df/(df-2). The degrees of
freedom is defined as the number of observations that can be chose freely, i.e., df = n-1. The
value of the test statistic t is

t = x̅ - µ
s/√ n
The T-curve

df = n -1

O t

Use Table VIII (The t-Distribution Table) at the Appendix to read critical values of t for the
specified number of degrees of freedom and areas in the right tail.

Example
Page 11 of 7
According to Pacman Power and Associates, the mean wait for an airport rental car in 2007
was 19 minutes, a random sample of 20 business travellers showed a mean wait of 15 minutes
with a standard deviation of 7 minutes. At a = 0.05, has the mean wait decreased?

Solution

Given = µo = 19 x = 15 s= 7 a = 0.05 n = 20

Step 1: State the two hypotheses


H o : µ = 19
H 1 : µ < 19

Step 2: Select the distribution and specify level of significance.


Use the t-distribution with df =n-1 = 20 – 1 =19 degrees of freedom because n is small and
σ is unknown.

Step 3: Determine the critical region.

df=19

0.05 t
-1.729 O
Critical value = -1.729
Decision rule: Reject H o if t calc < -1.729.

Step 4: Calculate the test statistic.

T calc = x̅ - µ = 15 - 19 = -2.55
s/√ n 7 / √ 20

Step 5: Make a decision


Since the computed test statistic falls in the critical region, we have to reject the null
hypothesis and accept the alternative hypothesis. Hence, the mean waiting time has
decreased. It takes less than 19 minutes on the average to wait for a rental car.

Summary

A test of hypothesis seeks to verify a claim or a conjecture about a population parameter. In


this chapter, we test hypotheses about the population mean. This seeks to determine if a
significant change has occurred with regard to the mean (µ).
Page 12 of 7
Two common statistical tests are the z-test and the t-test. The following rules apply when
choosing between the z-test or the t-test.
1. If σ is known, use the z-test. The variable must be normally distributed.
2. If σ unknown but n > 30, use the z-test and use S in place of σ ∈the formula .
3. If σ is unknown and n<30, use the t-test. The population must be approximately
normal.

The conclusion to the test should go beyond a mere statement of rejection or non-rejection of
the null hypothesis. It should make a clear statement of what is being affirmed, i.e., whether it
is the statement of the null hypothesis or the statement of the alternative hypothesis. Finally,
one should state the implication with regard to the conclusion’s impact on current procedures
and possibly on the policies of the organization.

Page 13 of 7
ACTIVITY 10 CADET: ________________________

Section: _______ Company: _______

1. The average number of visitors to the PMA museum was found to be 26 daily. After the
renovation has been made and with the transfer of the museum to its present site, the museum
officer, MAJ SIMON believes that the average number of visitors has increased. For 36
randomly chosen days, he monitored the number of people going to the museum. The sample
average is 28 with a standard deviation of 8. Is his allegation valid? Use a .05 level of
significance.
Solution:
a) H0: ____________
H1: ____________
b) Use the test statistic _____ with α = 5%.
c) Critical value = _______. Show figure below.

d) Computation:

e) Conclusion and interpretation::

2. Typically, only very brave students are willing to speak out in a college classroom. Student
participation may be especially difficult if the individual is not from the urban area but is from a
province with a peculiar/ regional dialect orientation.. A numerical “speaking-up” scale with
possible values from 3 to 15 (A low value means that the student rarely speaks.) was
designed. For a random sample of 64 students from selected regions all over the country, the
sample mean and sample standard deviation were 8.75 and 2.57, respectively. Suppose that
the mean for the student population is 10.0, does it appear that students who don’t come from
the metropolis have lower speaking-up ability? Use a 1% level of significance.

Required: The 5-step test procedure.

Page 14 of 7

You might also like