You are on page 1of 73

Research Methodology

PART 9
Testing of hypotheses

M S Sridhar
Head, Library & Documentation
ISRO Satellite Centre
Bangalore 560017

E-mail: mirlesridhar@gmail.com & sridharmirle@yahoomail.com

M S Sridhar, ISRO Testing of Hypotheses 1


Testing of hypothesis
Synopsis Introduction
1. Introduction to Research & • Meaning & importance of
Research methodology hypothesis
2. Selection and formulation • Hypothesis Vs theory
of research problem
3. Research design and plan • Problems in formulating
4. Experimental designs hypothesis
5. Sampling and sampling • Sources / Origins of hypothesis
strategy or plan • Types of hypothesis
6. Measurement and scaling • Characteristics of good &
techniques usable hypothesis
7. Data collection methods
and techniques • Statistical hypotheses &
8. Statistical techniques for Hypothesis testing
processing & analysis of Basic concepts
data – Null & alternative
9. Testing of hypotheses hypotheses
10. Analysis, interpretation
and drawing inferences – Type I & type II errors
11. Report writing – One-tailed & two tailed tests
– Significance tests:
significance, level and
M S Sridhar, ISRO
power
Testing of Hypotheses 2
Testing of Hypothesis: Synopsis …contd.
Synopsis Parametric or Standard Tests
1. Introduction to Research & Z- Test
Research methodology
2. Selection and formulation t- Test
of research problem F- Test
3. Research design and plan Chi-square Test
4. Experimental designs 1. Testing of means
5. Sampling and sampling
2. Differences between means
strategy or plan
6. Measurement and scaling 3. Comparing two related means
techniques 4. Testing of proportions
7. Data collection methods 5. Differences between proportions
and techniques
6. Comparing a variance to some
8. Statistical techniques for
processing & analysis of hypothesised population
data variance
9. Testing of hypotheses 7. Equality of variances of two
10. Analysis, interpretation normal populations
and drawing inferences 8. Testing of correlation coefficients
11. Report writing (simple, partial & multiple)

M S Sridhar, ISRO Testing of Hypotheses 3


Testing of Hypothesis: Synopsis …contd.
Non-parametric or Distribution Free
Synopsis Tests
1. Introduction to Research One sample tests
& Research methodology
2. Selection and formulation 1. Kolmogorov-smirnov one sample
of research problem test
3. Research design and plan 2. Runs test for randomness
4. Experimental designs 3. One sample sign test
5. Sampling and sampling Two sample tests
strategy or plan 4. The sign test
6. Measurement and scaling 5. Fisher-Irwin test
techniques 6. Mc Nemer test
7. Data collection methods 7. The median test
and techniques
8. Chi-square test
8. Statistical techniques for
processing & analysis of 9. Wilcoxon-Mann-Whitney U-test
data 10. Wilcoxon matched pair (signed
9. Testing of hypotheses rank) test
10. Analysis, interpretation More than two (k) sample tests
and drawing inferences 11 The median test
11. Report writing 12 The Kruskal-Wallis test or H-test
13 Kendall’s coefficient of
concordance 4
M S Sridhar, ISRO Testing of Hypotheses
Hypothesis: Introduction
Meaning
• A Hunch, an assumption, a proposition, a guess which is
tentative, provisional & explains the situation under observation
but yet to be proved or disproved
• Selection & formulation of problem lead to clear objectives and
working hypothesis (positive hypothesis)
– what a researcher is looking for
– A penetrating hunch with provisional explanation becomes
the basis for a systematic investigation.
Tentative explanations are untested but sound, plausible and
reasonable
Good hypothesis appear to have the requirements
plausibility, consistency & chance of empirical testing
Example: 1. Decline in reading habits of adults
2. Factors affecting reading habits of adults
(televideo) 5
contd..

M S Sridhar, ISRO Testing of Hypotheses


Hypothesis: Introduction …Contd.

Importance
It is very difficult, laborious & time-consuming to make
adequate discriminations in the complex interplay of facts
without working hypothesis
1. Gives definite point to the inquiry
2. Helps establishing direction
Directs our search for order among facts & provide considerable
advantage in inquiry with suggested explanation or solution
3. Prevents blind search & indiscriminate gathering of data
While searching for significant & relevant facts to explain the
problem, shows the essential relationship that exists between
various elements within the complexity
4. Helps to delimit the field of inquiry
In his search, researcher may fall back on previous experience
of his own or that of others & single out those factors that are
known to have explained similar situations in the past as
observed in the descriptive literature or speculative philosophy

M S Sridhar, ISRO Testing of Hypotheses 6


Hypothesis Vs Theory
Note: Hypothesis & theory are closely related & interdependent but they are different

• Assumptions based on • When facts are


assembled, ordered &
Probabilities, shrewd guesses &
seen as a relationship,
profound hunches
they constitute a theory.
(Theory is not speculation
but built on facts that are
ordered to give meaning)

• Facts in theory are logically • Every worthwhile theory


analysed & relationship other permits the formulation of
than those stated in theory can additional hypo. Verified
be deduced (to verify their hypo becomes part of a
correctness) future theoretical
• A hypo looks forward construction
• Formulation of a deduction from
theory constitutes a hypo

M S Sridhar, ISRO Testing of Hypotheses 7


Hypothesis …Contd.

Problems in Formulating Sources / Origins of


Hypothesis Hypothesis
1. Absence of a clear theoretical 1. General culture in the
framework profession
2. Lack of ability to logically utilise 2. Common sense, wisdom and
the theoretical framework practice
3. Failure to be acquainted with 3. Keen observation, disciplined
average research techniques imagination & creative
Normally students tend to suggest thinking
(i) Area studies (ii) replication of 4. Literature & some formulated
pervious studies (iii) study of theoretical frame works
empirical regularities, ie., suggest 5. Analogies from other
type of data to be gathered (e.g.: disciplines
bibliometric study) 6. Personal & idiosyncratic
Caution experience the way individual
Researcher should not start out to reacts to culture, discipline &
prove or disprove hypothesis analogies. ‘Radicals’ &
He should not try to defend his ‘Marginal men’ can spring
hypothesis when data support a more hypotheses
conclusion exactly contrary to
what he originally believed
M S Sridhar, ISRO Testing of Hypotheses 8
Types of Hypothesis by Level of Abstraction
1. Those stating the existence of empirical uniformities
Known to everybody and there may not be any hypothesis to test at all !
Simple level hypothesis that seeks empirical generalisation play
important role in the growth of discipline
e.g.: Scientists are more library oriented than engineers
2. Those concerned with complex ideal types
Aim at testing the existence of logically derived relationships between
empirical uniformities
e.g.: Bradford law & ‘Half life time’ of journals in a discipline
3. Those concerned with the relation of analytic variables
More abstract than ideal types
Most sophisticated and the most flexible mode of formulation of
hypothesis
Allow better measurement of the relation between the variables
eg.: Use of information by a user may show empirical regularities with
many factors like (i) user’s initiative/ drive, motivation, etc (ii)
accessibility, ease of use and perceived utility of source of
information (iii) the need
M S Sridhar, ISRO Testing of Hypotheses 9
Characteristics of Good & Usable Hypothesis
1. Precise and simple but not obvious
Examples:
2. Conceptually clear 1. High performance causes
– Clear operational definition of concepts high communication among
3. Should have empirical referents engineers
Example: ‘Librarians are useless 2. The effect of informal social
relationship is much stronger
creatures’ – wrong, no referent than the formal organization
4. Specific & limited in scope (narrower structure on interpersonal
hypothesis is more testable) i.e., communication
Practicable - capable of being tested & 3. The informal communication
amenable to test within a reasonable time among peers and colleagues
is much more effective and
Significant - explain the facts that give rise
cordial than between
to the need superior and subordinate
5. Consistent with most known facts 4. The communication stardom
6. Should state relationship between and technological gate
variables (if it is relational hypothesis) keepership are intrinsic to
individuals and not
7. Should be related to available techniques contingent to a particular
except when it is to stimulate development organisation
of new techniques 5. Co-authorship relations result
8. Related to a body of theory in lasting and highly effective
Should help to refute, qualify or support informal communication
among co-authors
any existing theories
M S Sridhar, ISRO Testing of Hypotheses 10
Statistical Hypotheses
9 While attempting to make decisions some necessary assumptions
or guesses about the populations or statements about the
probability distribution of the populations made are called
statistical hypothesis.
9 These assumptions are to be proved or disproved
9 I.o.w, a predictive statement usually put in the form of a null
hypothesis and alternate hypothesis
9 Capable of being tested by scientific methods, that relates an
independent variable to some dependent variable
Hypothesis Testing
¾ Researcher bets in advance of his experiment that the results
will agree with his theory and cannot be accounted for by the
chance variation involved in sampling
¾ Procedures which enable researcher to decide whether to accept
or reject hypothesis or whether observed samples differ
significantly from expected results

