Sunteți pe pagina 1din 54

Testing of hypothesis

Purpose
 The purpose of hypothesis testing is to help
the researcher or administrator in reaching a
decision concerning a population by
examining a sample from that population
Hypothesis
 It is a statement about one or more population
 It is usually concerned with the parameter of
the population about which the statement is
made
Research Hypothesis
 It is the assumption that motivate the research.
It is usually the result of long observation by
the researcher. This hypothesis led directly to
the second type of hypothesis
Statistical Hypothesis
 This is stated in a way that can be evaluated by
appropriate statistical technique.
Statistical hypothesis
 It is composed of two types:
 Null hypothesis( Ho): It is the particular
hypothesis under test, and it is the hypothesis
of “no difference”
 Alternative hypothesis (HA): which disagree
with the null hypothesis
Test Statistic
 It is a mathematical expression of sample
values which provides a basis for testing a
statistical hypothesis .
 The result of this test will determine whether
we will accept the null hypothesis and so the
HA will be rejected , or we reject the null
hypothesis and so the HA will be accepted.
Errors
 There are two possible errors to come to the
wrong conclusion:
 Type 1 error: rejection of the null hypothesis
when it is true. It is presented by alpha, which
is the level of significance, often the 5%, 1%,
and 0.1% (α=0.05, 0.01, and 0.001) levels are
chosen . The selection depends on the
particular problem
P-value
 It is the smallest value of α for which the Ho
can be rejected , so it gives a more precise
statement about probability of rejection of Ho
when it is true than the alpha level, so instead
of saying the test statistic is significant or not ,
we will mention the exact probability of
rejecting the Ho when it is true
Hypothesis Testing Procedure
Seven steps of hypothesis testing
Data
 The nature of the data whether it consists of
counts, or measurement will determine the test
statistic to be used
Step 1: Set Null and Alternative Hypotheses
The null hypothesis generally referred by H0 (H sub-zero), is the 
hypothesis which is tested for possible rejection under the assumption that
is true. Theoretically, a null hypothesis is set as no difference or status quo
and considered true, until and unless it is proved wrong by the collected
.sample data
:Symbolically, a null hypothesis is represented as 

 The alternative hypothesis, generally referred by H1 (H sub-one), is a logical


opposite of the null hypothesis. In other words, when null hypothesis is found
to be true, the alternative hypothesis must be false or when the null
hypothesis is found to be false, the alternative hypothesis must be true.
 Symbolically, alternative hypothesis is represented as:
Hypotheses
 Null Hypothesis (Ho): which is the hypothesis
of no difference, and the alternative
hypothesis( HA)
 If we reject the Ho we will say that the data to
be tested does not provide sufficient evidence
to cause rejection. If it is rejected we say that
the data are not compatible with Ho and
support the alternative hypothesis (H A)
Step 2: Determine the Appropriate
Statistical Test

Type, number, and the level of data may provide a platform for 
.deciding the statistical test
Apart from these, the statistics used in the study (mean, proportion, 
variance, etc.) must also be considered when a researcher decides on
appropriate statistical test, which can be applied for hypothesis testing
.in order to obtain the best results
Test statistic
 It uses the data of the sample to reach to a
decision to reject or to accept the null
hypothesis. The general formula for a test
statistic is:
relevant statistic-hypothesized parameter
Test statistic = -----------------------------------------
standard error of the relevant statistic
Test statistic--Example
_
x -µ
Z=-------------
σ √n
Step 3: Set the Level of Significance
The level of significance generally denoted by α is the 
probability, which is attached to a null hypothesis, which may be
.rejected even when it is true
The level of significance is also known as the size of the rejection 
.region or the size of the critical region
The levels of significance which are generally applied by 
.researchers are: 0.01; 0.05; 0.10
Distribution of test statistic
 It is the key for statistical inference
Step 4: Set the Decision Rule
Figure 10.2: Acceptance and rejection regions of null hypothesis (two-tailed test)

Critical region is the area under the normal curve, divided into two
mutually exclusive regions. These regions are termed as acceptance
region (when the null hypothesis is accepted) and the rejection
region or critical region (when the null hypothesis is rejected).
Decision Rule
 It will tell us to reject the null hypothesis if the
test statistic falls in the rejection area, and to
accept the it if it falls in the acceptance region
Decision Rule
 The critical values that discriminate between
acceptance and rejection regions depends on
alpha level of significance
 If the value of the test statistic falls in the
rejection region area , it is considered
statistically significant
 If it falls in the acceptance area it is considered
not statistically significant
Decision Rule .6
 Whenever we reject a null hypothesis , there is
always a possibility of type 1 error( rejection
of Ho when it is true). This is why we should
decrease this error to the least possible.
Critical values
 The values of the test statistic that separate the
rejection region from the acceptance region
Acceptance region
 A set of values of the test statistic leading to
acceptance of the null hypothesis
( values of the test statistic not included in the
critical region)
Rejection region
 A set of values of the test statistic leading to
rejection of the null hypothesis
Step 5: Collect the Sample Data
In this stage of sampling, data are collected and the appropriate 
.sample statistics are computed
The first four steps should be completed before collecting the 
.data for the study
It is not advisable to collect the data first and then decide on the 
.stages of hypothesis testing
Step 6: Analyse the data
In this step, the researcher has to compute the test statistic. This 
involves selection of an appropriate probability distribution for a
.particular test
.Some of the commonly used testing procedures are z, t, F, and χ2 
Computed test statistic .7
 This should be computed and compared with
