Hypothesis Testing
Hypothesis Testing
TYPES OF HYPOTHESES
Type I and Type II Error
DECISION
SITUATION
ACCEPT NULL REJECT NULL
Type I Error
Null is true Correct
(𝛼 error)
Type II Error
Null is false ( error)
Correct
A type I error occurs if you reject the null hypothesis when it is true.
A type II error occurs if you do not reject the null hypothesis when it is false.
TYPES OF HYPOTHESES
Level of Significance
In testing a given hypothesis, the maximum probability with which we would be willing to
risk a Type I error is called the level of significance, or significance
level, of the test. This probability, often denoted by , is generally specified before
any samples are drawn so that the results obtained will not influence our choice.
Significance means the percentage risk to reject a null hypothesis when it is true.
Generally it is taken as 1%, 5%, or 10% . (1 − 𝛼) is the confidence interval in
which the null hypothesis will exist when it is true.
TYPES OF HYPOTHESES
Level of Significance
In practice, a significance level of 0.05 or 0.01 is customary, although other values
are used. If, for example, the 0.05 (or 5%) significance level is chosen in designing
a decision rule, then there are about 5 chances in 100 that we would reject the
hypothesis when it should be accepted; that is, we are about 95% confident that we
have made the right decision. In such case we say that the hypothesis has been
rejected at the 0.05 significance level, which means that the hypothesis has a 0.05
probability of being wrong.
TYPES OF HYPOTHESES
Hypothesis-Testing Common Phrases
= > < ≠
Is equal to Is greater than Is less than Is not equal to
Is the same as Is above Is below Is different from
Has not changed from Is higher than Is lower than Has changed from
Is the same as Is longer than Is shorter than Is not the same as
Is bigger than Is smaller than
Is increased Is decreased or reduced
from
TYPES OF HYPOTHESES
Two-tailed test @ 5% Significance level
Acceptance and Rejection regions in case of a Two-tailed test
H0 : = 82; Ha : 82
TYPES OF HYPOTHESES
Right-tailed test @ 5% Significance level
Acceptance and Rejection regions in case of a right-tailed test
In this situation, the chemist is interested only in increasing the lifetime of the batteries.
With the mean of 36 months, the hypotheses are
𝑅𝑒𝑗𝑒𝑐𝑡𝑖𝑜𝑛 𝑟𝑒𝑔𝑖𝑜𝑛 𝑠𝑖
𝑔𝑛𝑖𝑓𝑖𝑐𝑎𝑛𝑐𝑒 𝑙𝑒𝑣𝑒𝑙 (𝛼 Total
= 0.05 𝑜𝑟 5%) 𝐴𝑐𝑐𝑒𝑝𝑡𝑎𝑛𝑐𝑒 𝑟𝑒𝑔𝑖𝑜𝑛
𝑜𝑟 𝑐𝑜𝑛𝑓𝑖𝑑𝑒𝑛𝑐𝑒 𝑙𝑒𝑣𝑒𝑙
(1 − 𝛼) = 95%
𝐻0 : 𝜇 = 𝜇0
TYPES OF HYPOTHESES
Forming Hypotheses:
Situation 3 (Left-tailed)
A contractor wishes to lower heating bills by using a special type of insulation in houses. The
average of the monthly heating bills is $78,
Since the contractor is interested only in lowering heating costs, the hypotheses are
For t-distribution,
𝑑. 𝑓. = 𝑛1 − 1
(for single population)
𝑑. 𝑓. = 𝑛1 + 𝑛2 − 2
(for two population)
STEPS IN TESTING HYPOTHESIS
-3 -2 -1 0 1 2 3
-1.96 -1.96
STEPS IN TESTING HYPOTHESIS
From the Standard Normal Distribution table,
A(z=1.96)
= 0.4750
Thus,
z = 1.96 0.4750
0.475
0
STEPS IN TESTING HYPOTHESIS
Alternate Method
STEPS IN TESTING HYPOTHESIS
Exercises:
Using the z table, find the critical value/s for each:
1. = 0.01, two tailed test 2.575
2. = 0.10, left tailed test 1.282
3. = 0.025, right tailed test 1.960
Example 1:
A principal at a certain school claims that the students in his school are above average
intelligence. A random sample of thirty students IQ scores have a mean score of
112.5. Is there sufficient evidence to support the principal’s claim? The mean
population IQ is 100 with a standard deviation of 15. IQ’s are normally distributed.
SAMPLE PROBLEMS
Solution:
Step 1: State the Null Hypothesis.
H0: The accepted fact is that the population mean is 100, so:
H0: μ = 100
Step 2: State the Alternate Hypothesis.
Ha: The claim is that the students have above average IQ
scores, so: Ha: μ > 100.
Step 3: State the type of test: One-tailed
(or simply right-tailed to be more definite)
Step 4: State the level of significance (alpha level). 0.05
(Note 0.05 shall be used unless otherwise indicated in the problem)
SAMPLE PROBLEMS
Solution:
Step 5: Establish Test statistic. z-test
Step 6: Use appropriate formula z = X s- m
n
Step 7: Compute Test statistic value z = 4.56
Solution:
Step 8: Illustrate tabular value. First set our critical value. It
is simpler to determine the z-score from our SND table. For
the significance level 5% in a one-tailed test is 1.645,
Solution:
Step 8: The critical value z may also be obtained using the
z-table.
45%
5%
1.645
45% (0.4500) is so far midway between P(z=1.64) = 0.4495 and
P(z=1.65) = 0.4505 and we can say that P(z=1.645) = 0.4500.
Solution:
Step 8: The critical value
z may also be obtained
P(z=1.640) = 0.4495
using the z-table.
P(z=1.645) = 0.4500
P(z=1.650) = 0.4505
P(z=1.64) = 0.4495
and
P(z=1.65) = 0.4505
We can say that Z = 1.64 Z = 1.65
P(z=1.645) = 0.4500.
Solution:
Step 8: Hence, Acceptance 4.56 lies to the
region right of the critical
value 1.645
Rejection region
1.645
4.56
Example 2:
Note: Using calculators, the computed standard deviation
s is 10.39 is and mean 𝑥 is 169.
Establish the given data:
n =5
d.f. = n -1 =4
𝑋 = 169 (Average of the 5 data)
0 = 179
s = 10.39 (Computed from calculator)
SAMPLE PROBLEMS
Solution:
Step 1: State the Null Hypothesis.
H0: μ = μ0 H0: μ =179
Step 2: State the Alternate Hypothesis.
Ha: μ < μ0 Ha: μ < 179
Step 3: State the type of test: Left-tailed
Step 4: State the level of significance (alpha level). 0.05
(Note 0.05 shall be used unless otherwise indicated in the problem)
SAMPLE PROBLEMS
Solution:
Step 5: Test statistic. t-test
Since n = 5 (n<30), so t-test is used.
X- m
Step 6: Use appropriate formula t=
s
Step 7: Compute Test statistic value. t = -2.152 n
169 - 179
z= = - 2.152
10.39
5
SAMPLE PROBLEMS
Solution:
Step 8: Illustrate tabular value. The critical value from the t-table
gives is −2.1318 (left-tailed, use negative value).
SAMPLE PROBLEMS
Solution:
t = 2.1318
d.f = n ̶ 1
=5 ̶ 1
=4
SAMPLE PROBLEMS
Solution: Acceptance
region -2.152 lies to the
left of the critical
Rejection region value −2.1318
−2.1318
− 2.152
NOTE: In this case, the computed value tc it is less than the critical
value, (-2.152 < −2.1318). Thus, it lies on the rejection region
SAMPLE PROBLEMS
Solution:
Step 9: Establish decision. Since (− 2.152 < −2.1318), we
reject the null hypothesis. That is to reject H0.
01
The average weekly earnings for female social workers is $670. Do men in the
same positions have average weekly earnings that are higher than those for
women? A random sample of n = 40 male social workers showed x = $725
and σ = $102. Test the appropriate hypothesis using = .01.
SAMPLE PROBLEMS
02
The manufacturer of electric bulb has established that the average life of the bulb
that his firm produces is 800 hours with a standard deviation of 40 hours. The
production of bulbs are closely monitored so that the bulb lifetime are maintained
close to the average. Occasionally, he takes a random sample bulbs to see if the
average lifetime of bulbs may have significantly changed. On one particular occasion,
he took a sample of 30 bulbs and found that the average to be 788 hours. At
10% level of significance, does the manufacturer have reasons to believe that the
average lifetime of bulbs manufactured by his company has decreased?
SAMPLE PROBLEMS
03
In the past, the average length of outgoing telephone calls from a business office has
been 143 seconds. A manager wishes to check whether that average has
decreased after the introduction of new policies. A sample of 100 telephone
calls produced a mean off 133 seconds with a standard deviation of 35
seconds. Perform the relevant test of hypothesis using 1% level of significance
to test if the length of average calls have decreased.
SAMPLE PROBLEMS
04
The average number of days to complete a recovery from a particular knee operation
is 123.7 days. From his experience, a Physician suspects that the use of topical
pain medication might be lengthening the recovery time. He randomly selects the
records of 7 surgery patients who used the topical medication obtaining a mean of
132.29 and a standard deviation of 10.98. Assuming a normal distribution of
recovery time, perform the relevant test of hypothesis at 5% level of significance.
SAMPLE PROBLEMS
05
A manufacturing process produces ball bearings with diameters that have a normal
distribution with known standard deviation of 0.04 cm. Ball bearings with
diameters that are too small or too large are undesirable. In order to test the claim
that the population mean is 0.50, perform a two–tailed hypothesis test at the 5%
level of significance. Assume that a random sample of 25 gave a mean diameter of
0.51 cm.
SAMPLE PROBLEMS
06
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. Do the six measurements
present sufficient evidence to indicate that the average weight of the diamonds
produced by the process is in excess of 0.5 karat?