M S Sridhar, ISRO Testing of Hypotheses 11


Hypotheses testing
Steps Procedure for hypothesis testing
1. Plan & conduct experiment 1. Making a clear formal statement
so that if the results are not indicating use of one-tailed test or two-
explained by the chance tailed test
variation, theory is 2. Select significance level based on: (i) the
confirmed magnitude of the difference between
2. Collect data sample means (ii) the size of samples (iii)
3. Set null hypo i.e.. assume the variability of measurements within
that results are due to samples (iv) whether the hypothesis is
chance alone directional or non-directional
4. Use a theoretical sampling 3. Deciding the appropriate sampling
distribution distribution to be used ( normal or t-
5. Obtain probability of sample distribution)
data as if it is chance 4. Selecting a random sample and
variation computing an appropriate value (draw a
6. If probability at 5 is less than sample to furnish empirical data)
some predetermined small 5. Calculation of the probability that sample
percentage (say 1% or 5%) result would diverge as widely as
reject the null hypothesis expected in null hypothesis
and accept the alternate 6. Comparing the probability with given
hypothesis significance level (alpha or alpha by two)

M S Sridhar, ISRO Testing of Hypotheses 12


Flow Diagram for Hypothesis Testing

State Ho as well as Ha

Specify the level of


Significant ( or the α value )

Decide the correct sampling


distribution

Sample a random sample(s) and workout


an appropriate value for sample data
Flow Diagram for Hypothesis Testing …Contd.

Calculate the probability that sample result would diverge


as widely as it has from expectations, if Ho were true

Is this probability equal or smaller than α value in case of


one tailed test and α/2 in case of two-tailed test

Yes No
Reject Ho Accept Ho

Thereby run the risk of Thereby run some risk of


committing Type I error committing Type II error

M S Sridhar, ISRO Testing of Hypotheses 14


Basic Concepts
1. Tests of hypothesis (or tests of significance or rules of decision):
Procedure which enable deciding to accept or reject hypothesis or to determine
whether observed samples differ significance from expected results
Decision rule is a sort of basis according to which hypothesis is accepted
2. Null (Ho) & Alternative (Ha) hypotheses:
Ho = While computing two methods assuming that both are equally
good
Ha = A set of alternative to H0 or rejecting the H0 (what one wishes to
prove)

Alternative hypothesis To be read as follows


Ha : µ =/ µ (The alternative hypothesis is that the
population mean is not equal to 100, I.e., it
may be more or less than 100)
Ha : µ > µ (The alternative hypothesis is that the
population mean is greater than 100)
Ha : µ < µ (The alternative hypothesis is that the
population mean is less than 100)

M S Sridhar, ISRO Testing of Hypotheses 15


Basic Concepts …Contd.
3. Type I and type II errors:
‰ Error is determined in advance as level of significance for a given
sample size
‰ If we try to reduce type I error, the probability of committing type II
error increases
‰ Both type errors cannot be reduced simultaneously
‰ Decision maker has to strike a balance / trade off examining the
costs & penalties of both type errors

Decision Decision

Accept H0 Reject H0

H0 (true) Correct decision Type I error


(α error)
H0 (false) Type II error Correct decision
(β error)

M S Sridhar, ISRO Testing of Hypotheses 16


4. One-tailed (sided) and Two-tailed (sided) tests …contd.
Mathematically we can state:
Acceptance Region A : Z > - 1.645 Region of acceptance or non-significance
Rejection Region R : Z ≤ - 1.645 Critical region or region of significance
STANDARD VARIATE SCORES (Z SCORES)
---------------------------------------------------------------------------------------------------------
α 0.10 0.05 0.01 0.005 0.002
---------------------------------------------------------------------------------------------------------
One tailed ± 1.28 ± 1.645 ± 2.33 ± 2.58 ± 2.88

Two tailed ± 1.645 ± 1.96 ± 2.58 ± 2.81 ± 3.08


--------------------------------------------------------------------------------------------------------
NOTE: Accepting H0 on the basis of sample information does not mean one
constitute the proof that H0 is true. It only means that there is not
statistical evidence to reject it.
TABLE – Normal Distribution
Z Prob. Z Prob. Z Prob.
3.0 .999 0.8 .788 -1.4 .081
2.8 .997 0.6 .726 -1.6 .055
2.6 .995 0.4 .655 -1.8 .036
2.4 .992 0.2 .579 -2.0 .023
2.2 .986 0.0 .500 -2.2 .014
2.0 .977 -.2 .421 -2.4 .008
1.8 .964 -.4 .345 -2.6 .005
1.6 .945 -.6 .274 -2.8 .003
1.4 .919 -.8 .212 -3.0 .001
1.2 .885 -1 .159
1.0 .841 -1.2 .115

M S Sridhar, ISRO Testing of Hypotheses 17


4. One-tailed (sided) and Two-tailed (sided) tests …contd.

M S Sridhar, ISRO Testing of Hypotheses 18


4. One-Tailed / sided and Two Tailed / Sided Tests: …Contd.

M S Sridhar, ISRO Testing of Hypotheses 19


4. One-tailed (sided) and Two-tailed (sided) tests …contd.

M S Sridhar, ISRO Testing of Hypotheses 20


Basic Concepts … contd.
5. The significance of “significances tests”:
¾ The accuracy of a given sample result alone is not enough
¾ Significance attached to the result is necessary, I.e., Importance,
validity, etc.
¾ Statistical significance refers to real difference and not due to
chance alone

6. The level of significance (α):


¾ Some percentage (usually 5%) chosen with great care, thought &
reason so that how will be rejected when the sampling result
(observed evidence) has a probability of < 0.05 of occurring if Ho
is true
¾ Researcher is willing to take as much as a 5% risk of rejecting Ho
¾ Significance level is the maximum value of the probability of
rejecting Ho when it is true
¾ It is usually determined in advance, I.e., the probability of type I
error (α) is assigned in advance and hence nothing can be done
about it
contd.
M S Sridhar, ISRO Testing of Hypotheses 21
Basic Concepts … contd.
7. Power of a test (1- β):
¾ Value (1-β) indicates how well the test is working, i.e., value
nearer to 1 means working well (test is rejecting Ho when it is
not true) and value nearer to 0 means poorly working (not
rejecting Ho when it is not true)
¾ It indicates how well given test will enable us to minimise the
probability of type II error (β), i.e., avoid making wrong
decisions. Hypothesis testing cannot be foolproof. Sometimes
test does not reject a Ho which is false (type II error). We would like β
to be as small as possible or (1- β) to be as large as possible.
¾ Power function (H) : plotting values of 1-β for each possible
values of the population parameter for which Ho is not true we
get ‘Power curve’ associated with test. The function defining
this curve is power function
¾ Operating Characteristic Function (L) L = 1 - H : Shows
conditional probability of accepting Ho for all values of
population parameters for a given sample size, whether or not
the decision happens to be a correct one
¾ OC curve - graphs showing the probabilities of type II error (β)
under various hypotheses
M S Sridhar, ISRO Testing of Hypotheses 22
Parametric or Standard Tests
¾ Require measurements equivalent to at least an interval scale
¾ Assume certain properties of parent population like i) observations are
from a normal population ii) large random sample iii) population
parameters like mean, variance, etc. must hold good
¾ Situations where above assumptions are not possible, non-parametric
tests are used; As there is no model, these tests are also called
distribution-free tests
Four important parametric tests based on the assumption of normality
X - μ
1. Z – Test Z = ------------- Finite pop multiplier 1/√ (N – n)/(N – 1)
σs / √n
Based on the normal probability distribution and even binomial or L. D.
Str in case of large samples.
For testing mean, variance, two individual samples, median, mode,
correlation, coefficients etc.,
X - μ
2. t – Test t = ------------
σs / √n
¾ It is based on t-distribution and only incase of small samples
¾ Used for testing difference between means of two samples, coefficient of
simple & partial correlations, etc.
M S Sridhar, ISRO Testing of Hypotheses 23
Parametric or Standard Tests … contd.