the acceptance and rejection regions
Statistical decision .8
 It consists of rejecting or not rejecting the Ho .
It is rejected if the computed value of the test
statistic falls in the rejection area , and it is not
rejected if the computed value of the test
statistic falls in the acceptance region
Step 7: Arrive at a Statistical Conclusion
and Business Implication

In this step, the researchers draw a statistical conclusion. A 


statistical conclusion is a decision to accept or reject a null
.hypothesis
Statisticians present the information obtained using hypothesis- 
testing procedure to the decision makers. Decisions are made on
the basis of this information. Ultimately, a decision maker
decides that a statistically significant result is a substantive result
and needs to be implemented for meeting the organization’s
.goals
Conclusion .9
 If Ho is rejected , we conclude that HA is true.
If Ho is not rejected we conclude that Ho may
be true.
Two-Tailed Test of Hypothesis
:Let us consider the null and alternative hypotheses as below 

 Two-tailed tests contain the rejection region on both the tails of


the sampling distribution of a test statistic. This means a
researcher will reject the null hypothesis if the computed sample
statistic is significantly higher than or lower than the
hypothesized population parameter (considering both the tails,
right as well as left).
Figure 10.3: Acceptance and rejection regions (alpha = 0.05)
One-Tailed Test of Hypothesis
:Let us consider a null and alternative hypotheses as below

One-tailed test contains the rejection region on one tail of the


sampling distribution of a test statistic. In case of a left-tailed test, a
researcher rejects the null hypothesis if the computed sample
statistic is significantly lower than the hypothesized population
parameter (considering the left side of the curve in Figure 10.5).
In case of a right-tailed test, a researcher rejects the null hypothesis
if the computed sample statistic is significantly higher than the
hypothesized population parameter (considering the right side of the
curve in Figure 10.6).
Figure 10.5: Acceptance and rejection regions for one-tailed (left)
test (alpha = 0.05)
Figure 10.6: Acceptance and rejection regions for one-tailed (right)
test (alpha = 0.05)
Type I and Type II Errors
When a researcher tests statistical hypotheses, there can be four
:possible outcomes as follows
Rejecting a true null hypothesis (Type I error) .1
Accepting a false null hypothesis (Type II error) .2
Accepting a true null hypothesis (Correct decision) .3
Rejecting a false null hypothesis (Correct decision) .4
Testing of hypotheses
Type I and Type II Errors. Example

Suppose there is a test for a particular disease.


If the disease really exists and is diagnosed early, it can be
successfully treated
If it is not diagnosed and treated, the person will become
severely disabled
If a person is erroneously diagnosed as having the disease
and treated, no physical damage is done.

To which type of error you are willing to risk ?


Testing of hypotheses
Type I and Type II Errors. Example.
Decision No disease Disease
Not diagnosed OK Type II error

Diagnosed Type I error OK

irreparable damage
treated but not harmed by
would be done
the treatment

Decision: to avoid Type error II, have high level of significance


Table 10.3: Errors in hypothesis testing and power of the test
Two sided test

 If the rejection area is divided into the two


tails the test is called two-sided test ,
One sided test
If the rejection region is only in one tail it is
called one-sided test
 The decision will depend on the nature of the
research question being asked by the
researcher
Single population mean , known
population variance

_
x -µ
Z=-------------
σ √n
Single population mean with
unknown population variance

_
x -µ
t =-------------
s √n
Difference between two populations
means with known variances

_ _
(X1 –X2) – (µ1-µ2)
Z=-------------------------------
√ σ21 /n1 + σ21 /n2
Difference between two population
mean with unknown and unequal
variances

_ _
(X1 –X2) – (µ1-µ2)
t=-------------------------------
√ s 1 /n1 + s 1 /n2
2 2
Difference between two population
mean with unknown but assumed
equal variances

_ _
(X1 –X2) – (µ1-µ2)
t=-------------------------------
Sp√ 1 /n1 + 1 /n2
Paired t-test

_
d -µd
t =-------------
Sd √n
Single population proportion

˜
P -P
Z=-------------
√P(1-P)n
Difference between two population
proportions

˜ ˜
(P1-P2) –(P1-P2)

Z=-------------------------------------
----
Example
 A certain breed of rats shows a mean weight
gain of 65 gm, during the first 3 months of
life. 16 of these rats were fed a new diet from
birth until age of 3 months. The mean was
60.75 gm. If the population variance is 10 gm ,
is there a reason to believe at the 5% level of
significance that the new diet causes a change
in the average amount of weight gained
Answer
 Ho=65
 HA≠ 65
 Z 1-α/2 α=0.05 Z=1.96 (critical
value)
_
x -µ 60.75-65
Z=---------- = ----------- = -5.38
σ √n √10/ √16
Sine the calculated values falls in the rejection
region , we reject the Ho, and accept the H A
 In the above example , if the population
variance is unknown, and the sample Sd is
3.84
Answer
t 1- α/2
=± 2.1315
df =n-1

_
x -µ 60.75-65
t =-------------=------------= - 4.1315
s √n 3.84/ √16
Sine the calculated values falls in the rejection region ,
we reject the Ho, and accept the HA

S-ar putea să vă placă și