Uploaded by Hamza Rehman

Statistics and Probability testing LEC 18 B

As stated earlier, Inferential Statistics
can be divided into two parts, estimation
and hypothesis-testing.
Having discussed the concepts of
point
and
interval
estimation
in
considerable detail, we now begin the
discussion of Hypothesis-Testing:
Hypothesis-testing is a very important
area of statistical inference.
It is a procedure which enables us to
decide on the basis of information obtained
from sample data whether to accept or
reject a statement or an assumption about
the value of a population parameter.
Such a statement or assumption which
may or may not be true, is called a statistical
hypothesis.
We accept the hypothesis as being true,
when it is supported by the sample data.
We reject the hypothesis when the
sample data fail to support it.
It is important to understand what we
mean by the terms ‘reject’ and ‘accept’ in
hypothesis-testing.
The rejection of a hypothesis is to declare
it false.
The acceptance of a hypothesis is to
conclude that there is insufficient evidence to
reject it.
Acceptance does not necessarily mean that
the hypothesis is actually true.
The basic concepts associated with
hypothesis testing are discussed below:
NULL AND ALTERNATIVE
HYPOTHESES:
Null Hypothesis:
A null hypothesis, generally denoted by
the symbol H0, is any hypothesis which is to
be tested for possible rejection or
nullification under the assumption that it is
true.
A null hypothesis should always be
precise such as
‘the given coin is unbiased’
or
‘a drug is ineffective in curing a particular
disease’
or
‘there is no difference between the two
teaching methods’.
The hypothesis is usually assigned a
numerical value.
For example, suppose we think that the
average height of students in all colleges is
62.
This statement is taken as a hypothesis
and is written symbolically as H0 :  = 62.
In other words, we hypothesize that  =
62.
Alternative Hypothesis:
An alternative hypothesis is any other
hypothesis which we are willing to accept
when the null hypothesis H0 is rejected.
It is customarily denoted by H1 or HA.
A null hypothesis H0 is thus tested
against an alternative hypothesis H1.
For example, if our null hypothesis is
H0 :  = 62, then our alternative hypothesis
may be H1 :   62 or H1 :  < 62.
LEVEL OF SIGNIFICANCE
The probability of committing Type-I
error can also be called the level of
significance of a test.
Now, what do we mean by Type-I error?
In order to obtain an answer to this
question, consider the fact that, as far as the
actual reality is concerned, H0 is either
actually true, or it is false.
Also, as far as our decision regarding H0
is concerned, there are two possibilities --either we will accept H0, or we will reject H0.
The above facts lead to the following
table:
Decision
Accept H 0
Reject H 0
(or accept H 1)
H 0 is
true
Correct decision
(No error)
Wrong decision
(Type-I error)
H 0 is
false
Wrong decision
(Type-II error)
Correct decision
(No error)
True
Situation
A close look at the four cells in the body
of the above table reveals that the situations
depicted by the top-left corner and the bottom
right-hand corner are the ones where we are
taking a correct decision.
On the other hand, the situation depicted
by the top-right corner and the bottom lefthand corner are the ones where we are taking
an incorrect decision.
The situation depicted by the top-right
corner of the above table is called an error
of the first kind or a Type I-error, while the
situation depicted by the bottom left-hand
corner is called an error of the second kind
or a Type II-error.
In other words:
TYPE-I AND TYPE-II ERRORS:
On the basis of sample information, we
may reject a null hypothesis H0, when it is, in
fact, true or we may accept a null hypothesis
H0, when it is actually false.
The probability of making a Type I error
is conventionally denoted by  and that of
committing a Type II error is indicated by .
In symbols, we may write
 = P (Type I error)
= P (reject H0|H0 is true),
 = P (Type II error)