3. F – Test
Based on F – Distribution 4. χ2 - Test
Based on Chi-square
σ2 s
1 distribution
F = ------------- ( Oij - Eij )2
σ2 s2 χ2 = ∑ ----------------
Used in the context of Eij
ANOVA and for the Used for comparing a
testing the significance sample variance to a
of multiple correlation theoretical population
coefficients, comparing variance
the variance of two σ 2s
independent samples, χ2 = ---------- ( n – 1 )
σ 2p
etc.

M S Sridhar, ISRO Testing of Hypotheses 24


SOME IMPORTANT PARAMETRIC TESTS
1. Testing of means
∑Di2
Z and t tests & Sandler’s a statistic, A = ----------- Where Di = ( Xi - µH0 )
(∑Di ) 2
2. Differences between means

X1 - X2 X1 - X2
Z = --------------------------- t = ------------------------------------------------------------
√σ2p1 / n1 + √ σ2p2 / n2 ∑(X1i – X1)2 + ∑(X2i – X2)2
-------------------------------------- (√ 1/n1 + √ 1/n2)
n1 + n2 + n3
3. Comparing two related means
¯D – D ∑ Di
t = ------------- ; df = n – 1; ¯ D = ----------; σdif =√ ∑Di2 - √(¯ D)2i n/n - 1
σdif /√n n

∑Di2
A = ------------
(∑Di)2

M S Sridhar, ISRO Testing of Hypotheses 25


Parametric tests … contd.
4. Testing of proportions Z = ^p - p / √pq/n
5. Differences between proportions
^p1 - ^p2
Z = -------------------------------------------
√ [^ p1 ^ q1 /n1 + ^ p2 ^ q2 /n2]
6. Comparing a variance to some hypothesised population variance
σs2
χ2 = --------- (n–1)
σp2
σs12
7. Equity of variances of two normal populations F = ----------
σs22
8. Testing of correlation coefficients
For simple correlation coefficients: t = rrx√ n-2 / 1 - rrx2 (df = n-2)
For partial correlation coefficients: t = rp √ n-k / 1 - rp2 (df = n-k)
n = number of paired observation; k = number of variable involved
R2 / k - 1
For multiple correlation coefficients: F = ----------------------
(1 - R )/ n - k
(k - 1) = df for variance in numerator; (n - k) = df for variance in
denominator
M S Sridhar, ISRO Testing of Hypotheses 26
Non-parametric or Distribution-free Tests
‰ When do not depend on any assumptions about properties/
parameters
of the parent population
‰ Most non-parametric tests assume only nominal or ordinal data
‰ Non-parametric tests require more observations than parametric
tests to achieve the same size of the type I and type II errors
‰ Some important applications are
(I) Concerning single value for the given data
(ii) Differences among two or more sets of data
(iii) Relations between variables
(iv) Variation in the given data
(v) Randomness of a sample
(vi) Association or dependency of categorical data
(vii) Comparing theoretical population with actual data in
categories

M S Sridhar, ISRO Testing of Hypotheses 27


Non-parametric or Distribution-free Tests

1. Hypothesis Testing of Means


Example : Given below (X1) are annual addition of books to 10 sample branch
libraries of public library department of a State. Test the hypothesis that the mean
annual addition of books to branch libraries is 578 at 5% significance level
------------------------------------------------------------------------------------------------------------
S. no. X1 (X1 - X) (X1 - X)2
------------------------------------------------------------------------------------------------------------------------------------------------------------------

1 578 6 36
2 572 0 0
3 570 -2 4
4 568 -4 16
5 572 0 0
6 578 6 36
7 570 -2 4
8 572 0 0
9 596 24 576
10 544 -28 784
-----------------------------------------------------------------------------------------------------------
n = 10 ∑ Xi = 5720 ∑(Xi - X)2=1456
-----------------------------------------------------------------------------------------------------------

M S Sridhar, ISRO Testing of Hypotheses 28


1. Hypothesis Testing of Means … contd.
Table showing computations for A-Statistic
-------------------------------------------------------------------------------------------------------------------
S. no. X1 Hypothesised mean Di = (Xi - µµ0) Di2
µµ0 = 578
-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

1 578 578 0 0
2 572 578 -6 36
3 570 578 -8 64
4 568 578 - 10 100
5 572 578 - 6 36
6 578 578 0 0
7 570 578 -8 64
8 572 578 -6 36
9 596 578 18 324
10 544 578 - 34 1156
-------------------------------------------------------------------------------------------------------------------
n = 10 ∑ Di = - 60 ∑ Di 2 = 1816
-------------------------------------------------------------------------------------------------------------------

M S Sridhar, ISRO Testing of Hypotheses 29


1. Hypothesis Testing of Means … contd.
H0 = µ = µµ0 = 578
Ha: µ ≠ µµ0
(Two tailed test)
∑ Xi
¯X = --------- = 572
n
σs = √1456/9 = 12.7 2
572 – 578
t = --------------- = - 1. 488
12.72/ √ 10
Table value of t for df = n-1 = 9 Therefore, ∑Di 2 1816
is 2.62 and hence H0 is A= ------------ = ------------ = 0.5044
accepted
(∑Di)2 (-60)2
Null hypothesis H0 : µµ0 = 578
Alternative hypothesis Ha : µµ = 578
0
H0 = µ = µµ0 ≠ 578
Table value of A-static for df = (n-1)=9 at
α = 0.05 is 0.276 and hence H0 is
accepted
M S Sridhar, ISRO Testing of Hypotheses 30
1. Hypothesis Testing of Means … contd.

Example: A college library which had an average


