2. Every hypothesis-testing
situation begins with the
statement of a hypothesis.
A Statistical Hypothesis is a
conjecture about a population
parameter.
This conjecture may or may not
be true.
2
STATISTICAL HYPOTHESIS
3. There are two types of statistical
hypotheses for each situation:
1. Null hypothesis
2. Alternative hypothesis
3
TYPES OF STATISTICAL HYPOTHESIS
4. The Null Hypothesis,
symbolized by H0, is a statistical
hypothesis that states that there
is no difference between a
parameter and a specific value,
or that there is no difference
between two parameters.
It is also called ideal situation.
4
TYPES OF STATISTICAL HYPOTHESIS
NULL HYPOTHESIS
5. The Alternative Hypothesis,
symbolized by H1, is a statistical
hypothesis that states the
existence of a difference between
a parameter and a specific value,
or states that there is a difference
between two parameters.
It is also called claim of
researcher or research
Hypothesis.
5
TYPES OF STATISTICAL HYPOTHESIS
ALTERNATIVE HYPOTHESIS
6. A researcher of software engineering
is interested in finding out whether a
new IDE ( Eclipse) will change the
performance of programmers. The
researcher is particularly concerned
with the ‘LOC per hour’ a
programmer writes who use the new
IDE. Will the LOC per hour increase,
decrease, or remain unchanged after
a programmer uses new IDE.
6
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 1
7. Since the researcher knows that the
mean LOC per hour for the
population under study is 26 LOC
per hour, the hypotheses for this
situation are
H0: 𝜇 = 26
H1: 𝜇 ≠ 26
7
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 1
8. The null hypothesis specifies that
the mean will remain unchanged,
and the alternative hypothesis states
that it will be different.
This test is called a two-tailed test,
since the possible result of new IDE
could be to raise or lower the
performance of programmers.
8
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 1
9. R&D department of a software
company proposed that the usage of
an automation tool (i.e. QTP) in
testing cycle of a software project
increases the identification of bugs
in each module.
If the mean bugs of each module
without the usage of QTP is 146
bugs, then his hypotheses are;
H0: 𝜇 = 146 H1: 𝜇 > 146
9
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 2
10. In this situation, R&D department is
interested only in increasing the
bugs identification of modules, so his
alternative hypothesis is that mean
is greater than 146 bugs. The null
hypothesis is that the mean is equal
to 146.
This test is called right-tailed, since
the interest is in an increase only.
10
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 2
11. Software Development department
of a software company wishes to
lower open bugs by using a new unit
testing technique. If the average
bugs per UseCase are 13, the
hypotheses about bugs count with
the use of new Unit Testing
technique are:
H0: 𝜇 = 13 H1: 𝜇 < 13
11
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 3
12. This test is left-tailed test, since
software development department is
interested only in lowering the bugs
count in each UseCase.
12
ILLUSTRATION OF HYPOTHESES
CASE STUDY # 3
13. The null and alternative
hypotheses are stated together,
and the null hypothesis contains
the equals sign.
13
SIGNS IN ILLUSTRATION OF HYPOTHESIS
15. A Statistical Test uses the data
obtained from a sample to make
a decision about whether the null
hypothesis should be rejected.
The numerical value obtained
from a statistical test is called
the Test Value.
15
STATISTICAL TEST
16. In statistical test, the mean is
computed for the data obtained from
the sample and is compared with the
population mean.
Then a decision is made to reject or
not reject the null hypothesis on the
basis of the value obtained from the
statistical test.
If the difference is significant, the
null hypothesis is rejected. If it is
not, then the null hypothesis is not
rejected.
16
DECISION IN HYPOTHESIS TESTING
17. In the hypothesis-testing situation,
there are four possible outcomes.
In reality, the null hypothesis may
or may not be true, and a decision
is made to reject or not reject it on
the basis of the data obtained from
a sample.
There are two possibilities for a
correct decision and two
possibilities for an incorrect
decision ( shown in decision matrix)
17
DECISION IN HYPOTHESIS TESTING
19. 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.
19
TYPE I & TYPE II ERRORS
20. The level of significance is the
maximum probability of
committing a type I error.
This probability is symbolized by
α (alpha).
P(type I error) = α.
20
LEVEL OF SIGNIFICANCE
21. Statisticians generally agree on
using three arbitrary significance
levels: the 0.10, 0.05, and 0.01
levels.
That is, if the null hypothesis is
rejected, the probability of a type I
error will be 10%, 5%, or 1%,
depending on which level of
significance is used.
21
LEVEL OF SIGNIFICANCE
22. In other words:
When α = 0.10, there is a 10% chance
of rejecting a true null hypothesis
When α = 0.05, there is a 5% chance of
rejecting a true null hypothesis
When α = 0.01, there is a 1% chance of
rejecting a true null hypothesis.
22
LEVEL OF SIGNIFICANCE
23. In hypothesis-testing, the
researcher decides what level of
significance to use.
It can be any level, depending on
the seriousness of the type I error.
After a significance level is chosen,
a critical value is selected from a
table for the appropriate test.
23
LEVEL OF SIGNIFICANCE
24. The critical value separates the
critical region from the noncritical
region.
The symbol for critical value is C.V.
24
CRITICAL VALUE
25. The critical or rejection region is
the range of values of the test value
that indicates that there is a
significant difference and that the
null hypothesis should be rejected.
The noncritical or nonrejection
region is the range of values of the
test value that indicates that the
difference was probably due to
chance and that the null hypothesis
should not be rejected.
25
CRITICAL & NONCRITICAL REGIONS
26. A one-tailed test indicates that the
null hypothesis should be rejected
when the test value is in the critical
region on one side of the mean.
A one-tailed test is either a right-
tailed test or left-tailed test,
depending on the direction of the
inequality of the alternative
hypothesis.
26
ONE-TAILED TEST
27. To obtain the critical value, the
researcher must choose an alpha
level.
Suppose the researcher chose α =
0.01, for a right tailed test.
Then the researcher must find a z
value such that 1% of the area falls
to the right of the z value and 99%
falls to the left of the z value
27
FINDING CRITICAL VALUE FOR α = 0.01
RIGHT-TAILED TEST
28. The researcher must find the area
value in Table closest to 0.9900.
The critical z value is 2.33,
28
FINDING CRITICAL VALUE FOR α = 0.01
RIGHT-TAILED TEST
32. In left-tailed test, the critical value
falls to the left of mean.
At α = 0.01, the critical value is -
2.33
32
FINDING CRITICAL VALUE FOR α = 0.01
LEFT-TAILED TEST
34. In a two-tailed test, the null
hypothesis should be rejected when
the test value is in either of the two
critical regions.
For a two-tailed test, the critical
region must be split into two equal
parts.
If α = 0.01, then one-half of the area, or
0.005, must be to the right of the mean
and one half must be to the left of the
mean.
34
TWO-TAILED TEST
35. If α = 0.01, then one-half of the area, or
0.005, must be to the right of the mean
and one half must be to the left of the
mean.
In this case, the z value on the left
side is found by looking up the z
value corresponding to an area of
0.0050. This value is -2.58.
On the right side, it is necessary to
find the z value corresponding to
0.99 + 0.005, or 0.9950. It is +2.58
35
TWO-TAILED TEST
41. Step 1: Draw the figure and indicate
the appropriate area.
If the test is left-tailed, the critical region,
with an area equal to α, will be on the left
side of the mean.
If the test is right-tailed, the critical region,
with an area equal to α, will be on the right
side of the mean.
If the test is two-tailed, α must be divided
by 2; one-half of the area will be to the
right of the mean, and one-half will be to
the left of the mean.
41
PROCEDURE for Finding CRITICAL VALUE for SPECIFIC α
42. Step 2: Find the value of Z.
For a left-tailed test, use the z value that
corresponds to the area equivalent to α in
Table.
For a right-tailed test, use the z value that
corresponds to the area equivalent to 1 - α.
For a two-tailed test, use the z value that
corresponds to α/2 for the left value. For
the right value, use z value that
corresponds to the area equivalent to 1-
α/2.
42
PROCEDURE for Finding CRITICAL VALUE for SPECIFIC α
43. Using Table, find the critical value(s)
for given situation and draw the
appropriate figure, showing the
critical region.
A left-tailed test with α = 0.10.
43
FINDING CRITICAL VALUE
EXERCISE # 1
44. Draw the figure and indicate the
appropriate area. Since this is a left-
tailed test, the area of 0.10 is
located in the left tail.
Find the area closest to 0.1000 in
Table. In this case, it is 0.1003. Find
the z value that corresponds to the
area 0.1003. It is -1.28.
44
FINDING CRITICAL VALUE
SOLUTION OF EXERCISE # 1
46. Using Table, find the critical value(s)
for given situation and draw the
appropriate figure, showing the
critical region.
A two-tailed test with α = 0.02.
46
FINDING CRITICAL VALUE
EXERCISE # 2
47. Draw the figure and indicate the
appropriate area.
In this case, there are two areas
equivalent to α/2, or 0.02/2 = 0.01.
For the left z critical value, find the
area closest to α/2, or 0.02/2 =
0.01.
In this case, it is 0.0099.
47
FINDING CRITICAL VALUE
SOLUTION OF EXERCISE # 2
48. For the right z critical value, find the
area closest to 1-α/2, or 1-0.02/2 =
0.9900.
In this case, it is 0.9901.
Find the z values for each of the
areas.
For 0.0099, z =-2.33.
For the area of 0.9901, z =2.33.
48
FINDING CRITICAL VALUE
SOLUTION OF EXERCISE # 2
50. Using Table, find the critical value(s)
for given situation and draw the
appropriate figure, showing the
critical region.
A right-tailed test with α = 0.005.
50
FINDING CRITICAL VALUE
EXERCISE # 3
51. Draw the figure and indicate the
appropriate area. Since this is a
right-tailed test, the area 0.005 is
located in the right tail.
Find the area closest to 1-α, or 1-
0.005 = 0.9950. In this case, it is
0.9951.
Find the z value that corresponds to
the area 0.9951. It is 2.58.
51
FINDING CRITICAL VALUE
SOLUTION OF EXERCISE # 3
54. Step 1 State the hypotheses and
identify the claim.
Step 2 Find the critical value(s)
from the appropriate table.
Step 3 Compute the test value.
Step 4 Make the decision to reject
or not reject the null hypothesis.
Step 5 Summarize the results.
54
STEPS IN HYPOTHESIS TESTING
55. Test value=((Observed value)–(Expected Value))/Std Error
Observed Value is the statistic that is
computed from the sample data
The expected value is the parameter
(such as the population mean) that
you would expect to obtain if the null
hypothesis were true.
The denominator is the standard error
of the statistic being tested (i.e.
standard error of the mean)
55
FORMULA for ‘TEST VALUE’
56. The z Test is a statistical test
for the mean of a population.
It can be used when n >= 30,
or when the population is
normally distributed and 𝜎 is
known.
56
Z TEST FOR A MEAN
58. For the z test, the observed
value is the value of the sample
mean.
The expected value is the value
of the population mean,
assuming that the null
hypothesis is true.
The denominator 𝜎/√n is the
standard error of the mean.
58
Z TEST FOR A MEAN
59. A researcher wishes to see if the
mean number of days that a test
cycle of ‘Message Portal’ is
completed in 29 days.
A sample of 30 test cycles has a
mean of 30.1 days.
At α = 0.05, test the claim that the
mean time is greater than 29 days.
The standard deviation of the
population is 3.8 days.
59
HYPOTHESIS TESTING
EXERCISE # 4
60. Step 1 State the hypotheses and
identify the claim
H0: 𝜇 = 29 H1: 𝜇 > 29 (Claim)
Step 2 Find the critical value.
Since α = 0.05 and the test is a right-
tailed test
The critical value is z =1.65.
60
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 4
61. Step 3 Compute the Test value
Step 4 Make the decision
Since the test value, 1.59, is less than
the critical value, 1.65, and is not in the
critical region
Therefore, the decision is to not reject
the null hypothesis.
61
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 4
62. Step 5 Summarize the results.
There is not enough evidence to
support the claim that the mean time is
greater than 29 days.
62
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 4
63. A researcher claims that the
average cost of a new change in
requirements of ‘Message Portal’
software is less than $80.
He selects a random sample of 36
changes from repository and finds
the following costs (in dollars).
Is there enough evidence to support
the researcher’s claim at α = 0.10?
Assume 𝜎 = 19.2.
63
HYPOTHESIS TESTING
EXERCISE # 5
65. Step 1 State the hypotheses and
identify the claim
H0: 𝜇 = 80 H1: 𝜇 < 80 (Claim)
Step 2 Find the critical value.
Since α = 0.10 and the test is a left-
tailed test
The critical value is z =-1.28
65
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 5
66. Step 3 Compute the Test value
Compute the Mean of Sample Data
Mean = 75.0, 𝜎 = 19.2
Substitute the values in formula
66
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 5
67. Step 4 Make the decision
Since the test value, -1.56, falls in the
critical region
The decision is to reject the null
hypothesis.
Step 5 Summarize the results.
There is enough evidence to support
the claim that the average cost of new
change is less than $80.
67
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 5
69. Business Development department
of software house reports that the
average cost of establishment of a
small Data Center is $24,672.
To see if the average cost of
establishment of a small Data
Center is different at a particular
site, a researcher selects a random
sample of 35 sites and finds that the
average cost is $26,343.
69
HYPOTHESIS TESTING
EXERCISE # 6
70. The standard deviation of the
population is $3251.
At α = 0.01, can it be concluded
that the average cost of
establishment of a new small Data
Center is different from $24,672?
70
HYPOTHESIS TESTING
EXERCISE # 6
71. Step 1 State the hypotheses and
identify the claim
H0: 𝜇 = $24,672
H1: 𝜇 != $24,672 (Claim)
Step 2 Find the critical value.
Since α = 0.10 and the test is a two-
tailed test
The critical values are +2.58 and -2.58
71
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 6
72. Step 3 Compute the Test value
Step 4 Make the decision.
Reject the null hypothesis, since the
test value falls in the critical region
72
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 6
74. Step 5 Summarize the results.
There is enough evidence to support
the claim that the average cost for
establishment of new Data Center is
different from $24,672.
74
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 6
76. The P-value (or probability
value) is the probability of
getting a sample statistic (such
as the mean) in the direction of
the alternative hypothesis when
the null hypothesis is true.
76
P-VALUE METHOD FOR HYPOTHESIS TESTING
77. Step 1 State the hypotheses and
identify the claim.
Step 2 Compute the test value.
Step 3 Find the P-Value.
Step 4 Make the decision to reject
or not reject the null hypothesis.
Step 5 Summarize the results.
77
STEPS IN P-VALUE METHOD
78. A researcher wishes to test the
claim that the average cost of an
ERP software is greater than $5700.
She selects a random sample of 36
ERP solutions and finds the mean to
be $5950. The population standard
deviation is $659.
Is there evidence to support the
claim at α = 0.05?
Use the P-value method.
78
HYPOTHESIS TESTING
EXERCISE # 7
79. Step 1 State the hypotheses and
identify the claim
H0: 𝜇 = $5700
H1: 𝜇 > $5700 (Claim)
Step 2 Compute the test value.
79
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 7
80. Step 3 Find the P-value
Find the corresponding area under the
normal distribution for z = 2.28. It is
0.9887
Subtract this value for the area from
1.0000 to find the area in the right tail.
1.0000 - 0.9887 = 0.0113
Hence the P-value is 0.0113.
80
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 7
81. Step 4 Make the decision
Since the P-value is less than 0.05, the
decision is to reject the null hypothesis.
81
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 7
82. Step 5 Summarize the results
There is enough evidence to support
the claim that the average cost of ERP
solutions are greater than $5700.
82
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 7
83. If P-value <= α, reject the null
hypothesis.
If P-value >= α, do not reject the
null hypothesis.
83
DECISION RULE
WHEN USING P-VALUE
85. The t test is a statistical test for the
mean of a population and is used
when the population is normally or
approximately normally distributed,
and 𝜎 is unknown.
The formula for the t test is
The degree of freedom is d.f.=n - 1.
85
T TEST FOR A MEAN
86. Find the critical t value for α = 0.05
with d.f. = 16 for a right-tailed t
test.
86
FINDING CRITICAL VALUE FOR THE T TEST
EXERCISE # 8
87. Find the 0.05 column in the top row
and 16 in the left-hand column.
Where the row and column meet,
the appropriate critical value is
found; it is 1.746.
87
FINDING CRITICAL VALUE FOR THE T TEST
SOLUTION OF EXERCISE # 8
89. Find the critical t value for α = 0.01
with d.f. = 22 for a left-tailed test.
Critical value is -2.508
89
FINDING CRITICAL VALUE FOR THE T TEST
EXERCISE # 9
90. Find the critical values for α = 0.10
with d.f. = 18 for a two-tailed t test.
Critical values are +1.734 and
1.734
90
FINDING CRITICAL VALUE FOR THE T TEST
EXERCISE # 10
91. Step 1 State the hypotheses and
identify the claim.
Step 2 Find the critical value(s)
from the appropriate table.
Step 3 Compute the test value.
Step 4 Make the decision to reject
or not reject the null hypothesis.
Step 5 Summarize the results.
91
STEPS IN HYPOTHESIS TESTING
92. A researcher claims that the
average cost of software
maintenance is less than $60 per
day. A random sample of cost of
eight days is selected, and shown
below.
60 56 60 55 70 55 60 55
Is there enough evidence to support
the researcher’s claim at α = 0.10?
92
HYPOTHESIS TESTING
EXERCISE # 11
93. Step 1 State the hypotheses and
identify the claim
H0: 𝜇 = $60 H1: 𝜇 < $60 (Claim)
Step 2 Find the critical value.
Since α = 0.10 and d.f. = 7,
Therefore, the critical value is 1.415
93
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 11
94. Step 3 Compute the Test value
To compute the test value, the mean
and standard deviation must be found.
Mean = $58.88, and s = 5.08
94
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 11
95. Step 4 Make the decision.
Do not reject the null hypothesis since
0.624 falls in the noncritical region
95
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 11
96. Step 5 Summarize the results.
There is not enough evidence to
support the researcher’s claim that the
average cost of software maintenance
is less than $60 per day.
96
HYPOTHESIS TESTING
SOLUTION OF EXERCISE # 11