= P (accept H0|Ho is false).
TOPICS FOR TODAY
•Hypothesis-Testing (continuation
of basic concepts)
•Hypothesis-Testing regarding 
(based on Z-statistic)
In the last lecture, we commenced
the discussion of the concept of
Hypothesis-Testing.
We introduced the concepts of the
Null and Alternative hypotheses as
well as the concepts of Type-I and
Type-II error.
We now continue the discussion of
the basic concepts of hypothesistesting:
TEST-STATISTIC
A statistic (i.e. a function of
the sample data not containing
any
parameters),
which
provides a basis for testing a
null hypothesis, is called a teststatistic.
Every test-statistic has a
probability
distribution
(i.e. sampling distribution)
which gives the probability that
our test-statistic will assume a
value greater than or equal to
a specified value OR a value
less than or equal to a
specified value when the null
hypothesis is true.
ACCEPTANCE AND
REJECTION REGIONS
All possible values which a teststatistic may assume can be divided
into two mutually exclusive groups:
one group consisting of values which
appear to be consistent with the null
hypothesis (i.e. values which appear to
support the null hypothesis), and the
other having values which lead to the
rejection of the null hypothesis.
The first group is called the
acceptance region and the second
set of values is known as the
rejection region for a test.
The rejection region is also
called the critical region.
The value(s) that separates
the critical region from the
acceptance region, is called the
critical value(s):
Critical
Value
Critical
Region
0
Acceptance
Region
Critical
Value
Critical
Region
Z
The critical value
which can be in the same
units as the parameter or
in the standardized
units, is to be decided by
the experimenter.
The most frequently used
values of , the significance level,
are 0.05 and 0.01, i.e. 5 percent
and 1 percent.
By  = 5%, we mean that
there are about 5 chances in 100
of incorrectly rejecting a true
null hypothesis.
RELATIONSHIP BETWEEN
THE LEVEL OF SIGNIFICANCE
AND THE CRITICAL REGION:
The level of significance acts as a
basis for determining the CRITICAL
REGION of the test.
For example, if we are testing H0:
 = 45 against H1:   45, our test
statistic is the standard normal
variable Z, and the level of
significance is 5%, then the critical
values are Z = +1.96
Corresponding to a level of
significance of 5%, we have:
2.5%
-1.96
Critical
Region
2.5%
0
Acceptance
Region
1.96
Z
Critical
Region
ONE-TAILED AND
TWO-TAILED TESTS:
A test for which the entire
rejection region lies in only one
of the two tails – either in the
right tail or in the left tail – of
the sampling distribution of the
test-statistic, is called a onetailed test or one-sided test.
A one-tailed test is used
when the alternative hypothesis
H1 is formulated in the following
form:
H1 :  > 0
or
H1 :  < 0
For example, if we are
interested in testing a hypothesis
regarding the population mean, if
n is large, and we are conducting
a one-tailed test, then our
alternative hypothesis will be
stated as
H1 :  > 0
or
H1 :  < 0
In
this
case,
the
rejection region consists of
either all z-values which are
greater than + z or less
than – z (where  is the
level of significance):
H0 :  >  0
H1 :  <  0
Then (in case of large n):
If

REJECTION –z
0
REGION
REJECT H0 if z < –z
Z
H0 :  <  0
H1 :  >  0
Then (in case of large n):
If

0
z REJECTION Z
REGION
REJECT H0 if z > z/2
If, on the other hand, the
rejection region is divided
equally between the two
tails of the sampling
distribution of the teststatistic, the test is referred
to as a two-tailed test or
two-sided test.
In this case, the alternative
hypothesis H1 is set up as:
H1 :   0
meaning thereby
H1 :  < 0 or  > 0
H0 :  =  0
H1 :    0
Then (in case of large n):
If
/2
REJECTION
REGION
/2
–z/2
0
z/2 REJECTION
REGION
REJECT H0 if z < –z/2 or z > z/2
The location of critical region
can be determined only after
the alternative hypothesis H1
has been stated.
It is important to note that
the one-tailed and the two-tailed
tests differ only in location of
the critical region, not in the
size.
We
illustrate
the
concept and methodology
of hypothesis-testing with
the help of an example :
EXAMPLE
A
steel
company
manufactures and assembles
desks and other office equipment
at several plants in a particular
country.
The weekly production of the
desks of Model A at Plant-I has a
mean of 200 and a standard
deviation of 16.
Recently, due to market
expansion, new production
methods
have
been
introduced
and
new
employees hired.
The
vice
president
of
manufacturing
would
like
to
investigate whether there has been a
change in the weekly production of
the desks of Model A.
To put it another way, is the mean
number of desks produced at Plant-I
different from 200 at the 0.05
significance level?
The mean number of desks
produced last year (50 weeks,
because the plant was shut
down 2 weeks for vacation) is
203.5.
On the basis of the above result,
should the vice president
conclude that the there
been a change in the weekly
production of the desks of
Model A.
has
SOLUTION
We use the statistical
hypothesis-testing procedure to
investigate
whether
the
production
rate
has
changed
month.
from
200
per
Step-1:
Formulation of the Null and
Alternative Hypotheses:
The null hypothesis is “The
population mean is 200.”
The alternative hypothesis is
‘The mean is different from 200” or
“The mean is not 200.”
These two hypotheses
are written as follows:
H0 :  = 200
H1 : µ  200
Note:
This is a two-tailed test because the
alternative hypothesis does not state a
direction.
In other words, it does not state
whether the mean production is greater
than 200 or less than 200.
The vice president only wants to
find out whether the production rate is
different from 200.
Step-2:
Decision Regarding the Level of
Significance (i.e. the Probability of
Committing Type-I Error):
Here, the level of significance is
0.05.
This is , the probability of
committing a Type-I error (i.e. the
risk
of rejecting
hypothesis).
a
true
null
Step-3:
Test Statistic (that statistic that will
enable us to test our hypothesis):
The test statistic for a large
sample mean is
X 
z
 n