daily issue of 500 books recorded the following
daily issue data for 12 days during examination.
Does it mean that daily issue has considerably
increased ? Test at 5% significance level 6576
H0 : µ = 500 Ha = µ >500 (One tailed test) ¯X = --------- = 548
To find ¯X and σs we make the following 12
computation σs = √∑((Xi-X)2/(n-1) = 46.68
-----------------------------------------------------------------------------------------------------------
S.No. Xi (Xi- ¯X) (Xi- ¯X)
----------------------------------------------------------------------------------------------------------
548 - 500
1 550 2 4 T = --------------- = 3.558
2 570 22 484 46.68/√12
3 490 -58 3364 Table value of t at α = 0.5
4 615 67 4489
5 505 -43 1849 for df = 12-1 = 11 is 1.786
6 580 32 1024 Hence H0 is rejected
7 570 22 484
8 460 -88 7744
9 600 52 2704
10 580 32 1024
11 530 -18 324
12 526 -22 484
----------------------------------------------------------------
N = 12 ∑Xi=6576 ∑(Xi- ¯X)2 = 23978
---------------------------------------------------------------- 31
M S Sridhar, ISRO Testing of Hypotheses
2. Hypothesis Testing for differences between means

Example: Given below are the time taken in minutes by 7 untrained users (X1i)
and 5 trained users (X2i) for executing a query on an online database. Is there
any evidence at 5% significance level that the training has reduced the time
taken for executing a query user 10 and 8 as assumed means for X1i and X2i
respectively.

H0 : µ1 = µ2 ; Ha: µ1< µ2
(X1i – A1) 28
¯X1 = A1 + ------------------- = 10 + ---------- = 14
n1 7
(X2i – A2) 15
¯X2 = A2 + ------------------ = 8 + --------- = 11
n2 5
∑ (X1i – A1) - [∑((X1i – A1)] / n1
2 2
σs1 = ---------------------------------------------------- = 3.667
2
n1-1

M S Sridhar, ISRO Testing of Hypotheses 32


2. Hypothesis Testing for difference between means … contd.
---------------------------------------------------------------------------------------------------------------------
Sample one Sample two
---------------------------------------------------------------------------------------------------------------------
S.No. X1i X1i –A1 X1i –A1 S.No. X2i X1i –A1 X1i –A1
(A1 = 10) (A2= 8)
---------------------------------------------------------------------------------------------------------------------
1 12 2 4 1 8 0 0
2 15 5 25 2 10 2 4
3 11 1 1 3 14 6 36
4 16 6 36 4 10 2 4
5 14 4 16 5 3 5 25
6 14 4 16
7 16 6 36
----------------------------------------------------------------------------------------------------------------------
n1 =7 ; ∑(Xii-A1) = 28; ∑(Xii-A1)2 = 134 n2 =5; ∑(X2i-A2) = 28 ; ∑(X2i-A2)2 = 134
----------------------------------------------------------------------------------------------------------------------

M S Sridhar, ISRO Testing of Hypotheses 33


2. Hypothesis Testing for difference between means … contd.

∑(X2-A2)2 –[∑(X2i-A2)]2/n2
σs22 = ---------------------------------------- = 6
n2 - 1
¯ X1 - ¯ X2
T = --------------------------------------------------------------
√(n2 – 1) σs12 +(n2 – 1) σs22 X √1/ n1 + √ 1/ n2
-------------------------------------
n1+n2-2
14 - 11
= --------------------------------------------------------- = 2.381
√(7 – 1)(3.667)+(5-1)(6) X √1/7 + √ 1/5
--------------------------------
7+5-2
Table value of t for 10 df at α =0.5 for one tail test is 1.812. Hence H0 is
rejected

M S Sridhar, ISRO Testing of Hypotheses 34


3. Testing Hypothesis for Comparing Two Related sample
Memory capacity of 9 students was tested before & after training. Given below
are their scores before & after training. Using paired t-test & A-test check
whether the training was effective at 5% significance level
H0 : µ1 = µ2 or Ha = D = 0 Ha: µ1< µ2 (One tailed test) df = n – 1 = 9 – 1 = 8
-----------------------------------------------------------------------------------------------------------
Student 1 2 3 4 5 6 7 8 9
-----------------------------------------------------------------------------------------------------------
Before(Xi) 10 15 9 3 7 12 16 17 4
After (Yi) 12 17 8 5 6 11 18 20 3
-----------------------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------------
Student Score Score Difference Difference
training training Di = Xi – Yi squared
Xi Yi Di2
-------------------------------------------------------------------------------------------------
1 10 12 -2 4
2 15 17 -2 4
3 9 8 1 1
4 3 5 -2 4
5 17 6 1 1
6 12 11 1 1
7 16 18 -2 4
8 17 20 -3 9
9 4 3 1 1
-----------------------------------------------------------------------------------------------
n=9 ∑Di = -7 ∑Di2= 29
------------------------------------------------------------------------------------------------
M S Sridhar, ISRO Testing of Hypotheses 35
3. Testing Hypothesis for Comparing Two Related sample …Contd.

∑Di -7
Mean Difference, ¯D = ---------- = --------- = - 0.778
n 9

S.D of difference σdif = √∑Di2 –(¯D)2n / n – 1


= √29-(-0.778)2 (9)/ 9 – 1 = 1.715
¯D – 0 - 0.778 -0
t = ---------- = --------------- = - 1.361
σdif/ √n 1.715/ √9

Tabulated value for 8 df at ∝ = 0.5 Is –1.860 and hence H0 is accepted, ie.,


training is not effective
∑Di2 29
A = ------------- = --------- = 0.592
(√∑Di)2 (-7)2
Tabulated value is 0.366 & hence H0 is accepted

M S Sridhar, ISRO Testing of Hypotheses 36


3. Testing Hypothesis for Comparing Two Related sample …Contd.
Example 2: Sales data of an item in six shops before and after a special
promotional campaign are given below. Judge the success of the
campaign at 5% significance level using paired t-test and A-test
------------------------------------------------------------------------------------------------
Shops A B C D E F
------------------------------------------------------------------------------------------------
Before the promotional
campaign Xi 53 28 31 48 50 42

After the campaign Yi 58 29 30 55 56 45


-----------------------------------------------------------------------------------------------
-----------------------------------------------------------------------------------------------------
Shops Sales before Sales after Difference Difference
campaign (Xi) campaign(Yi) (Di = Xi - Yi ) Squared (Di 2)
-----------------------------------------------------------------------------------------------------
A 53 58 -5 25
B 28 29 -1 1
C 31 30 1 1
D 48 55 -7 49
E 50 56 -6 3
F 42 45 -3 9
-----------------------------------------------------------------------------------------------------
n=6 ∑ Di = -21 ∑ Di2 = 121
-----------------------------------------------------------------------------------------------------

M S Sridhar, ISRO Testing of Hypotheses 37


3. Testing Hypothesis for Comparing Two Related sample …Contd.
∑Di - 21
¯D = ----------- = ------- = - 3.5
n 6

√ ∑ Di 2 - (¯D)2(n) √ 121-(-3.5)2 X 6
σdiff = ---------------------------- = ---------------------------- = 3.08
n-1 6-1
4. Testing the Equality of Variances of Two Normal Populations
Example: Given below are two random samples (X1i & X2i ) drawn
from two normal populations. Test using variance ratio at 5% and 2%
level of significance whether the two populations have the same
variance
H0 = σp12 = σp22

∑X1i 220
¯X1 = -------- = ------- = 22
n1 10

∑X2i 420
¯X2 = -------- = ------- = 35
n2 12
M S Sridhar, ISRO Testing of Hypotheses 38
4. Testing the Equality of Variances of Two Normal Populations
…contd.
---------------------------------------------------------------------------------------------------
Sample 1 Sample 2
X1i (X1i - ¯X1) (X1i - ¯X1)2 X2i (S2i - ¯X2) (X2i - ¯X2)2
---------------------------------------------------------------------------------------------------
20 -2 4 27 -8 64
16 -6 36 33 -2 4
26 4 16 42 7 49
27 5 25 35 0 0
23 1 1 32 -3 9
22 0 0 34 -1 1
18 -4 16 38 3 9
24 2 4 28 -7 49
25 3 9 41 6 36
19 -3 9 43 8 64
30 -5 25
37 2 4
-----------------------------------------------------------------------------------------------------
∑ X1i =220 ∑ (X1i - ¯X1)2 = 120 ∑ X2i=420 ∑(X2i- ¯X2)2 = 314
-----------------------------------------------------------------------------------------------------
n1 = 10 n2 = 12
------------------------------------------------------------------------------------------------------ 39
M S Sridhar, ISRO Testing of Hypotheses
4. Testing the Equality of Variances of Two Normal Populations
…Contd.
∑ (Xii- ¯X1)2 120
σ2s1 = ------------------------ = --------------- = 13.33
n1 - 1 10 - 1

∑ (X2i - ¯X2)2 314


σ2s2 = ------------------------ = ------------- = 28.55
n2 - 1 12 - 1

σs22 28.55
F = -------- = ----------- = 2.14 (Since σs22 > σs12 )
σs12 13.33

df: V1 = n2 - 1 = 12 - 1 = 11
V2 = n1 - 1 = 10 - 1 = 9 (Since V1 > V2)

Table values of F for V1 = 11 & V2 = 9 at 5% and 1% significance levels


respectively are 3.11 and 5.20. Hence accept H0 at both levels of
significance ie., samples have been drawn from two populations
having the same variances.

M S Sridhar, ISRO Testing of Hypotheses 40


5. Chi-Square Test
Has wide applications in research:
1. To test the homogeneity or the significance of population variance
(I.e., test for comparing variances) (Example in the next slide)
σs2
H0 = σs2 = σp2 χ2 = -------- (n-1)
σp2
2. To test independence or significance of association between
attributes
3. To test the goodness of fit
(Oij - Eij)2
χ2 = ∑ --------------
Eij
(2 and 3 already discussed with examples under statistical
techniques and two sample tests as a non-parametric tests)

M S Sridhar, ISRO Testing of Hypotheses 41


5. Chi-Square Test
Example: Weight of 10 students is as follows: 38 40 45 53 47 43 55 48
52 & 49 (in kilograms). Can we say that the variance of the distribution of
weight of all students from which the above sample of 10 students was
drawn is equal to 20 kgs ? Test this at 5% and 1% level of significance

Σ Xc 470
¯X = ------ = -------- = 47 kgs
n 10
(Xi - ¯X)2 280
σs2 = ∑ ------------ = ----------- = 31.11 [H0: σp2 = σs2]
n-1 100-1
σ s2 31.11
χ = -------- (n-1) = --------- (10-1) = 13.999
2
σ p2 20

Table value of χ2 for df = 9 at α = 0.01 is 21.67 and at α = 0.05 is 16.92


As both values are greater than calculated value H0 is accepted. In
other words, sample can be said to have been taken from a
population with variance 20 kgs

M S Sridhar, ISRO Testing of Hypotheses 42


Non-parametric or distribution-free tests
Two kinds of assertions in statistical tests: 1. Assertion directly related to the purpose of
investigation, i.e., hypothesis to be tested 2. Assertion to make a probability statement
Set of all assertions is called the model
Testing a hypothesis without a model is non-parametric test. I.o.w., tests which do not make
basic assumptions about and without having the knowledge of the distribution of the
population parameters
Characteristics
1. Do not depend on any assumptions about properties / parameters of the parent
population, I.e., do not suppose any particular distribution & consequential assumptions
(Parametric tests like ‘t’ & ‘F’ tests make assumption about homogeneity of the
variances) & No such assumptions or less restricting assumptions
2. When measurements are not so accurate, non-parametric tests come very handy
3. Most non-parametric tests assume only nominal or ordinal data I.e., more suitable (than
parametric tests) for nominal & ordinal (or rated data)
4. Involves few arithmetic computations
5. Usually less efficient & powerful than parametric tests as they are based on no
assumption
6. Greater risk of accepting a false hypothesis and committing type II error; Non-parametric
tests require more observations than parametric tests to achieve the same size of type I
and type II errors
7. Null hypothesis is somewhat loosely defined & hence rejection of null hypothesis may
lead to less precise conclusion than parametric tests
8. It is a trade off between loss in sharpness of estimating intervals and gain in the ability
of using less information & to calculate faster
M S Sridhar, ISRO Testing of Hypotheses 43
Non-parametric or distribution-free tests …Contd.
Some important applications are
(I) concerning single value for the given data
(II) difference among 2 or more sets of data
(III) relations between variables
(IV) variation in the given data
(V) randomness of a sample
(VI) association or dependency of categorical data
(VII) comparing theoretical population with actual data in categories
Typical situation
1. Data not likely to be normally distributed
2. Nominal data from responses to questionnaire
3. Partially filled questions, i.e., to handle incomplete / missing data.
I.o.w., to make necessary adjustments to extract maximum
information from average data
4. Reasonably good results from even very small sample but need
more observations than parametric tests to achieve the same size
of type I and type II errors

M S Sridhar, ISRO Testing of Hypotheses 44


One Sample Tests
They are tests for goodness of fit
¾ Significant difference between the observed & expected frequency
¾ Reasonableness to believe that the sample has been drawn from a
specified population
¾ Reasonableness to accept that the sample is a random sample from
some known population
1. KOLMOGOROV-SMIRNOV ONE SAMPLE TEST : Degree of agreement
between the distribution of observed values and some specified
theoretical distribution on ordinal scale assumes that the variable’s
distribution is continuous
Example: A sample of 160 users are questioned about how do they rate
a library & replies recorded
___________________________________________________________________
RATING
___________________________________________________________________
Excellent Very good Good Poor
___________________________________________________________________
No. of Users 30 45 60 25
Sn(x) = Observation Cumulative
Distribution 0.1875 0.4688 0.8438 1.0000
F0(x) = Theoretical cumulative
Distribution 0.25 0.50 0.75 1.0
___________________________________________________________________
| F0(x) - Sn(x) | 0.0625 0.0312 0.0938 0
--------------------------------------------------------------------------------------------------------------
___________________________________________________________________
M S Sridhar, ISRO Testing of Hypotheses 45
One Sample Tests: …contd.
1. Kolmogorov- Smirnov One Sample Test …contd.
D = MAX |F0(x) - Sn(x)| = 0.0938
Critical value of ‘D’ at 5% significance for large ‘n’ is
1.36 1.36
= --------- = --------- = 0.1075
√n √160
Hence null hypothesis is not rejected
H0 = There is no significant preferred rating of library at 5% significance
level

2. RUNS TEST FOR RANDOMNESS


To test the randomness of a sample based on the order or sequence in
which the individual observations occurred
Run is a sequence of identical symbols or element s which are followed
and preceded by different types of symbols or elements or no symbols
on either side
The total number of runs is an indication of whether or not the sample is
random; Too few or too many runs indicate lack of non randomness

M S Sridhar, ISRO Testing of Hypotheses 46


2. RUNS TEST FOR RANDOMNESS … contd.
Example: The arrival pattern of 60 users/visitors to a lib counter by their
gender is as follows
MMWWWMWWMMWWWWMMMWWMMWMMMWWWMM
WWMMWWMWWMMWWMWWMMWW
H0: The gender wise arrival pattern of users to library is random
H1: The gender wise arrival pattern of users to library is not random
No. of males arrived, n1 = 23
No. of women arrived, n2 = 27 Total, n = n1 + n2 =50
Test Statistics (n>20) Run, r = 24
2(n1)( n2) √ 2(n1)( n2)(2n1n2 -n1- n2)
Mean, E(r)= -------------- + 1 S. D. ( r ) = ---------------------------------
n 1 + n2 √ (n1+ n2)2(n1+n2-1)
|r – E(r)|
/z/ = -------------- If n≤ 20, table can be used to find critical value of
S.D.(r) r at α = 0.05
(2)(23)(27)
E(r ) = ----------------- + 1 = 25.8 S.D (r ) = 3.48
23 + 27
|24 - 25.81|
/z/ = ------------------ = 0.52
3.48
At α = 0.05, critical value of Z=1.96, hence null hypo accepted
M S Sridhar, ISRO Testing of Hypotheses 47
3. ONE SAMPLE SIGN TEST
¾ When sample is taken from a continuous symmetrical population
¾ The probability that the sample value < mean and > mean is 1/2
¾ For small sample binomial probability table is used
¾ For large sample [n(1-p) >5] normal distribution (Z) is used
Example: The number of books issued in a library for 11 days is
as follows. Use the sign test at α = 0.05 to test the null
hypothesis that the average issue.
µµ0 = 284 as against the alternative hypothesis is µh0 < 284.
280, 282, 290, 273, 283, 283, 275, 284, 279 and 281
Replace sample values > µ0 by + and < µ0 by - (=µ0 are
ignored)
- - + - - - - - - -
Examine whether one +sign observed in 10 trials support H0, the
probability of one or fewer successes with n=10 & p= ½ is
10C , p1q9 + 10C p0q10 = 10(½)1(½)9 + (1)(½)0(½)10
1 0
= 0.010 + 0.001 = 0.011
(Value can be had from table also)
Since the value is less than α = 0.05, H0 is rejected
M S Sridhar, ISRO Testing of Hypotheses 48
3. ONE SAMPLE SIGN TEST …contd.
Example 2: Daily arrival of number of issues of Journals in a
library is as follows. Use one sample sign test to test the Ho that
the average arrival μ=23 against Ha that μ < 23

17, 15, 20, 29, 19, 18, 22, 25, 27, 9, 24, 20, 17, 6, 24, 14, 15, 23, 24,
26, 19, 23, 28, 19, 16, 22, 24, 17, 20, 13, 19, 23, 24, 17, 20, 13, 19,
10, 23, 18, 31, 13, 20, 171, 24, 14
There are 12 +ve and 30 -ve signs
X = 12, i.e., Number of +ve or -ve signs whichever is lower

n=46, p=½, q= ½ H 0: p = ½ H1: p<½

X - np 12 - (46)(1/2)
Z = ------------ = ----------------------- = - 3.2437 ⇒ |Z | = 3.2437
√npq √(46) (½)(½)
As tabulated critical value of Z at α=0.05 is 1.645 H0 is rejected

M S Sridhar, ISRO Testing of Hypotheses 49


Two Sample Tests
To evaluate the effectiveness or responses if two treatments or methods
or stimuli administered either on two independent samples or the
same sample studied twice (i.e., before and after)
4. The sign test : Used when measurements of observations are on
a qualitative basis H0 p(XA>XB) = p(XA<XB) = ½
Example: Time taken by 8 scientists to carry out online search of a
database before and after imparting training are as follows:
Before training (in min) 9 7 3 16 12 12 5 6
After training (in min) 5 3 4 11 7 5 5 1
Use sign test to decide the effectiveness of training at α = 0.10

Signs are + + - + + + +
There are 6 + and 1 -
Probability of 6 or more successes in 7 trials with p= 1/2 is 0.063
(see binomial probability distribution table)
This is less than α = 0.10 hence Ho is rejected or the training is
effective
Note: For large sample (i.e., both n.p & n.q are > 5) normal
distribution can be used
M S Sridhar, ISRO Testing of Hypotheses 50
5. Fisher-Irwin Test
¾ To test that 2 different treatments are different in terms of the results they
produce, i.e., there is no difference among 2 sets of data
¾ Applicable for situations where observations of each item could be classified
to one of the 2 mutually exclusive categories
Example: No. Passed No. Failed Total
New Training (A) 5 1 6
Old Training (B) 3 3 6
-------------------------------------------------------
Total 8 4 12
H0: Two programmes are equally good
Probability of Group A doing as well or better = Probability (5 passing &
1 failing) + Probability (6 passing & 0 failing)
8C X 4C 8C X 4C 224 28
5 1 6 0
= --------------- + ------------------ = -------- + -------- = 0.24 + 0.03 = 0.27
12C 12C 924 924
6 6
Alternatively, probability of Group B doing as well or worse = Probability
(3 passing & 3 failing) + Probability (2 passing & 4 failing)
8C X 4C 8C X 4C
3 3 2 4
= --------------- + ------------------ = 0.27
12C 12C
6 6
Comparing this probability at α = 0.05 we find that H0 is valid

M S Sridhar, ISRO Testing of Hypotheses 51


Note: 1. Elementary Probability theory
‘n’ different object taken ‘r’ at a time. nCr nCr C(n,r), Cn,r, n
r
nC = nC Ex: 8C5 = 8C3
r n-r

n(n-1)……..(n-r+1) n! nP
r
nC = --------------------------- = ------------- = --------
r
r(r-1) …… 3.2.1 r!(n-r)! r!

8X7X6 336
8C = ----------------- = --------- = 56
3
3X2X1 6
Note 2. Probability table can also be consulted for given n and y

M S Sridhar, ISRO Testing of Hypotheses 52


6. Mc Nemer Test
Useful for testing nominal data of two related samples and before – after
measurements of the same subjects with a view to judge the significance for
any observed change after treatment
AFTER TREATMENT
Unfavorable Favorable

BEFORE Favorable A (200) B (300)


TREATMENT Unfavorable C (400) D (100)

H0: There is no change in people’s attitude before and after the treatment
H0: P(A) = P(D) , i.e., Probability (Favourable before + Unfavourable after)
= Probability (Unfavourable before + Favourable after)
(|A – D| - 1)2 (|200-100| - 1)2 (99)2
χ2 = ------------------ = -------------------- = --------- = 32.67 with df = 1
A+D 200 + 100 300
Table value of χ2 for df = 1 at α = 0.05 is 3.84. Hence null hypothesis is rejected
7. The Median Test
To test whether two independent samples belong to the same
population (or even different population) with same or different
sizes but same median
Combining both, sample median is determined and a 2x2 table is
formed by assorting items above the median and below the median
Example: PRECIS and POPSI were adopted for indexing 8 sets of
micro documents and given below are their effectiveness. Test
the hypothesis that there is no difference between these two
scores at α = 0.05
Set No. 1 2 3 4 5 6 7 8
A. PRECIS 49 32 44 48 51 34 30 42
B. POPSI 40 45 50 43 37 47 55 57
Combined series lead to median as 44.5
By grouping the elements above & below median
PRECIS POPSI Total
Above median 3 (a) 5 (b) 8 (n1)
Below median 5 (c) 3 (d) 8 (n2)

M S Sridhar, ISRO Testing of Hypotheses 54


7. The Median Test …contd.
Since the number of elements (n1 + n2) is small, we can find the
probability
n1 n2 8 8
a b 3 5
P = ---------------- = ------------ = 0.244
n1 + n2 16
a + b 8
Since this is greater than α = 0.005, H0 is accepted ie., effectiveness of
both PRECIS and POPSI has same median.
If number of elements is large use Chi-square test with the formula.
N [ |ad – bc| - N/2]2
χ2 = ---------------------------------- where N = n1 + n2, df = 1
(a+b)(c+d)(a+c)(b+d)

M S Sridhar, ISRO Testing of Hypotheses 55


8. Chi-Square Test
• An important non-parametric test for significance of association
as well as for testing hypothesis regarding (i) goodness of fit
and (ii) homogeneity or significance of population variance
• When responses are classified into two mutually exclusive
classes like favor - not favor, like - dislike, etc.
• To find whether differences exist between observed and
expected data

χ2 = Σ (Oij - Eij)2 / Eij


Where, Oij = Observed frequency of the cell in ith row & jth column
Eij = Expected frequency of the cell in ith row & jth column

Expected frequency total for the row x total for the column
of any cell = of that cell of that cell
Grand total
df = (c-1) (r-1)
If the calculated value of χ2 is equal or more than that of tabulated for the
given df the association is significant

M S Sridhar, ISRO Testing of Hypotheses 56


8. Chi-Square Test …contd.
Note:
1. χ2 is not a measure of degree of relationship
2. Assumes random observations
3. Items in the sample are independent
4. Constraints are liner, no cell contains less than five as frequency
value and over all no. of items must be reasonably large (Yate’s
correction can be applied to a 2x2 table if cells frequencies are
smaller than five); Use Kolmogorov - Smirnov Test
5. PHI Coefficient, φ = √ χ2 / N , as a non-parametric measure of
coefficient of correlation helps to estimate the magnitude of
association;
6. Cramer’s V-measure, V = φ2 / √min. (r-1), (c-1)
7. Coefficient of Contingency, C = √ χ2 / χ2 + N , also known as
coefficient of mean square contingency, is a non-parametric
measure of relationship useful where contingency tables are
higher order than 2x2 and combining classes is not possible for
Yule’s coefficient of association

M S Sridhar, ISRO Testing of Hypotheses 57


8. Chi-Square Test … contd.
Example 1: An opinion poll conducted by a library among its users about
the duration for which books should be issued showed the following
result: 15 days, 21 days & 30 days are respectively preferred by 18, 31 &
20 respondents. Test the data whether deference in observed data at 0.5
significance level
Duration of issue of books
15 days 21 days 30 days
Observed preference 18 31 20
Expected preference 23 23 23

(Oi - Ei)2 (18 - 23)2 (31 - 23)2 (20 - 23)2


χ2 = ∑ ---------- = ------------- + -------------- + --------------- = 4.261
Eij 23 23 23

df = x-1 = 3 - 1 = 2
Tabulated value of χ2 at 2 df and α = 0.05 is 5.991. Hence the H0 is
accepted or there is no significant difference

M S Sridhar, ISRO Testing of Hypotheses 58


8. Chi-Square Test …contd.
Example 2: given below is the data regarding reference queries received by a library.
Is there a significant association between gender of user and type of query ?
LR SR Total
query query
Male users 17 18 35
Female users 3 12 15
Total 20 30 50
Expectation of E11 = 20X35 / 50 = 14
Expected Frequencies Home work: A library has incurred the
L S Total following expenditure for two
M 14 21 35 different years. Is the pattern of
W 6 9 15 expenditure changed significantly
Total20 30 50 between the years ? (α = 0.5)
Cells Oij Eij (Oij - Eij) (Oij- Eij )2 / Eij
1,1 17 14 3 9/14 = 0.64 Year Expenditure in lakhs of Rupees
1,2 18 21 -3 9/21 = 0.43 Journals Books Others Total
2,1 3 6 -3 9/6 = 1.50 1990-91 55 23 14 92
2,2 12 9 3 9/9 = 1.00 1994-95 81 33 21 135
Total (∑) χ = 3.57
2
Total 136 56 35 227
df =(C-1) (r-1) = (2-1) (2-1) = 1
Table value of χ2 for 1 df at 5 % significance
is 3.841. Hence association is not significant
M S Sridhar, ISRO Testing of Hypotheses 59
9. Wilcoxon-Mann-Whitney U-Test
¾ Most powerful non-parametric test to determine whether two independent
samples have been drawn from the same population. Used as alternative to t-
test both for qualitative and quantitative data
¾ Both the samples are pooled together and elements arranged in ascending
order to find U
¾ For large sample, i.e., n2 larger than 20
U is approximated to follow normal distribution
n1 - n2 U1 + U2
Mean, µu = ------------- ( or ------------)
2 2

Standard Deviation, σu = √ n1n2 (n1+n2+1)/12

U - µu U - n1n2 / 2
Z = ------------ = -------------------------------
σu √ n1n2 (n1+n2+1)/12

M S Sridhar, ISRO Testing of Hypotheses 60


9. Wilcoxon-Mann-Whitney U-Test …Contd
Example 1: S1: 11, 14, 16 and S2: 8, 10, 12, 15

When neither of the samples (n1 & n2) is greater than 8, U is the number of
times that a score in the group with n2 elements precedes a score in the
group with n1 elements (if n1<n2)
8 10 11 12 14 15 16
(S2) (S2) (S1) (S2) (s1) (s2) (S2)
U=0+0+1+2=3
For U = 3, n1=3, n2=4 the probability p is 0.200, which is lower than α =
0.005 and hence H0 is accepted

When n2 is between 9 and 20


R1 = Sum of the ranks assigned to the values of 1st sample
R2 = Sum of the ranks assigned to the values of 2nd sample
n1(n1+1)
U1 = n1n2 + ---------------- - R1
2
n2(n2+1)
U2 = n1n2 + ---------------- - R2 Note: U1 + U2 = n1n2
2
U is defined as the smaller of two values U1 and U2

M S Sridhar, ISRO Testing of Hypotheses 61


9. Wilcoxon-Mann-Whitney U-Test …contd.
Example 2: Sample half-life of books in the areas of physics and chemistry
are as follows:
Physics : 6.9 11.2 14.0 13.2 9.1 13.9 16.1 9.3 2.4 6.4 18.0 11.5
Chemistry : 15.5 11.1 16.0 15.8 18.2 13.7 18.3 9.0 17.2 17.8 13.0 15.1

Test the hypothesis that there is no difference in the ‘half-life’ of two sets
of books
Combined rank: 2.4 6.4 6.9 9.0 9.1 9.3 11.1 11.2 11.5 13.0 13.2 13.7
13.9 14.0 15.1 15.5 15.8 16.0 16.1 17.2 17.8 18.0 18.2 18.3
R1 =113, R2 = 187,
U1 = 12(12)+12(13) / 2 - 113 = 109, U2 = 35

ie. ,R1 = 1 + 2 + 3 + 5 + 6 + 8 + 9 + 11 + 13 + 14 + 19 + 22 = 113


R2 = 4 + 7 + 10 + 12 + 15 + 16 + 17 + 18 + 20 + 21 + 23 + 24 = 187
For two tailed test at α = 0.05, n1=12, n2=12, U=37 which is less than
worked out U. Hence H0 is rejected, I.e., there is a difference between ‘half
life’ of books of physics & chemistry samples

M S Sridhar, ISRO Testing of Hypotheses 62


9. Wilcoxon-Mann-Whitney U-Test …contd.
Example 3 : Following are the scores obtained by two groups of
students in an examination. Test whether the two groups belong
the same population
Group A: 51, 68, 90, 81, 30, 46, 99, 98, 11, 06, 19, 43
Group B: 95, 82, 65, 85, 65, 81, 50, 60, 15, 05, 35, 52
Score : 05 06 11 15 19 30 32 35 43 46 50 51 60 65 65 68 81 81 82 85 90 95 98 99
Group : B A A B A A B B A A B A B B B A A B B B A B A A
Rank : 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
R1 = 148.5 R2 = 1515.5
n1(n1+1) 15(16)
U = n1n2 + ---------------- - R1 = 15 X 15 + ----------- - 148.5 = 196.5
2 2

196.5 - (15)(15) / 2 86
Z = ------------------------------- = ------------- = 3.84
√(15)(15)(31)/12 24.109
At 5% significance, the critical value of Z is 1.96
Hence H0 is rejected, I.e., two groups of students do not belong to the same
population
M S Sridhar, ISRO Testing of Hypotheses 63
10. Wilcoxon Matched Pair or Signed Rank Test
¾ Used in the context of two-related samples where we can
determine both direction and magnitude of difference. Examples:
wife & husband, subjects studied before & after experiment,
comparing output of two machines, etc.
¾ As it attaches greater weight to pair which shows a larger
difference it is more powerful test than sign test
¾ Null hypothesis (Ho ) is that there is no difference in the two
groups with respect to characteristics under study
Steps :
• Find the differences di between each pair of values
• Assign rank to the differences from smallest to largest without
regard to sign
• Find sum of the ranks of +ve &-ve separately
• T is the smaller of the two sums
• For small sample use table values of ‘T’ where ‘n’ is the number
of pairs (excluding those with di = 0)
• For large sample (n>25), Z test is used with
T - μT
μT = n(n + 1) / 4, σT = √ n(n+1)(2n+1) / 24 and Z = ------------
σT

M S Sridhar, ISRO Testing of Hypotheses 64


10. Wilcoxon Matched Pair or Signed Rank Test …contd.
Example: 16 subjects have evaluated sample from two brands judged on an ordinal
scale test the H0 that there is no difference between the perceived quality of the two
samples at α = 0.05
P a ir B ra n d B ra n d D iffe r e n c e R ank of R a n k w ith s ig n s
A B di I d iI + -
1 73 51 22 13 13
2 43 41 2 2 .5 2 .5
3 47 43 4 4 .5 4 .5
4 53 41 12 11 11
5 58 47 11 10 10
6 47 32 15 12 12
7 52 24 28 15 15
8 58 58 0 - - 1
9 38 43 -5 6 -6
10 61 53 8 8 8
11 56 52 4 4 .5 4 .5
12 56 57 -1 1 -1
13 34 44 -1 0 9 -9
14 55 57 -2 2 .5 -2 .5
15 65 40 25 14 14
16 75 68 7 7 7
T o ta l 1 0 1 .5 -1 8 .5
T = 1 8 .5
T a b le v a lu e o f T a t α = 0 .5 w h e n n = 1 5 is 2 5 (fo r 2 ta ile d te s t) H e n c e H 0 is
r e je c te d . ⇒ P e r c e iv e d q u a lity o f th e tw o s a m p le s a r e n o t s a m e .

M S Sridhar, ISRO Testing of Hypotheses 65


K Sample (i.e., more than two sample) Tests
11. Median Test : Extension of the median test for two samples; Elements are
pooled to find combined median and tabulated into 2 X k matrix with respect to
combined median
n1 n2 n3
For small sample, a X b X c
P = ------------------------------
n1 + n2 + n
a + b +
For large sample, Chi-square test is used.

12 The Kruskal-Wallis Test or H Test: Similar to U test; H0, ‘K’ individual


random samples come from identical universes; does not require
approximation of normal distribution as H follows Chi-square
distribution; use Chi-square table.
Steps: Samples are pooled together and ranked with lowest score rank
as 1
Sum of the ranks R1, R2, R3 etc are worked out
n = n1 + n2 +….+ nk
12 R2i
H = ----------- ∑k I=1 -------- - 3(n + 1) df = k-1
n(n+1) ni

M S Sridhar, ISRO Testing of Hypotheses 66


K Sample Tests (12. The Kruskal-Wallis Test or H Test: …contd.
Example: Time taken (in minutes) by three professional staff (A, B& C) in
a library to answer four short range reference queries are given
below. Test the null hypothesis that there is no significant (α =0.5)
difference in time taken by them

Time taken Rank Staff Data


3.8 1 C A 4.8 4.9 4.3 4.0
4.0 2 A B 4.2 4.8 5.0 4.6
4.1 3 C C 4.4 4.5 3.8 4.1
4.2 4 B
4.3 5 A n1 = n2 = n3 = 4, k = 3; n = 12
4.4 6 C
4.5 7 C R1 = 27, R2 = 34, R3 = 17
4.6 8 B
4.7 9 A 12 272 342 172
4.8 10 B H = ------------- X ------ + ------ + ----- - 3(12 + 1)
4.9 11 A 12(12+1) 3 3 3
5.0 12 B
= 543.5/ 13 - 39 = 2.8

Tabulated value of χ2 for df = 2 at α = 0.005 is 5.991. Hence H0 is accepted


low. There is no significant difference in time taken by three professor
staff to answer short range reference queries
M S Sridhar, ISRO Testing of Hypotheses 67
13. Kendall’s Coefficient of Concordance (W)
¾ Important non-parametric measure of association (W) among k sets of
ranking of N objects / individuals
¾ A standard method of ordering objects according to consensus
¾ Value of W varies from 0 (maximum disagreement among k judges) to 1
(perfect agreement among k judges)
¾ W does not take -ve value and is an index of divergence of actual
agreement
Steps
1. All objects(N) ranked by k judges is put in K X N Matrix
2. For each object, find the sum of ranks (Rj)
3. Determine Rj and S = Σ (Rj - ¯Rj)2
4. Workout S
W = -------------------------
1/12 k2 (N3 - N)
In case of tied rank use average method
Σ (t3 - t)
If ties are numerous, correction factor T = ----------------
12
t = No. of observations in a group tied for a given rank
S
W = ----------------------------------
1/12 k2 (N3 - N) - KΣT 68
M S Sridhar, ISRO Testing of Hypotheses
13. Kendall’s Coefficient of Concordance (W) …contd.
Steps continued
5. N ≤ 7 Use standard table for critical values of S for given N, k and
significance level
N > 7 Use χ2 value for judging W’s significance with df = N-1 for given
level of significance χ2 = k (N - 1) W
Note:
1. If W is significant, it only means that judges have essentially applied the
same standard in ranking and not that orderings observed are correct
i.e., W provides the bests estimate of the ‘true’ rankings by the order of
the various sums of ranks, Rj (best estimate is related to the lowest
value observed amongst Rj)
2. We can also be determined by averaging the rsj for all possible pairs of
ranking (i.e., W is linearly related to rs )

(kw - 1) k(k -1)


Average of rs = -------------- (All possible pairs kC
2 = -----------)
(k - 1) 2

It is very tedious if k is large

M S Sridhar, ISRO Testing of Hypotheses 69


13. Kendall’s Coefficient of Concordance …contd.
Example: Seven core journals in physics are ranked by four professionals in the
following way. Test the significance of agreement in ranking assigned by professors at
5% level. Also point out the best estimate of the true ranking.
Journals
Professor J1 J2 J3 J4 J5 J6 J7
A 1 3 2 5 7 4 6
B 2 4 1 3 7 5 6 k = 4
C 3 4 1 2 7 6 5
D 1 2 5 4 6 3 7 N = 7
Rj 7 13 9 14 27 18 24
( Rj - Rj )2 81 9 49 4 121 4 64

ΣRj = 112 ⇒ Rj = 16 S = Σ ( Rj - Rj )2 = 332

Since N ≤ ? Comparing the value of S with the critical value in table for k=4 & N = 7 at
5% significance level, i.e., 217.0 H0 is rejected. Hence professors are applying
essentially the same standard in ranking the journals, I.e. W is significant.
S 332
W = ------------------------ = ------------------------- = 0.741
1/12 k2 (N3 - N) 1/12 (42)(73 - 7)
The lowest value observed amongst Rj is 7. As such the best estimate of true rankings
is in the case of journal J1 low. In other words, professors on the whole place the
journal J1 as first.

M S Sridhar, ISRO Testing of Hypotheses 70


References
1. Anderson, Jonathan, et. al. Thesis and assignment writing. New Delhi: Wiley,
1970.
2. Best, Joel. Damned lies and statistics. California: University of California
Press, 2001.
3. Best, Joel. More damned lies and statistics; how numbers confuse public
issues. Berkeley: University of California Press, 2004
4. Body, Harper W Jr. et.al. Marketing research: text and cases. Delhi: All India
Traveler Bookseller, 1985.
5. Booth, Wayne C, et. al. The craft of research. 2 ed. Chicago: The University of
Chicago Press, 2003.
6. Chandran, J S. Statistics fdor business and economics. New Delhi: Vikas,
1998.
7. Chicago guide to preparing electronic manuscripts: For authors and publishers.
Chicago: The University of Chicago Press, 1987.
8. Cohen, Louis and Manion, Lawrence. Research methods in education. London:
Routledge, 1980.
9. Goode, William J and Hatt, Paul K. Methods on social research. London; Mc
Graw Hill, 1981.
10. Gopal, M.H. An introduction to research procedures in social sciences.
Bombay: Asia Publishing House, 1970.
11. Koosis, Donald J. Business statistics. New York: John Wiley,1972.
M S Sridhar, ISRO Testing of Hypotheses 71
References …Contd.
12. Kothari, C.R. Research methodology: methods and techniques. 2 ed., New
Delhi: Vishwaprakashan, 1990.
13. Miller, Jane E. The Chicago guide to writing about numbers. Chicago: the
University of Chicago Press, 2004.
14. Rodger, Leslie W. Statistics for marketing. London: Mc-Graw Hill, 1984.
15. Salvatoe, Dominick. Theory and problems of statistics and econometrics
(Schaum’s outline series). New York: McGraw-Hill, 1982.
16. Spiegel, Murray R. Schauim’s outline of theory and problems of statistics in
SI units. Singapore: Mc Graw Hill , 1981.
17. Simpson, I. S. How to interpret statistical data: a guide for librarians and
information scientists. London: Library Association, 1990.
18. Slater, Margaret ed. Research method in library and information studies.
London: Library Association, 1990.
19. Turabian, Kate L. A manual for writers of term papers, theses, and
dissertations. 6 ed. Chicago: The University of Chicago, 1996.
20. Young, Pauline V. Scientific social surveys and research. New Delhi:
Prentice-Hall of India Ltd., 1984.
21. Walizer, Michael H and Wienir, Paul L. Research methods and analysis:
searching for relationships. New York: Harper & Row, 1978.
22. Williams, Joseph M. Style: towards clarity and grace. Chicago: The
University of Chicago Press, 1995.
M S Sridhar, ISRO Testing of Hypotheses 72
About the Author

Dr. M. S. Sridhar is a post graduate in Mathematics and Business


Management and a Doctorate in Library and Information Science. He
is in the profession for last 36 years. Since 1978, he is heading the Library
and Documentation Division of ISRO Satellite Centre, Bangalore. Earlier
he has worked in the libraries of National Aeronautical Laboratory
(Bangalore), Indian Institute of Management (Bangalore) and University
of Mysore. Dr. Sridhar has published 4 books, 81 research articles, 22
conferences papers, written 19 course materials for BLIS and MLIS, made
over 25 seminar presentations and contributed 5 chapters to books. E-mail:
sridharmirle@yahoo.com, mirlesridhar@gmail.com, sridhar@isac.gov.in ;
Phone: 91-80-25084451; Fax: 91-80-25084476.

M S Sridhar, ISRO Testing of Hypotheses 73

You might also like