Transforming the production
data to standard units (z values)
permits the use of the area table of
the standard normal distribution.
Step-4:
Calculations:
In this problem, we have n =
50, X = 203.5, and  = 16.
Hence, the computed value of
z comes out to be:
z
X 

n

203.5  200
16
50
 1.55
Step-5:
Critical Region (that portion of the
X-axis which compels us to reject
the null hypothesis):
Since this is a two-tailed test, half
of 0.05, or 0.025, is in each tail.
The area where H0 is not
rejected, located between the two
critical values, is therefore 0.95.
Applying the inverse use of
the Area Table, we find that,
corresponding to  = 0.05, the
critical values are 1.96 and
-1.96, as shown below:
0.5000
 0.05

 0.025
2
2
-1.96
-1.96
Region of
rejection
Critical
Value
0.5000
0.4750
0.4750
0
H0 is not
rejected
 0.05

 0.025
2
2
+1.96
Scale to z
Region of
rejection
Critical
Value
Decision Rule for the 0.05 Significance Level
The decision rule is, therefore:
Reject the null hypothesis
and accept the alternative
hypothesis if the computed value
of z is not between –1.96 and
+1.96.
Do not reject the null
hypothesis if z falls between –
1.96 and + 1.96.
Step-6:
Conclusion:
The computed value of z i.e. 1.55 lies
between -1.96 and + 1.96, as shown below:
Computed
value of z
- 1.96
Reject H0
0
Do not reject H0
1.55
1.96
z scale
Reject H0
Because 1.55 lies between -1.96
and + 1.96, therefore, it does not
fall in the rejection region, and
hence H0 is
rejected.
not
In other words, we conclude
that the population mean is not
different from 200.
So, we would report to the vice
president of manufacturing that the
sample evidence does not show that
the production rate at Plant-I has
changed from 200 per week.
The difference of 3.5 units between the
historical weekly production rate and
the production rate of last year can
reasonably be attributed to chance.
The above example
pertained to a two-tailed
test.
Let us now consider a
few examples of one-tailed
tests:
EXAMPLE
A random sample of 100
workers with children in day care
show a mean day-care cost of
Rs.2650 and a standard deviation
of Rs.500.
Verify the department’s claim
that the mean exceeds Rs.2500 at
the
0.05
level
with
this
information.
SOLUTION
In this problem, we regard
the department’s claim, that
the mean exceeds Rs.2500, as
H1,
and regard the negation of this
claim as H0.
Thus, we have
i)
H0 :  < 2500
H1 :  > 2500 (exceeds 2500)
(Important Note:
We should always regard that
hypothesis as the null hypothesis
which contains the equal sign.)
ii) We are given the
significance level at  = 0.05.
iii) The test-statistic, under H0 is
X  0
Z
,
S n
which is approximately normal as
n = 100 is large enough to make
use of the central limit theorem.
iv) The rejection region is
Z > Z0.05 = 1.645
0.05
0
Z
Z0.05 REJECTION
=1.645 REGION
v) Computing the value of Z
from sample information, we
find
2650  2500 150
z

3
50
500 100
vi) Conclusion:
Since the calculated value
z = 3 is greater than 1.645,
hence it falls in the rejection
region, and, therefore, we
reject H0, and may conclude
that the department’s claim is
supported by the sample
evidence.
An Interesting and
Important Point:
For  = 0.01, Z = 2.33.
As our computed value of Z i.e. 3 is
even greater than 2.33, the
computed value of
X is highly
significant.
(With only 1% chance of being
wrong, the department’s claim was
correct).
IN TODAY’S LECTURE,
YOU LEARNT
•Hypothesis-Testing (continuation
of basic concepts)
•Hypothesis-Testing regarding 
(based on Z-statistic)
IN THE NEXT LECTURE,
YOU WILL LEARN
• Hypothesis-Testing regarding 1 - 2
(based on Z-statistic)
• Hypothesis Testing regarding p
(based on Z-statistic)
• Hypothesis Testing Regarding p1-p2
(based on Z-statistic)
• p-value
• Relationship Between Confidence
Interval and Tests of Hypothesis