HYPOTHESIS TESTING
Dr. Gururaj Phatak
Topics Covered
• Introduction : Meaning
• Types of Hypothesis
• Characteristics of Hypothesis
• Sources of Hypothesis
• Errors in Hypothesis
• Formulation of Hypothesis
Important Questions asked in Exam
• Define Hypothesis and List the types of Hypothesis.
• What is Significance Level.
• Define Null and Alternative Hypothesis.
• Explain Type -I and Type – II Errors.
• Differentiate between Parametric and Non- Parametric Test.
• What is Univariate, Bivariate and Multivariate Analysis?
• Write a note on Chi-square Test
• Explain when to use t-test, z-test, f- test, u-test, K-W –Test.
• Bivariate and Multivariate Analysis- ANOVA-one-way and two-way.
Hypothesis
Meaning:
• A hypothesis is an assumption or a statement that may or may not be
true. The hypothesis is tested on the basis of information obtained
from a sample.
• a mere assumption or some supposition to be proved or disproved
• It is the process of Validating the theories or concepts using statistical
tools.
Hypothesis - Definition
• A hypothesis can be defined as a logically conjectured relationship
between two or more variables expressed in the form of a testable
statement.
• Relationships are estimated on the basis of the network of
associations established in the theoretical framework formulated for
the research study.
• By testing the hypotheses and confirming the estimated relationships,
it is expected that solutions can be found to correct the problem
encountered.
Null and Alternate Hypothesis*****
• Null Hypothesis: Null means No
• The hypotheses that are proposed with the intent of receiving a
rejection for them are called null hypotheses.
• In general, the null statement is expressed as no (significant)
relationship between two variables or no (significant) difference
between two groups.
• It is denoted as 𝐻0
• Alternate Hypothesis: can cover a whole range of value rather than a
single point.
• In general, the Alternate statement is expressed as there is a
(significant) relationship between two variables or there is a
(significant) difference between two groups.
• It is denoted as 𝐻1 or 𝐻𝑎
Null and Alternate Hypothesis*****
Examples of Null and Alternate Hypothesis
• H0 ∶ There is no relationship between Employee Absenteeism and Firm Performance.
• H1 : There is a relationship between Employee Absenteeism and Firm Performance.
• H0 ∶ There is no relationship between Investor behaviour and Stock Market Performance
• H1 : There is a relationship between Investor behaviour and Stock Market Performance
• H0 ∶ There is no relationship between Success of a Movie and Hero Performance
• H1 : There is a relationship between Success of a Movie and Hero Performance
• Note:
• H0 ∶ Null Hypothesis
• H1 : Alternate Hypothesis
Characteristics of Hypothesis
• Clear and Precise.
• Hypothesis should be capable of being tested.
• Hypothesis should be limited in scope and must be specific.
• Hypothesis should be consistent with most known facts (Strong
Theoretical Base)
• Hypothesis should state relationship between variables.
Sources of Hypothesis
• Theory
• Observation
• Past Experiences
• Case Studies
• Similarity
Errors in Hypothesis Testing *3M
• Type I and Type II Error:
• The acceptance or rejection of a hypothesis is based upon sample
results and there is always a possibility of sample not being
representative of the population.
Type I and Type II Error
• A hypothesis is a statement or assertion about the state of nature (about the true value of an
unknown population parameter):
• Consider in a Court Scene
The accused is innocent (Null Hypothesis)
  = 100
• Every hypothesis implies its contradiction or alternative (Alternative Hypothesis)
The accused is guilty
 100
• A hypothesis is either true or false, and you may fail to reject it or you may reject it on the
basis of information:
Trial testimony and evidence
Sample data
Type I and Type II Error
• One hypothesis is maintained to be true until a decision is
made to reject it as false:
• Considering in a Court Scene
• Scene -1 : Ho is true Accept Ho
• He is innocent kindly court has to release him
• Scene – 2: Ho is true Reject Ho
• He is innocent but you proved him as guilty. (Type – I Error)
• Scene -3: Ho is False Accept Ho
• He is Guilty but you are proved him as innocent(Type – II Error)
• Scene – 4: Ho is False Reject Ho
• He is guilty take him for imprisonment
Decision Innocent Guilty
Innocent
(Do not Reject
Ho)
Correct
Decision
Type I Error
α
Guilty
(Accept Ho)
Type II Error
β
Correct
Decision
Ho is True
Ho is False
Accept Ho Reject Ho
Example for Fun Decision Love U Don’t Love U
Love U
(Do not Reject
Ho)
Correct
Decision
Type I Error
α
Don’t Love U
(Accept Ho)
Type II Error
β
Correct
Decision
Ho is True
Ho is False
Accept Ho Reject Ho
Decision Submitted
Assignments
Not Submitted
Assignment
Submitted
Assignment
(Do not Reject
Ho)
Correct
Decision
Type I Error
α
Not Submitted
Assignment
(Accept Ho)
Type II Error
β
Correct
Decision
Ho is True
Ho is False
Accept Ho Reject Ho
In Movies the Actors/Actresses
• Rejecting the Null Hypothesis When it is Ture – Type – I Error
• Accepting the Null Hypothesis when it False – Type – II Error
Type I and Type II Error
Decision Accept Ho Reject Ho
Ho is Ture
Correct
Decision
Type I Error
α
Ho is False
Type II Error
β
Correct
Decision
•A decision may be incorrect in two ways:
Type I Error: Reject a true H0
•The Probability of a Type I error is
denoted by .
Type II Error: Fail to reject a false H0
•The Probability of a Type II error is
denoted by .
Important Terms
• Confidence Level: The confidence level is the probability that a confidence interval will
include the population parameter.
• Ex: 90% 95% and 99%
• Level of Significance: denotes the probability of rejecting the null hypothesis when it is
true. It is denoted by α.
• If Confidence Interval is 95%
• Then Significance Level will be 100-95 =5 % i.e. 0.05 0.10 - 0.082 100-99= 10/100=0.01
0.567 0.087
• P-Value:
• P-value is the probability that we would have seen our data (or something more
unexpected) just by chance if the null hypothesis (null value) is true.
• P-values are essentially the significance level.
• In essence, we are calculating the probability that the hypothesis is true. It summarizes
the credibility of the null hypothesis.
• P low Null Go
Hypothesis Testing Procedure :*7M or 10M
1. Setting up of a hypothesis: Define Ho and Ha
2. Setting up of a suitable significance level: 0.05 or 0.1
3. Determination of a test statistic
4. Determination of critical region
5. Computing the value of test-statistic
6. Making decision: Accept or Reject Ho
Setting up of a hypothesis: Define Ho and Ha
• The null hypothesis is the hypothesis of the population parameter taking a specified
value.
• In case of two populations, the null hypothesis is of no difference or the difference taking
a specified value. The hypothesis that is different from the null hypothesis is the
alternative hypothesis.
• If the null hypothesis H0 is rejected based upon the sample information, the alternative
hypothesis H1 is accepted.
Setting up Significance Level
• Confidence refers to the probability that our estimations are correct.
That is, it is not merely enough to be precise, but it is also important
that we can confidently claim that 95% of the time our results would
be true and there is only a 5% chance of our being wrong. This is also
known as confidence level.
• In social science research, a 95% confidence level—which implies that
there is only a 5% probability that the findings may not be correct—is
accepted as conventional, and is usually referred to as a significance
level of .05 (p = .05)
99% - 0.01 = 0.01/2 = 0.005 two tailed test
95% - 0.05 = 0.05/2= 0.025
90% -0.1 = 0.05
p-value >= Accept Ho
< = Reject Ho
0. 011
Determination of a test statistic
• The next step is to determine a suitable test statistic and its
distribution. As would be seen later, the test statistic could be t, Z, χ2
or F,
Determination of critical region
• Before a sample is drawn from the population, it is very important to
specify the values of test statistic that will lead to rejection or
acceptance of the null hypothesis.
• The one that leads to the rejection of null hypothesis is called the
critical region.
• Given a level of significance, α, the optimal critical region for a two-
tailed test consists of that α/2 per cent area in the right hand tail of
the distribution plus that α/2 per cent in the left hand tail of the
distribution where that null hypothesis is rejected.
• Critical Region:
If test statistic falls in some interval which support alternative
hypothesis, we reject the null hypothesis. This interval is called
rejection region
It test statistic falls in some interval which support null hypothesis,
we fail to reject the alternative hypothesis. This interval is called
acceptance region
The value of the point, which divide the rejection region and
acceptance one is called critical value
Computing the value of test-statistic
• The next step is to compute the value of the test statistic based upon
a random sample of size n. Once the value of test statistic is
computed, one needs to examine whether the sample results fall in
the critical region or in the acceptance region.
Making decision: Accept or Reject Ho
• The hypothesis may be rejected or accepted depending upon
whether the value of the test statistic falls in the rejection or the
acceptance region. Management decisions are based upon the
statistical decision of either rejecting or accepting the null hypothesis.
Population Parameter Sample Statistics
Statistical measures representing the
1.population mean (µ)
2.Population stddeviation (σ)
3.population proportion (p)
are called parameter.
Statistical measure representing
1.Sample mean (ẍ)
2. Sample proportion (p1)
3. Sample std. Deviation (s)
are called sample statistics.
Population parameter and Sample statistics
If Population parameter is tested based on sample statistics. then it is
called Parametric testing ,when the data is Normal
Hypothesis testing is used to compare
1. Averages
2. Proportions
To
compare
the
averages
One sample
1 sample t test
(σ is unknown)
1 sample Z test
(σ is known)
EXAMPLE: Maruti claims that his
vehicle will give 20km/litre. To test
his claim the data collected from 100
maruti customers w.r.t the fuel
consumption , to check whether
maruti’s claim is valid or not.
HYPOTHESIS TESTING
Two samples
2 sample t
test
K samples
(more than 2
samples)
Analysis of
variance test
(ANOVA)
EXAMPLE:To compare is there
any significant difference in the
average life of MRF tyres and
CEAT tyres
EXAMPLE:To compare is there
any significant difference
between four fertilizers with
regard to average yield
Data Type
X – Discrete
Y - Continuous
To compare
the
proportions
One sample
1 proportion
test
EXAMPLE:
Shop keeper claims that 60% of the
customers entering the shop do not
buy anything. Test whether the shop
keeper claim is valid from the samples
collected .
HYPOTHESIS TESTING
Two samples
2 Proportion
test
K samples
(more than 2
samples)
Chi-square
test
EXAMPLE:
ITC wants to check whether the
smoking habit differs significantly in
two states.
EXAMPLE:
TATA Motors wants to know whether
their nano car appeals to all the age
groups
Data type
Input X -
Output Y -
DISCRETE
DISCRETE
Continuous Y and Discrete X
Y is Continuous & X
Factor is Discrete
Compare 2
Populations/Samples with
Each Other
Compare More than 2
Populations /Samples
with Each Other
comparison of
medians
No
Mann Whitney
Test for
Is Y1 & Y2
Normal?
Yes
variances
Yes
Compare
means using 2
Sample T
assuming equal
variances
No
Compare
means using 2
Sample T
assuming
unequal
comparison of
medians
Are
Variances
Equal?
Yes
One-Way
ANOVA Test to
compare
means
Is Y1 …YN
Normal?
Yes
No
Kruskal-
WallisTest for
Are
Variances
Equal?
No
Compare
means in pairs
using 2 sample
t test
Analysis for Y Discrete, X Discrete
Y factor is Discrete
&
X Factor is Discrete
Compare 1 Population
with External Standard
Compare 2 Populations
with Each Other
Compare More than 2
Populations with Each
Other
1Proportion
Test
2 Proportion
Test Chi-Squared Test
• Parameters and Statistics:
A parameter is a number that describes the population. A
parameter is a fixed number, but in practice we do not know
its value because we cannot examine the entire population.
A statistic is a number that describes a sample. The value of a
statistic is known when we have taken a sample, but it can
change from sample to sample. We often use a statistic
to estimate an unknown parameter.
Sample Error (standard Error):
The standard deviation of the sample statistic is called standard
error of the statistics.
For example, if different samples of the same size n are drawn
from a population, we get different values of sample mean (x-
bar).
The S.D. of (x-bar) is called standard error of (x-bar).
Standard error of (x-bar) will depend upon the size of the sample
and the variability of the population.
It can be derived that S.E. = (σ / √n).
Standard errors of some well known statistics:
NO. STATISTICS S.E
1. Mean (x-bar)
2. Difference between two means
3. Sample Proportion p
4. Difference between two
proportions
P1’ – p2’
n

1 2
x  x 
1


2 2
2
n1 n2
P Q
n
P1Q1

P2Q2
n1 n2
Uses of S.E:
1) To test whether a given value of a statistic differs significantly from
the intended population parameter.
i.e. whether the difference between value of the sample
statistic and population parameter is significant and the
difference may be attribute to chance.
2) To test the randomness of a sample i.e. to test whether the given
sample be regarded as a random sample from the population.
3) To obtain confidence interval for the parameter of the population.
4) To determine the precision of the sample estimate, because
precision of a statistic
= 1/ S.E. of the statistic
Type I and type II Errors:
 In testing of a statistical hypothesis the following situations
may arise:
1) The hypothesis may be true but it is rejected by the test.
2) The hypothesis may be false but it is accepted by the test.
3) The hypothesis may be true and is accepted by the test.
4) The hypothesis may be false and is rejected by the test.
 (3) and (4) are the correct decisions while (1) and (2) are
errors.
 The error committed in rejecting a hypothesis which is true
is called Type-I error and its probability is denoted by α
 The error committed in accepting a hypothesis which is
false is called Type-II error and its probability is denoted by
β.
Accept Reject
Ho is true Correct decision Type – I error
Ho is false Type-II error Correct decision
Level of Significance:
 In any test procedure both the types of errors should be kept
minimum.
 They are inter-related it is not possible to minimize both the
errors simultaneously.
 Hence in practice, the probability of type-I error is fixed and
type –II error is minimized.
 The fixed value of type-I error is called level of significance
and it is denoted by α.
 Thus level of significance is the probability of rejecting a
hypothesis might to be accepted.
 Most commonly used l.o.s. are 5% and 1%.
 When decision is taken at 5% l.o.s., it means that in 5 cases out
of 100, it is likely to reject a hypothesis which might to be
accepted.
i.e. our decision to reject Ho is 95% correct.
Critical Region:
If test statistic falls in some interval which
support alternative hypothesis, we reject the null
hypothesis. This interval is called rejection region
It test statistic falls in some interval which support
null hypothesis, we fail to reject the alternative
hypothesis. This interval is called acceptance
region
The value of the point, which divide the rejection
region and acceptance one is called critical value
24 -
19
One-Sided or One-Tailed Hypothesis Tests
In most applications, a two-sided or two-tailed
hypothesis test is the most appropriate approach. This
approach is based on the expression of the null and
alternative hypotheses as follows:
H0:  = 170 vs H1:  ≠ 170
To test the above hypothesis, we set up the rejection
and acceptance regions as shown on the next slide,
where we are using  = 0.05.
Reject
H0
0.025
Reject
H0
0.025
Accept
H0
Z
0.9
5
In this example, the rejection region probabilities are
equally split between the two tails, thus the reason for
the label as a two-tailed test.
This procedure allows the possibility of rejecting the
null hypothesis, but does not specifically address, in
the sense of statistical significance, the direction of the
difference detected.
There may be situations when it would be appropriate to
consider an alternative hypothesis where the
directionality is specifically addressed. That is we may
want to be able to select between a null hypothesis and
one that explicitly goes in one direction. Such a
hypothesis test can best be expressed as:
H0:  = 170 vs H1:  > 170
The expression is sometimes given as:
H0:  ≤ 170 vs H1:  > 170
The difference between the two has to do with how the null
hypothesis is expressed and the implication of this
expression.
The first expression above is the more theoretically correct
one and carries with it the clear connotation that an outcome
in the opposite direction of the alternative hypothesis is not
considered possible.
This is, in fact, the way the test is actually done.
The process of testing the above hypothesis is identical to
that for the two-tailed test except that all the rejection region
probabilities are in one tail.
For a test, with α = 0.05, the acceptance region would be,
for example, the area from the extreme left up to the point
below which lies 95% of the area.
The rejection region would be the 5% area in the upper
tail.
24 -
25
Critical values at important level of significance
are given below.
1% 5% 10%
Two tailed test 2.58 1.96 1.645
One tailed test 2.33 1.645 1.282
(B) Testing Of Hypothesis -2:
Introduction:
• The value of a statistics obtained from a large sample is
generally close to the parameter of the population.
• But there are situations when one has to take a small sample.
E.g. if a new medicine is to be introduced, a doctor cannot
test the new medicine by giving it to many patients.
• Thus he takes a small sample.
• Generally a sample having number of observations less
than or equal to 30 is regarded as a small sample.
Difference between Large and Small sample
Sr. No. Large sample Small sample
1. The sample size is greater than 30. The sample size is 30 or less than 30
2.
The value of a statistic obtain from the
sample can be taken as an estimate of the
population parameter.
The value of a statistic obtain from
the sample can not be taken as an
estimate of the population
parameter.
3. Normal distribution is used for testing.
Sampling distribution like t, F etc. are
used for testing.
Degree of freedom:
• Degree of freedom is the number of independent observations of the
variable.
• The number of independent observations is different for different
statistics.
• Suppose we are asked to select any five observation. There is no
restriction on the selection of these observations. Hence degree of
freedom is 5.
• Suppose we want to select five observations whose sum is 100. Here four
observations can be can be selected freely but the 5th observation is
automatically selected by the restriction of total 100.
• We are not free to select all the five observations but our freedom is
restricted to the selection of only 4 observations.
• Thus the degree of freedom for selecting n observation when one
such restriction is given is n-1.
• If two such restrictions are given the degree of freedom will be n-2.
Statistical Test
3
• These are intended to decide whether a
hypothesis about distribution of one or more
populations should be rejected or accepted.
• These may be:
Statistical
Test
Parametric
Test
Non
Parametric
Test
These tests the statistical significance of the:-
1) Difference in sample and population means.
2) Difference in two sample means
3) Several population means
4) Difference in proportions between sample and
population
5) Difference in proportions between two
independent populations
6) Significance of association between two
variables
55
Parametr
ic
By Aniruddha Deshmukh - M. Sc. Statistics, MCM
Parametric analysis to test
group means
Information about population
is completely known
Specific assumptions are
made
regarding the population
Applicable only for variable
Samples are independent
Non-
Parametric
Nonparametric analysis to
test group medians
No Information about
the population is
available
No assumptions are made
regarding population
Applicable to both variable
and attributes
Not necessarily the samples
are Independent
Parametr
ic
By Aniruddha Deshmukh - M. Sc. Statistics, MCM
• Assumed normal distributions
• Handles Interval data or Ratio
• data
• Results can be significantly
affected by outliers
• Perform well when the spread of each
group is different, might not provide valid
results if groups have a same spread
• Have more statistical power
Non-
Parametric
No Assumed Shape /
distribution
Handles Ordinal data, Nominal
(or Interval or Ratio), ranked
data
Results cannot be
seriously affected by
outliers
Perform well when the spread
of each group is same, might
not provide valid results if
groups have a different
spread
Tofind the answer, start with the scale of measurement
• define anattribute
• e.g. gender, matital status
Nominal
• rank or order the observations as
scoresorcategories from low to high
in terms of «more orless»
• e.g. education, attitude/opinionscales
Ordinal
14.10.2014 3
• interval between observations in
terms of fixed unit of measurement
• e.g. measures of temperature
Interval
• The scale has a fundamentalzero
point
• e.g. age, income
Ratio
Nonparametric
Nonparametric
*Parametric
*Parametric
*may beused
In addition to scale of measurement, we should look at
the population distribution.
Population is normallydistributed
• Nonparametric
• (have to beused)
Not normally distributed population
or no assumption can be made about
the populationdistribution
• Parametric
• (may beused)
14.10.2014 4
Normal Distribution
 a very common continuous probability distribution
 All normal distributions are symmetric.
 bell-shaped curve with a single peak.
 68% of the observations fall within 1 standard deviation of
the mean
 95% of the observations fall within 2 standard deviations of
the mean
 99.7% of the observations fall within 3 standard deviations
of the mean
 for a normal distribution, almost all values lie within 3
standard deviations of the mean
14.10.2014 6
Touse parametric tests, stay tuned…
 Interval or ratio data are required.
 Normal distribution is required.
+
Homogeneity of variance
Homogeneity of Variance
 The variance is a measure of the dispersion of the random variable
about the mean. In other words, it indicates how far the values
spread out.
 It refers to that variance within each of population is equal.
 Homogeneity of Variances is assessed by Levene’s test. (T-test and
ANOVA use Levene’s test.)
Parametric or nonparametric – Determination
 In cases where
 the data which are measured by interval or ratio scale come
from a normal distribution
 Population variances are equal
parametric tests are used.
 In cases where
 the data is nominal or ordinal
 the assumptions of parametric tests are inappropriate
nonparametric tests are used.
14.10.2014 8
Parametric or nonparametric – Determination
14.10.2014 9
Type of data
Metric
Are the data
approximately
normally
distributed?
Yes
No
Are the
variances of
populations
equal?
Categorical Nonparametric Tests
Parametric Tests
Nonparametric Tests
No Nonparametric Tests
Yes
Parametric test
for Means
By Aniruddha Deshmukh - M. Sc. Statistics, MCM
1 sample t-test
2sample t-test
One-Way
ANOVA
Factorial DOE with one factor
and one blocking variable
Non-Parametric test
for Medians
• 1-sample Sign, 1-sample
• Wilcoxon
• Mann-Whitney test
• Kruskal-Wallis, Mood’s median te
• Friedman test
Parametric Tests
Perform well with skewed and non-normal distributions:
This may be a surprise but parametric tests can perform well with
continuous
data that are non-normal if you satisfy these sample size guidelines.
Parametric analyses Sample size guidelines for non-normal
data
1 sample t test Greater than 20
2 sample t test Each group should be greater than 15
One-Way
ANOVA
By Aniruddha Deshmukh - M. Sc. Statistics,
MCM
6
6
If you have 2-9 groups, each group should
be
greater than 15.
If you have 10-12 groups, each group
should be greater than 20.
Parametric or Non-Parametric Determination
Non-
Parametr
ic Tests
Type of Data
Categorical Metric
Are the Data approximately normally
distributed?
N
O
Non-
Parametr
ic Tests
YE
S
Are the variances of populations
equal?
N
O
Non-
Parametric
Tests
YE
S
Parametric
Tests
By Aniruddha Deshmukh - M. Sc. Statistics,
MCM
6
7
Parametric Non-parametric
Assumed distribution Normal Any
Assumed variance Homogeneous Any
Typical data Ratio or Interval Ordinal or Nominal
Data set relationships Independent Any
Usual central measure Mean Median
Benefits Can draw more conclusions
Simplicity; Less affected by
outliers
Tests
Choosing Choosing parametric test Choosing a non-parametric test
Correlation test Pearson Spearman
Independent measures, 2
groups
Independent-measures t-test Mann-Whitney test
Independent measures, >2
groups
One-way, independent-
measures ANOVA
Kruskal-Wallis test
Repeated measures, 2
conditions
Matched-pair t-test Wilcoxon test
Repeated measures,
>2 conditions
One-way,
repeated
Friedman's test
By Aniruddha Deshmukh - M. Sc. Statistics,
MCM
6
8
Conclusive Thoughts
Statistical Test Alternatives: Parametric - Nonparametric
14.10.2014 10
Output variable
Nominal Ordinal Interval - Ratio
Input
variable
Nominal Chi-square
Mann Whitney
Kruskal – Wallis
Unpaired t-test or
Mann Whitney
Paired t-test or Wilcoxon
Analysis of variance or
Kruskal – Wallis
Ordinal
Chi-square
Mann Whitney
Spearman Rank
Linear regression or
Spearman
Interval
Ratio
Logistic
regression
Poisson regression
Pearson’s r,
Linear regression or
Spearman
NON PARAMETRIC TEST
Parametric Vs Non-parametric Tests
Parametric Tests:
• The population mean (μ), standard deviation (s)
and proportion (p) are called the parameters of a
distribution.
• Tests of hypotheses concerning the mean and
proportion are based on the assumption that the
population(s) from where the sample is drawn is
normally distributed.
• Tests based on the above parameters are called
parametric tests.
Parametric Vs. Non-parametric Tests
Non-Parametric Tests:-
• There are situations where the populations under study are
not normally distributed. The data collected from these
populations is extremely skewed. Therefore, the
parametric tests are not valid.
• The option is to use a non-parametric test. These tests are
called the distribution-free tests as they do not require any
assumption regarding the shape of the population
distribution from where the sample is drawn.
• These tests could also be used for the small sample sizes
where the normality assumption does not hold true.
Advantages of Non-Parametric Tests
• They can be applied to many situations as they do not have
the rigid requirements of their parametric counterparts,
like the sample having been drawn from the population
following a normal distribution.
• There can be applications where a numeric observation is
difficult to obtain but a rank value is not. By using ranks, it
is possible to relax the assumptions regarding the
underlying populations.
• Non-parametric tests can often be applied to the nominal
and ordinal data that lack exact or comparable numerical
values.
• Non-parametric tests involve very simple computations
compared to the corresponding parametric tests.
Disadvantages of Non-Parametric
Tests
• A lot of information is wasted because the exact
numerical data is reduced to a qualitative form. The
increase or the gain is denoted by a plus sign whereas
a decrease or loss is denoted by a negative sign. No
consideration is given to the quantity of the gain or
loss.
• Non-parametric methods are less powerful than
parametric tests when the basic assumptions of
parametric tests are valid.
• Null hypothesis in a non-parametric test is loosely
defined as compared to the parametric tests.
Therefore, whenever the null hypothesis is rejected, a
non-parametric test yields a less precise conclusion as
compared to the parametric test.
Difference between Parametric &
Non-parametric Tests
Types of Non-Parametric Tests
Chi-square Tests - For the use of a chi-square test, the data is required in
the form of frequencies. The majority of the applications of chi-square
are with the discrete data. The test could also be applied to continuous
data, provided it is reduced to certain categories and tabulated in such
a way that the chi-square may be applied. Some of the important
properties of the chi-square distribution are:
• Unlike the normal and t distribution, the chi-square distribution is not
symmetric.
• The values of a chi-square are greater than or equal to zero.
• The shape of a chi-square distribution depends upon the degrees of
freedom. With the increase in degrees of freedom, the distribution
tends to normal
Applications of Chi-square
1. Chi-square test for the goodness of fit
2. Chi-square test for the independence of variables
3. Chi-square test for the equality of more than two population proportions.
Common principles of all the chi-square tests are as under:
• State the null and the alternative hypothesis about a population.
• Specify a level of significance.
• Compute the expected frequencies of the occurrence of certain events under
the assumption that the null hypothesis is true.
• Make a note of the observed counts of the data points falling in different cells
• Compute the chi-square value given by the formula.
Applications of Chi-square
Compare the sample value of the statistic as obtained in previous
step with the critical value at a given level of significance and make
the decision.
Applications of Chi-square
Chi-square test for goodness of fit
• The hypothesis to be tested in this case is:
H0 : Probabilities of the occurrence of events E1, E2, ..., Ek are given by the
specified probabilities p1, p2, ..., pk
H1 : Probabilities of the k events are not the pi stated in the null
hypothesis.
The procedure has already been explained.
Applications of Chi-square
Chi-square test for independence of variables
The chi-square test can be used to test the independence of two
variables each having at least two categories. The test makes a use of
contingency tables also referred to as cross-tabs with the cells
corresponding to a cross classification of attributes or events. A
contingency table with three rows and four columns (as an example) is as
shown below.
Applications of Chi-square
Assuming that there are r rows and c columns, the count in the cell
corresponding to the ith row and the jth column is denoted by Oij, where i
= 1, 2, ..., r and j = 1, 2, ..., c. The total for row i is denoted by Ri whereas
that corresponding to column j is denoted by Cj. The total sample size is
given by n, which is also the sum of all the r row totals or the sum of all
the c column totals.
The hypothesis test for independence is:
H0 : Row and column variables are independent of each other.
H1 : Row and column variables are not independent.
The hypothesis is tested using a chi-square test statistic for independence
given by:
Applications of Chi-square
The degrees of freedom for the chi-square statistic are given by
(r – 1) (c – 1).
The expected frequency in the cell corresponding to the ith row and the jth
column is given by:
For a given level of significance α, the sample value of the chi-square is
compared with the critical value for the degree of freedom (r – 1) (c – 1)
to make a decision.
Applications of Chi-square
Chi-square test for the equality of more than two population
proportions
The analysis is carried out exactly in the same way as was done for the
other two cases. The formula for a chi-square analysis remains the same.
However, two important assumptions here are different.
(i) We identify our population (e.g., age groups or various class
employees) and the sample directly from these populations.
(ii) As we identify the populations of interest and the sample from them
directly, the sizes of the sample from different populations of interest
are fixed. This is also called a chi-square analysis with fixed marginal
totals. The hypothesis to be tested is as under:
H0 : The proportion of people satisfying a particular characteristic is the
same in population.
H1 : The proportion of people satisfying a particular characteristic is not
the same in all populations.
The expected frequency for each cell could also be obtained by using the
formula as explained early. The decision procedure remains the same.
Applications of Chi-square
Examining strength of relationship between two nominal scale variables
1. Contingency coefficient – Applicable when number of rows equal
the number of columns in a contingency table.
The value of the contingency coefficient is given by:
The lower limit of C equals zero when χ2 is zero. The upper limit of C
when the number of rows is equal to the number of columns is given by
the expression:
Applications of Chi-square
2. Phi coefficient (Ф) – Can be applied when the number of rows and
columns in a contingency table are two. The phi-coefficient like the
correlation coefficient can assume any value between –1 and 1. In a
2x2 table given below phi coefficient can be computed as:
Column 1 Column 2 Total
Row 1 a b a + b
Row 2 c d c + d
Total a + c b + d (a+b+c+d)
Applications of Chi-square
3. Cramer’s V Statistic – To be used when number of rows are not
equal to number of columns in a contingency table.
Minimum value of V equals zero when chi-square is equal to zero.
The maximum value of chi-square equals n (f-1) and in that case the
maximum value of V equals 1.
Run Test for Randomness
Run test is used to test the randomness of a sample.
Run: A run is defined as a sequence of like elements that are preceded and
followed by different elements or no elements at all.
Let
n = Total size of the sample
n1 = Size of sample in group 1
n2 = Size of sample in group 2
r = Number of runs
For large samples, either n1 > 20 or n2 > 20, the distribution of runs (r) is normally
distributed with:
Standard
Deviation
Mean
Run Test for Randomness
The hypothesis is to be tested is:
H0 : The pattern of sequence is random.
H1 : The pattern of sequence is not random.
For a large sample the test statistic is given by:
For a given level of significance, if the absolute value of computed z is
greater than the absolute value of tabulated z, null hypothesis is
rejected.
In case of numerical data, the original data are grouped into two
categories, one above and second below median.
One-Sample Sign Test
• The test on mean discussed in Chapter 12 is based
upon the assumption that the samples are drawn
from a population having roughly the shape of a
normal distribution.
• This assumption gets violated, especially while
using the non-metric data (ordinal or nominal).
• In such situations, the standard tests can be
replaced by a non-parametric test.
• One such test is called one-sample sign test.
One-Sample Sign Test
• Suppose the interest is in testing the null
hypothesis H0 : μ = μ0 against a suitable alternative
hypothesis.
• Let n denote the size of sample for any problem.
To conduct a sign test, each sample observation
greater than μ0 is replaced by a plus sign, whereas
each value less than μ0 is replaced by a minus sign.
• In case a sample observation equals μ0, it is
omitted and the size of the sample gets reduced
accordingly.
One Sample Sign Test
• Testing the given null hypothesis is equivalent to testing that these plus
and minus signs are the values of a random variable having a binomial
distribution with p = ½. For a large sample, z test as given below is
used:
SLIDE 7-1
As the binomial distribution is a discrete one whereas the normal
distribution is a continuous distribution, a correction for continuity is to
be made. For this, X is decreased by 0.5 if X > np and increased by 0.5 if
X < np.
One-Sample Sign Test
For a given level of significance, the absolute value of computed Z is
compared with absolute value of tabulated Z to accept or reject the null
hypothesis.
As under the null hypothesis, p = ½, therefore
Two-Sample Sign Test
• This test is a non-parametric version of paired-sample t-test.
• It is based upon the sign of a pair of observations.
• Suppose a sample of respondents is selected and their views on the image of a
company are sought.
• After some time, these respondents are shown an advertisement, and
thereafter, the data is again collected on the image of the company.
• For those respondents, where the image has improved, there is a positive and
for those where the image has declined there is a negative sign assigned and
for the one where there is no change, the corresponding observation is
dropped from the analysis and the sample size reduced accordingly.
• The key concept underlying the test is that if the advertisement is not effective
in improving the image of the company, the number of positive signs should be
approximately equal to the number of negative signs.
• For small samples, a binomial distribution could be used, whereas for a large
sample, the normal approximation to the binomial distribution could be used,
as already explained in the one-sample sign test.
Mann-Whitney U Test for
Independent Samples
• This test is an alternative to a t test for testing the
equality of means of two independent samples
discussed in Chapter 12.
• The application of a t test involves the assumption
that the samples are drawn from the normal
population.
• If the normality assumption is violated, this test
can be used as an alternative to a t test.
Mann-Whitney U Test for
Independent Samples
• A two-tailed hypothesis for a Mann-Whitney test could be
written as:
H0 : Two samples come from identical populations
or
Two populations have identical probability distribution.
H1 : Two samples come from different populations
or
Two populations differ in locations.
Mann-Whitney U Test for
Independent Samples
The following steps are used in conducting this test:
(i) The two samples are combined (pooled) into one large
sample and then we determine the rank of each
observation in the pooled sample. If two or more sample
values in the pooled samples are identical, i.e., if there are
ties, the sample values are each assigned a rank equal to
the mean of the ranks that would otherwise be assigned.
(ii) We determine the sum of the ranks of each sample. Let R1
and R2 represent the sum of the ranks of the first and the
second sample whereas n1 and n2 are the respective
sample sizes of the first and the second sample. For
convenience, choose n1 as a small size if they are unequal
so that n1 ≤ n2. A significant difference between R1 and R2
implies a significant difference between the samples.
Mann-Whitney U Test for
Independent Samples
If n1 or n2 > 10, a Z test would be appropriate. For this purpose, either
of U1 or U2 could be used for testing a one-tailed or a two-tailed test.
In this test, U2 will be used for the purpose.
Mann-Whitney U Test for
Independent Samples
• Assuming the level of significance as equal to α, if the absolute sample
value of Z is greater than the absolute critical value of Z, i.e., Zα/2, the
null hypothesis is rejected.
• A similar procedure is used for a one-tailed test.
Under the assumption that the null hypothesis is true, the U2 statistic
follows an approximately normal distribution with mean:
Wilcoxon Signed-Rank Test for Paired
Samples
• The case of paired sample (dependent sample) was discussed in
Chapter 12 using a t distribution.
• The use of t distribution is based on the normality assumption.
• However, there are instances when the normality assumption is not
satisfied and one has to resort to a non-parametric test. One such test
earlier discussed was the two-sample sign test.
• In two-sample sign test, only the sign of the difference (positive or
negative) was taken into account and no weightage was assigned to the
magnitude of the difference.
• The Wilcoxon matched-pair signed rank test takes care of this
limitation and attaches a greater weightage to the matched pair with a
larger difference.
• The test, therefore, incorporates and makes use of more information
than the sign test.
• This is, therefore, a more powerful test than the sign test.
Wilcoxon Signed-Rank Test for Paired
Samples
The test procedure is outlined in the following steps:
(i) Let di denote the difference in the score for the ith matched pair.
Retain signs, but discard any pair for which d = 0.
(ii) Ignoring the signs of difference, rank all the di’s from the lowest
to highest. In case the differences have the same numerical
values, assign to them the mean of the ranks involved in the tie.
(iii) To each rank, prefix the sign of the difference.
(iv) Compute the sum of the absolute value of the negative and
the positive ranks to be denoted as T– and T+ respectively.
(v) Let T be the smaller of the two sums found in step iv.
Wilcoxon Signed-Rank Test for Paired
Samples
• When the number of the pairs of observation (n) for which the
difference is not zero is greater than 15, the T statistic follows an
approximate normal distribution under the null hypothesis, that the
population differences are centered at 0.
• The mean μT and standard deviation σT of T are given by:
• The test statistics is given by:
Wilcoxon Signed-Rank Test for Paired
Samples
• For a given level of significance α, the absolute sample Z
should be greater than the absolute Zα /2 to reject the null
hypothesis.
• For a one-sided upper tail test, the null hypothesis is
rejected if the sample Z is greater than Zα and for a one-
sided lower tail test, the null hypothesis is rejected if
sample Z is less than – Zα.
The Kruskal-Wallis Test
• The Kruskal-Wallis test is in fact a non-parametric counterpart to the
one-way ANOVA.
• The test is an extension of the Mann-Whitney U test.
• Both of them require that the scale of the measurement of a sample
value should be at least ordinal.
• The hypothesis to be tested in-Kruskal-Wallis test is:
H0 : The k populations have identical probability distribution.
H1 : At least two of the populations differ in locations.
The Kruskal-Wallis Test
The procedure for the test is listed below:
(i) Obtain random samples of size n1, ..., nk from each of the k
populations. Therefore, the total sample size is
n = n1 + n2 + ... + nk
(ii) Pool all the samples and rank them, with the lowest score receiving a
rank of 1. Ties are to be treated in the usual fashion by assigning an
average rank to the tied positions.
(iii) Let ri = the total of the ranks from the ith sample.
The Kruskal-Wallis Test
• The Kruskal-Wallis test uses the χ2 to test the null hypothesis. The test
statistic is given by:
CONCEPTS AND
which follows a χ2 distribution with the k–1 degrees of freedom.
Where, k = Number of samples
n = Total number of elements in k samples.
• The null hypothesis is rejected, if the computed χ2 is greater than the
critical value of χ2 at the level of significance α.
Meaning of Univariate, Bivariate &
Multivariate Analysis of Data
• Univariate Analysis – In univariate analysis, one variable is analysed at
a time.
• Bivariate Analysis – In bivariate analysis two variables are analysed
together and examined for any possible association between them.
• Multivariate Analysis – In multivariate analysis, the concern is to
analyse more than two variables at a time.
The type of statistical techniques used for analysing univariate and
bivariate data depends upon the level of measurements of the questions
pertaining to those variables. Further, the data analysis could be of two
types, namely, descriptive and inferential.
Descriptive vs Inferential Analysis
Descriptive analysis - Descriptive analysis deals with summary measures
relating to the sample data. The common ways of summarizing data are
by calculating average, range, standard deviation, frequency and
percentage distribution. The first thing to do when data analysis is taken
up is to describe the sample.
Examples of Descriptive Analysis:
• What is the average income of the sample?
• What is the average age of the sample?
• What is the standard deviation of ages in the sample?
• What is the standard deviation of incomes in the sample?
• What percentage of sample respondents are married?
• What is the median age of the sample respondents?
• Is there any association between the frequency of purchase of product
and income level of the consumers?
Descriptive vs Inferential Analysis
• Is the level of job satisfaction related with the age of the employees?
• Which TV channel is viewed by the majority of viewers in the age group
20–30 years?
• Types of Descriptive Analysis – The table below presents the type of
descriptive analysis that is applicable under each form of
measurement.
Descriptive vs Inferential Analysis
Inferential Analysis – Under inferential statistics, inferences are drawn on
population parameters based on sample results. The researcher tries to
generalize the results to the population based on sample results.
Examples of Inferential Analysis:
• Is the average age of the population significantly different from 35?
• Is the average income of population significantly greater than 25,000 per
month?
• Is the job satisfaction of unskilled workers significantly related with their pay
packet?
• Do the users and non-users of a brand vary significantly with respect to age?
• Is the growth in the sales of the company statistically significant?
Descriptive vs Inferential Analysis
• Does the advertisement expenditure influence sale significantly?
• Are consumption expenditure and disposable income of households
significantly correlated?
• Is the proportion of satisfied workers significantly more for skilled
workers than for unskilled works?
• Do urban and rural households differ significantly in terms of average
monthly expenditure on food?
• Is the variability in the starting salaries of fresh MBA different with
respect to marketing and finance specialization?
Descriptive Analysis of Univariate Data
One should look at the missing data, if any, before
starting the analysis. The analysis is to be carried
out as stated below:
• Frequency distribution & percentage distribution
(for Nominal scale)
• Analysis of multiple responses (for Nominal scale)
• Analysis of ordinal scaled questions
• Grouping of large data sets
Descriptive Analysis of Univariate Data
Measures of Central Tendency
• Arithmetic mean (appropriate for Interval and
Ratio scale data)
• Median (appropriate for Ordinal, Interval and Ratio
scale data)
• Mode (appropriate for Ordinal, Interval and Ratio
scale data)
Descriptive Analysis of Univariate Data
Measures of Dispersion
• Range (appropriate for Interval and Ratio scale
data)
• Variance and Standard Deviation (appropriate for
interval and ratio scale data)
• Coefficient of variation (appropriate for Ratio scale
data)
• Relative and absolute frequencies (appropriate for
Nominal scale data)
Descriptive Analysis of Bivariate Data
Preparation of cross-tables
Interpretation of cross-tables – For interpretation of
cross-tables, it is required to identify dependent and
independent variable.
Percentages should be computed in the direction of
independent variable.
There is no hard and fast rule as to where the
dependent or independent variables are to be taken.
They can be taken either in rows or in columns.
Descriptive Analysis of Bivariate Data
Elaboration of cross-tables:
• Once the relationship between the two variables has been established, the
researcher may introduce a third variable into the analysis to elaborate and refine
the initial observed relationship between two variables.
• The main question being asked is whether the interpretation of the relationship is
modified with the introduction of the third variable.
• There would be four possibilities on introducing the third variable.
(i) It may refine the association that was observed originally between two
variables.
(ii) By introducing the third variable, it may be found that there was no
association between initial variables or the original association was
spurious.
(iii) Introducing a third variable may indicate association between original two
variables although no association was observed originally.
(iv) Introduction of the third variable may not show any change in the initial
association between two variables.
Descriptive Analysis of Bivariate Data
Refining an initial relationship:
The data reported below represents the relationship between
consumption of ice cream and income level.
The above table indicates that 55 per cent of high income respondents fall
into high consumption category as compared to 30 per cent of low income
respondents. Before concluding that high income respondents consume
more ice cream as compared to low income families, a third variable,
namely, gender, is introduced into the analysis. The results are reported in
the following table:
Descriptive Analysis of Bivariate Data
In case of females, 60 per cent with high income fall in the high
consumption category as compared to 20 per cent of those with low
income. In case of males, 38 per cent with high income fall in the high
consumption category as compared to 30 per cent with low income.
Therefore, it is seen that percentages are closer in case of males.
Therefore, the relationship between ice cream consumption and income
has been refined by introduction of a third variable, namely, gender.
Descriptive Analysis of Bivariate Data
Initial relationship was spurious:
The data below reports the relationship between ownership of flats in
high-rise buildings and education level.
The above table indicates that 35 per cent of respondents with high
education own a flat in a high-rise building as opposed to 22 per cent
with low education.
Now when a third variable ‘income’ categorized as low and high income
is introduced, the resulting table is as follows:
Descriptive Analysis of Bivariate Data
In the above table it is found that irrespective of the education level, the
ownership of flat in high-rise buildings depends upon the income level.
Descriptive Analysis of Bivariate Data
Reveal suppressed association:
The relationship between desire to visit temple and age group is
presented in the table below:
The above table shows that desire to visit temple is independent of
age. Now, when gender is added as the third variable, the results
obtained are summarized in the following table.
Descriptive Analysis of Bivariate Data
It is seen from the above table that 65 per cent of males above 35 have a
high desire to go to temple whereas 70 per cent of females below 35
have a high desire to go to temple. Therefore, the introduction of the
third variable has revealed the suppressed relationship between desire to
visit temple and age.
Descriptive Analysis of Bivariate Data
No change in initial relationship:
The relationship between household size and the size of toothpaste
bought by households is given in the table below:
The above table indicates that 60 per cent of the large households buy
large-sized toothpaste whereas 60 per cent of small households buy
small-size toothpaste. Now if income categorized as low income and high
income is introduced as third variable, the resulting table is as follows:
Descriptive Analysis of Bivariate Data
It is found that even with the introduction of the third variable, i.e.,
income, the initial relationship remains unchanged.
Spearman’s rank order correlation coefficient
In case of ordinal scale data, the measure of association between two
variables is obtained through Spearman’s rank order correlation
coefficient.
Descriptive Analysis of Bivariate Data
Spearman’s rank correlation coefficient is given by
The rank correlation coefficient takes a value between –1 and +1.
More on Analysis of Data
Calculating summarized rank order
The rankings of attributes while choosing a restaurant for dinner for 32
respondents can be presented in the form of frequency distribution in
the table below.
More on Analysis of Data
To calculate a summary rank ordering, the attribute with the first rank is given the
lowest number (1) and the least preferred attribute is given the highest number
(5). The summarized rank order is obtained with the following computations as:
The total lowest score indicates the first preference ranking. The results show the
following rank ordering:
(1) Food quality
(2) Service
(3) Ambience
(4) Menu variety
(5) Location
More on Analysis of Data
Data transformation
The original data is changed to a new format for performing data
analysis so as to achieve the objectives of the study. This is
generally done by the researcher through creating new variables
or by modifying the values of the scaled data.
The following illustrations show how it is carried out.
• Ask the question on date of birth instead of asking the exact age.
• At times it may become essential to collapse or combine
adjacent categories of a variable so as to reduce the number of
categories of original variables. In a 5-point Likert scale, having
categories like strongly agree, agree, neither agree nor disagree,
disagree and strongly disagree can be clubbed into three
categories.
More on Analysis of Data
• The researcher could create new variables by re-specifying the data
with numeric or logical transformation. Suppose a multiple-item Likert
scale designed to measure the perception of a customer towards the
bank has 10 items. The total score of a respondent can be computed
as:
Total score of ith respondent = Score of ith respondent on item 1 +
Score of ith respondent on item 2 + ... + Score of ith respondent on item
10.
Once the total score for each of the respondent is computed, the
average score can be obtained by dividing it by the number of items. It
can be further categorized as favourable, neutral and unfavourable
perception that could be related to various demographic variables
depending upon the objectives of research.

HYPOTHESIS TESTING 20200702.pptx

  • 1.
  • 2.
    Topics Covered • Introduction: Meaning • Types of Hypothesis • Characteristics of Hypothesis • Sources of Hypothesis • Errors in Hypothesis • Formulation of Hypothesis
  • 3.
    Important Questions askedin Exam • Define Hypothesis and List the types of Hypothesis. • What is Significance Level. • Define Null and Alternative Hypothesis. • Explain Type -I and Type – II Errors. • Differentiate between Parametric and Non- Parametric Test. • What is Univariate, Bivariate and Multivariate Analysis? • Write a note on Chi-square Test • Explain when to use t-test, z-test, f- test, u-test, K-W –Test. • Bivariate and Multivariate Analysis- ANOVA-one-way and two-way.
  • 4.
    Hypothesis Meaning: • A hypothesisis an assumption or a statement that may or may not be true. The hypothesis is tested on the basis of information obtained from a sample. • a mere assumption or some supposition to be proved or disproved • It is the process of Validating the theories or concepts using statistical tools.
  • 5.
    Hypothesis - Definition •A hypothesis can be defined as a logically conjectured relationship between two or more variables expressed in the form of a testable statement. • Relationships are estimated on the basis of the network of associations established in the theoretical framework formulated for the research study. • By testing the hypotheses and confirming the estimated relationships, it is expected that solutions can be found to correct the problem encountered.
  • 6.
    Null and AlternateHypothesis***** • Null Hypothesis: Null means No • The hypotheses that are proposed with the intent of receiving a rejection for them are called null hypotheses. • In general, the null statement is expressed as no (significant) relationship between two variables or no (significant) difference between two groups. • It is denoted as 𝐻0
  • 7.
    • Alternate Hypothesis:can cover a whole range of value rather than a single point. • In general, the Alternate statement is expressed as there is a (significant) relationship between two variables or there is a (significant) difference between two groups. • It is denoted as 𝐻1 or 𝐻𝑎 Null and Alternate Hypothesis*****
  • 8.
    Examples of Nulland Alternate Hypothesis • H0 ∶ There is no relationship between Employee Absenteeism and Firm Performance. • H1 : There is a relationship between Employee Absenteeism and Firm Performance. • H0 ∶ There is no relationship between Investor behaviour and Stock Market Performance • H1 : There is a relationship between Investor behaviour and Stock Market Performance • H0 ∶ There is no relationship between Success of a Movie and Hero Performance • H1 : There is a relationship between Success of a Movie and Hero Performance • Note: • H0 ∶ Null Hypothesis • H1 : Alternate Hypothesis
  • 9.
    Characteristics of Hypothesis •Clear and Precise. • Hypothesis should be capable of being tested. • Hypothesis should be limited in scope and must be specific. • Hypothesis should be consistent with most known facts (Strong Theoretical Base) • Hypothesis should state relationship between variables.
  • 10.
    Sources of Hypothesis •Theory • Observation • Past Experiences • Case Studies • Similarity
  • 11.
    Errors in HypothesisTesting *3M • Type I and Type II Error: • The acceptance or rejection of a hypothesis is based upon sample results and there is always a possibility of sample not being representative of the population.
  • 12.
    Type I andType II Error • A hypothesis is a statement or assertion about the state of nature (about the true value of an unknown population parameter): • Consider in a Court Scene The accused is innocent (Null Hypothesis)   = 100 • Every hypothesis implies its contradiction or alternative (Alternative Hypothesis) The accused is guilty  100 • A hypothesis is either true or false, and you may fail to reject it or you may reject it on the basis of information: Trial testimony and evidence Sample data
  • 13.
    Type I andType II Error • One hypothesis is maintained to be true until a decision is made to reject it as false: • Considering in a Court Scene • Scene -1 : Ho is true Accept Ho • He is innocent kindly court has to release him • Scene – 2: Ho is true Reject Ho • He is innocent but you proved him as guilty. (Type – I Error) • Scene -3: Ho is False Accept Ho • He is Guilty but you are proved him as innocent(Type – II Error) • Scene – 4: Ho is False Reject Ho • He is guilty take him for imprisonment Decision Innocent Guilty Innocent (Do not Reject Ho) Correct Decision Type I Error α Guilty (Accept Ho) Type II Error β Correct Decision Ho is True Ho is False Accept Ho Reject Ho
  • 14.
    Example for FunDecision Love U Don’t Love U Love U (Do not Reject Ho) Correct Decision Type I Error α Don’t Love U (Accept Ho) Type II Error β Correct Decision Ho is True Ho is False Accept Ho Reject Ho Decision Submitted Assignments Not Submitted Assignment Submitted Assignment (Do not Reject Ho) Correct Decision Type I Error α Not Submitted Assignment (Accept Ho) Type II Error β Correct Decision Ho is True Ho is False Accept Ho Reject Ho In Movies the Actors/Actresses
  • 15.
    • Rejecting theNull Hypothesis When it is Ture – Type – I Error • Accepting the Null Hypothesis when it False – Type – II Error Type I and Type II Error Decision Accept Ho Reject Ho Ho is Ture Correct Decision Type I Error α Ho is False Type II Error β Correct Decision •A decision may be incorrect in two ways: Type I Error: Reject a true H0 •The Probability of a Type I error is denoted by . Type II Error: Fail to reject a false H0 •The Probability of a Type II error is denoted by .
  • 16.
    Important Terms • ConfidenceLevel: The confidence level is the probability that a confidence interval will include the population parameter. • Ex: 90% 95% and 99% • Level of Significance: denotes the probability of rejecting the null hypothesis when it is true. It is denoted by α. • If Confidence Interval is 95% • Then Significance Level will be 100-95 =5 % i.e. 0.05 0.10 - 0.082 100-99= 10/100=0.01 0.567 0.087 • P-Value: • P-value is the probability that we would have seen our data (or something more unexpected) just by chance if the null hypothesis (null value) is true. • P-values are essentially the significance level. • In essence, we are calculating the probability that the hypothesis is true. It summarizes the credibility of the null hypothesis. • P low Null Go
  • 17.
    Hypothesis Testing Procedure:*7M or 10M 1. Setting up of a hypothesis: Define Ho and Ha 2. Setting up of a suitable significance level: 0.05 or 0.1 3. Determination of a test statistic 4. Determination of critical region 5. Computing the value of test-statistic 6. Making decision: Accept or Reject Ho
  • 18.
    Setting up ofa hypothesis: Define Ho and Ha • The null hypothesis is the hypothesis of the population parameter taking a specified value. • In case of two populations, the null hypothesis is of no difference or the difference taking a specified value. The hypothesis that is different from the null hypothesis is the alternative hypothesis. • If the null hypothesis H0 is rejected based upon the sample information, the alternative hypothesis H1 is accepted.
  • 19.
    Setting up SignificanceLevel • Confidence refers to the probability that our estimations are correct. That is, it is not merely enough to be precise, but it is also important that we can confidently claim that 95% of the time our results would be true and there is only a 5% chance of our being wrong. This is also known as confidence level. • In social science research, a 95% confidence level—which implies that there is only a 5% probability that the findings may not be correct—is accepted as conventional, and is usually referred to as a significance level of .05 (p = .05)
  • 20.
    99% - 0.01= 0.01/2 = 0.005 two tailed test 95% - 0.05 = 0.05/2= 0.025 90% -0.1 = 0.05 p-value >= Accept Ho < = Reject Ho 0. 011
  • 21.
    Determination of atest statistic • The next step is to determine a suitable test statistic and its distribution. As would be seen later, the test statistic could be t, Z, χ2 or F,
  • 22.
    Determination of criticalregion • Before a sample is drawn from the population, it is very important to specify the values of test statistic that will lead to rejection or acceptance of the null hypothesis. • The one that leads to the rejection of null hypothesis is called the critical region. • Given a level of significance, α, the optimal critical region for a two- tailed test consists of that α/2 per cent area in the right hand tail of the distribution plus that α/2 per cent in the left hand tail of the distribution where that null hypothesis is rejected.
  • 23.
    • Critical Region: Iftest statistic falls in some interval which support alternative hypothesis, we reject the null hypothesis. This interval is called rejection region It test statistic falls in some interval which support null hypothesis, we fail to reject the alternative hypothesis. This interval is called acceptance region The value of the point, which divide the rejection region and acceptance one is called critical value
  • 25.
    Computing the valueof test-statistic • The next step is to compute the value of the test statistic based upon a random sample of size n. Once the value of test statistic is computed, one needs to examine whether the sample results fall in the critical region or in the acceptance region.
  • 26.
    Making decision: Acceptor Reject Ho • The hypothesis may be rejected or accepted depending upon whether the value of the test statistic falls in the rejection or the acceptance region. Management decisions are based upon the statistical decision of either rejecting or accepting the null hypothesis.
  • 27.
    Population Parameter SampleStatistics Statistical measures representing the 1.population mean (µ) 2.Population stddeviation (σ) 3.population proportion (p) are called parameter. Statistical measure representing 1.Sample mean (ẍ) 2. Sample proportion (p1) 3. Sample std. Deviation (s) are called sample statistics. Population parameter and Sample statistics If Population parameter is tested based on sample statistics. then it is called Parametric testing ,when the data is Normal
  • 28.
    Hypothesis testing isused to compare 1. Averages 2. Proportions
  • 29.
    To compare the averages One sample 1 samplet test (σ is unknown) 1 sample Z test (σ is known) EXAMPLE: Maruti claims that his vehicle will give 20km/litre. To test his claim the data collected from 100 maruti customers w.r.t the fuel consumption , to check whether maruti’s claim is valid or not. HYPOTHESIS TESTING Two samples 2 sample t test K samples (more than 2 samples) Analysis of variance test (ANOVA) EXAMPLE:To compare is there any significant difference in the average life of MRF tyres and CEAT tyres EXAMPLE:To compare is there any significant difference between four fertilizers with regard to average yield Data Type X – Discrete Y - Continuous
  • 30.
    To compare the proportions One sample 1proportion test EXAMPLE: Shop keeper claims that 60% of the customers entering the shop do not buy anything. Test whether the shop keeper claim is valid from the samples collected . HYPOTHESIS TESTING Two samples 2 Proportion test K samples (more than 2 samples) Chi-square test EXAMPLE: ITC wants to check whether the smoking habit differs significantly in two states. EXAMPLE: TATA Motors wants to know whether their nano car appeals to all the age groups Data type Input X - Output Y - DISCRETE DISCRETE
  • 31.
    Continuous Y andDiscrete X Y is Continuous & X Factor is Discrete Compare 2 Populations/Samples with Each Other Compare More than 2 Populations /Samples with Each Other comparison of medians No Mann Whitney Test for Is Y1 & Y2 Normal? Yes variances Yes Compare means using 2 Sample T assuming equal variances No Compare means using 2 Sample T assuming unequal comparison of medians Are Variances Equal? Yes One-Way ANOVA Test to compare means Is Y1 …YN Normal? Yes No Kruskal- WallisTest for Are Variances Equal? No Compare means in pairs using 2 sample t test
  • 32.
    Analysis for YDiscrete, X Discrete Y factor is Discrete & X Factor is Discrete Compare 1 Population with External Standard Compare 2 Populations with Each Other Compare More than 2 Populations with Each Other 1Proportion Test 2 Proportion Test Chi-Squared Test
  • 33.
    • Parameters andStatistics: A parameter is a number that describes the population. A parameter is a fixed number, but in practice we do not know its value because we cannot examine the entire population. A statistic is a number that describes a sample. The value of a statistic is known when we have taken a sample, but it can change from sample to sample. We often use a statistic to estimate an unknown parameter.
  • 35.
    Sample Error (standardError): The standard deviation of the sample statistic is called standard error of the statistics. For example, if different samples of the same size n are drawn from a population, we get different values of sample mean (x- bar). The S.D. of (x-bar) is called standard error of (x-bar). Standard error of (x-bar) will depend upon the size of the sample and the variability of the population. It can be derived that S.E. = (σ / √n).
  • 36.
    Standard errors ofsome well known statistics: NO. STATISTICS S.E 1. Mean (x-bar) 2. Difference between two means 3. Sample Proportion p 4. Difference between two proportions P1’ – p2’ n  1 2 x  x  1   2 2 2 n1 n2 P Q n P1Q1  P2Q2 n1 n2
  • 37.
    Uses of S.E: 1)To test whether a given value of a statistic differs significantly from the intended population parameter. i.e. whether the difference between value of the sample statistic and population parameter is significant and the difference may be attribute to chance. 2) To test the randomness of a sample i.e. to test whether the given sample be regarded as a random sample from the population. 3) To obtain confidence interval for the parameter of the population. 4) To determine the precision of the sample estimate, because precision of a statistic = 1/ S.E. of the statistic
  • 38.
    Type I andtype II Errors:  In testing of a statistical hypothesis the following situations may arise: 1) The hypothesis may be true but it is rejected by the test. 2) The hypothesis may be false but it is accepted by the test. 3) The hypothesis may be true and is accepted by the test. 4) The hypothesis may be false and is rejected by the test.  (3) and (4) are the correct decisions while (1) and (2) are errors.  The error committed in rejecting a hypothesis which is true is called Type-I error and its probability is denoted by α  The error committed in accepting a hypothesis which is false is called Type-II error and its probability is denoted by β.
  • 39.
    Accept Reject Ho istrue Correct decision Type – I error Ho is false Type-II error Correct decision
  • 40.
    Level of Significance: In any test procedure both the types of errors should be kept minimum.  They are inter-related it is not possible to minimize both the errors simultaneously.  Hence in practice, the probability of type-I error is fixed and type –II error is minimized.  The fixed value of type-I error is called level of significance and it is denoted by α.  Thus level of significance is the probability of rejecting a hypothesis might to be accepted.  Most commonly used l.o.s. are 5% and 1%.  When decision is taken at 5% l.o.s., it means that in 5 cases out of 100, it is likely to reject a hypothesis which might to be accepted. i.e. our decision to reject Ho is 95% correct.
  • 41.
    Critical Region: If teststatistic falls in some interval which support alternative hypothesis, we reject the null hypothesis. This interval is called rejection region It test statistic falls in some interval which support null hypothesis, we fail to reject the alternative hypothesis. This interval is called acceptance region The value of the point, which divide the rejection region and acceptance one is called critical value
  • 43.
    24 - 19 One-Sided orOne-Tailed Hypothesis Tests In most applications, a two-sided or two-tailed hypothesis test is the most appropriate approach. This approach is based on the expression of the null and alternative hypotheses as follows: H0:  = 170 vs H1:  ≠ 170 To test the above hypothesis, we set up the rejection and acceptance regions as shown on the next slide, where we are using  = 0.05.
  • 44.
  • 45.
    In this example,the rejection region probabilities are equally split between the two tails, thus the reason for the label as a two-tailed test. This procedure allows the possibility of rejecting the null hypothesis, but does not specifically address, in the sense of statistical significance, the direction of the difference detected.
  • 46.
    There may besituations when it would be appropriate to consider an alternative hypothesis where the directionality is specifically addressed. That is we may want to be able to select between a null hypothesis and one that explicitly goes in one direction. Such a hypothesis test can best be expressed as: H0:  = 170 vs H1:  > 170 The expression is sometimes given as: H0:  ≤ 170 vs H1:  > 170
  • 47.
    The difference betweenthe two has to do with how the null hypothesis is expressed and the implication of this expression. The first expression above is the more theoretically correct one and carries with it the clear connotation that an outcome in the opposite direction of the alternative hypothesis is not considered possible. This is, in fact, the way the test is actually done.
  • 48.
    The process oftesting the above hypothesis is identical to that for the two-tailed test except that all the rejection region probabilities are in one tail. For a test, with α = 0.05, the acceptance region would be, for example, the area from the extreme left up to the point below which lies 95% of the area. The rejection region would be the 5% area in the upper tail.
  • 49.
  • 50.
    Critical values atimportant level of significance are given below. 1% 5% 10% Two tailed test 2.58 1.96 1.645 One tailed test 2.33 1.645 1.282
  • 51.
    (B) Testing OfHypothesis -2: Introduction: • The value of a statistics obtained from a large sample is generally close to the parameter of the population. • But there are situations when one has to take a small sample. E.g. if a new medicine is to be introduced, a doctor cannot test the new medicine by giving it to many patients. • Thus he takes a small sample. • Generally a sample having number of observations less than or equal to 30 is regarded as a small sample.
  • 52.
    Difference between Largeand Small sample Sr. No. Large sample Small sample 1. The sample size is greater than 30. The sample size is 30 or less than 30 2. The value of a statistic obtain from the sample can be taken as an estimate of the population parameter. The value of a statistic obtain from the sample can not be taken as an estimate of the population parameter. 3. Normal distribution is used for testing. Sampling distribution like t, F etc. are used for testing.
  • 53.
    Degree of freedom: •Degree of freedom is the number of independent observations of the variable. • The number of independent observations is different for different statistics. • Suppose we are asked to select any five observation. There is no restriction on the selection of these observations. Hence degree of freedom is 5. • Suppose we want to select five observations whose sum is 100. Here four observations can be can be selected freely but the 5th observation is automatically selected by the restriction of total 100. • We are not free to select all the five observations but our freedom is restricted to the selection of only 4 observations. • Thus the degree of freedom for selecting n observation when one such restriction is given is n-1. • If two such restrictions are given the degree of freedom will be n-2.
  • 54.
    Statistical Test 3 • Theseare intended to decide whether a hypothesis about distribution of one or more populations should be rejected or accepted. • These may be: Statistical Test Parametric Test Non Parametric Test
  • 55.
    These tests thestatistical significance of the:- 1) Difference in sample and population means. 2) Difference in two sample means 3) Several population means 4) Difference in proportions between sample and population 5) Difference in proportions between two independent populations 6) Significance of association between two variables 55
  • 56.
    Parametr ic By Aniruddha Deshmukh- M. Sc. Statistics, MCM Parametric analysis to test group means Information about population is completely known Specific assumptions are made regarding the population Applicable only for variable Samples are independent Non- Parametric Nonparametric analysis to test group medians No Information about the population is available No assumptions are made regarding population Applicable to both variable and attributes Not necessarily the samples are Independent
  • 57.
    Parametr ic By Aniruddha Deshmukh- M. Sc. Statistics, MCM • Assumed normal distributions • Handles Interval data or Ratio • data • Results can be significantly affected by outliers • Perform well when the spread of each group is different, might not provide valid results if groups have a same spread • Have more statistical power Non- Parametric No Assumed Shape / distribution Handles Ordinal data, Nominal (or Interval or Ratio), ranked data Results cannot be seriously affected by outliers Perform well when the spread of each group is same, might not provide valid results if groups have a different spread
  • 58.
    Tofind the answer,start with the scale of measurement • define anattribute • e.g. gender, matital status Nominal • rank or order the observations as scoresorcategories from low to high in terms of «more orless» • e.g. education, attitude/opinionscales Ordinal 14.10.2014 3 • interval between observations in terms of fixed unit of measurement • e.g. measures of temperature Interval • The scale has a fundamentalzero point • e.g. age, income Ratio Nonparametric Nonparametric *Parametric *Parametric *may beused
  • 59.
    In addition toscale of measurement, we should look at the population distribution. Population is normallydistributed • Nonparametric • (have to beused) Not normally distributed population or no assumption can be made about the populationdistribution • Parametric • (may beused) 14.10.2014 4
  • 60.
    Normal Distribution  avery common continuous probability distribution  All normal distributions are symmetric.  bell-shaped curve with a single peak.  68% of the observations fall within 1 standard deviation of the mean  95% of the observations fall within 2 standard deviations of the mean  99.7% of the observations fall within 3 standard deviations of the mean  for a normal distribution, almost all values lie within 3 standard deviations of the mean
  • 61.
    14.10.2014 6 Touse parametrictests, stay tuned…  Interval or ratio data are required.  Normal distribution is required. + Homogeneity of variance
  • 62.
    Homogeneity of Variance The variance is a measure of the dispersion of the random variable about the mean. In other words, it indicates how far the values spread out.  It refers to that variance within each of population is equal.  Homogeneity of Variances is assessed by Levene’s test. (T-test and ANOVA use Levene’s test.)
  • 63.
    Parametric or nonparametric– Determination  In cases where  the data which are measured by interval or ratio scale come from a normal distribution  Population variances are equal parametric tests are used.  In cases where  the data is nominal or ordinal  the assumptions of parametric tests are inappropriate nonparametric tests are used. 14.10.2014 8
  • 64.
    Parametric or nonparametric– Determination 14.10.2014 9 Type of data Metric Are the data approximately normally distributed? Yes No Are the variances of populations equal? Categorical Nonparametric Tests Parametric Tests Nonparametric Tests No Nonparametric Tests Yes
  • 65.
    Parametric test for Means ByAniruddha Deshmukh - M. Sc. Statistics, MCM 1 sample t-test 2sample t-test One-Way ANOVA Factorial DOE with one factor and one blocking variable Non-Parametric test for Medians • 1-sample Sign, 1-sample • Wilcoxon • Mann-Whitney test • Kruskal-Wallis, Mood’s median te • Friedman test
  • 66.
    Parametric Tests Perform wellwith skewed and non-normal distributions: This may be a surprise but parametric tests can perform well with continuous data that are non-normal if you satisfy these sample size guidelines. Parametric analyses Sample size guidelines for non-normal data 1 sample t test Greater than 20 2 sample t test Each group should be greater than 15 One-Way ANOVA By Aniruddha Deshmukh - M. Sc. Statistics, MCM 6 6 If you have 2-9 groups, each group should be greater than 15. If you have 10-12 groups, each group should be greater than 20.
  • 67.
    Parametric or Non-ParametricDetermination Non- Parametr ic Tests Type of Data Categorical Metric Are the Data approximately normally distributed? N O Non- Parametr ic Tests YE S Are the variances of populations equal? N O Non- Parametric Tests YE S Parametric Tests By Aniruddha Deshmukh - M. Sc. Statistics, MCM 6 7
  • 68.
    Parametric Non-parametric Assumed distributionNormal Any Assumed variance Homogeneous Any Typical data Ratio or Interval Ordinal or Nominal Data set relationships Independent Any Usual central measure Mean Median Benefits Can draw more conclusions Simplicity; Less affected by outliers Tests Choosing Choosing parametric test Choosing a non-parametric test Correlation test Pearson Spearman Independent measures, 2 groups Independent-measures t-test Mann-Whitney test Independent measures, >2 groups One-way, independent- measures ANOVA Kruskal-Wallis test Repeated measures, 2 conditions Matched-pair t-test Wilcoxon test Repeated measures, >2 conditions One-way, repeated Friedman's test By Aniruddha Deshmukh - M. Sc. Statistics, MCM 6 8 Conclusive Thoughts
  • 69.
    Statistical Test Alternatives:Parametric - Nonparametric 14.10.2014 10 Output variable Nominal Ordinal Interval - Ratio Input variable Nominal Chi-square Mann Whitney Kruskal – Wallis Unpaired t-test or Mann Whitney Paired t-test or Wilcoxon Analysis of variance or Kruskal – Wallis Ordinal Chi-square Mann Whitney Spearman Rank Linear regression or Spearman Interval Ratio Logistic regression Poisson regression Pearson’s r, Linear regression or Spearman
  • 70.
  • 71.
    Parametric Vs Non-parametricTests Parametric Tests: • The population mean (μ), standard deviation (s) and proportion (p) are called the parameters of a distribution. • Tests of hypotheses concerning the mean and proportion are based on the assumption that the population(s) from where the sample is drawn is normally distributed. • Tests based on the above parameters are called parametric tests.
  • 72.
    Parametric Vs. Non-parametricTests Non-Parametric Tests:- • There are situations where the populations under study are not normally distributed. The data collected from these populations is extremely skewed. Therefore, the parametric tests are not valid. • The option is to use a non-parametric test. These tests are called the distribution-free tests as they do not require any assumption regarding the shape of the population distribution from where the sample is drawn. • These tests could also be used for the small sample sizes where the normality assumption does not hold true.
  • 73.
    Advantages of Non-ParametricTests • They can be applied to many situations as they do not have the rigid requirements of their parametric counterparts, like the sample having been drawn from the population following a normal distribution. • There can be applications where a numeric observation is difficult to obtain but a rank value is not. By using ranks, it is possible to relax the assumptions regarding the underlying populations. • Non-parametric tests can often be applied to the nominal and ordinal data that lack exact or comparable numerical values. • Non-parametric tests involve very simple computations compared to the corresponding parametric tests.
  • 74.
    Disadvantages of Non-Parametric Tests •A lot of information is wasted because the exact numerical data is reduced to a qualitative form. The increase or the gain is denoted by a plus sign whereas a decrease or loss is denoted by a negative sign. No consideration is given to the quantity of the gain or loss. • Non-parametric methods are less powerful than parametric tests when the basic assumptions of parametric tests are valid. • Null hypothesis in a non-parametric test is loosely defined as compared to the parametric tests. Therefore, whenever the null hypothesis is rejected, a non-parametric test yields a less precise conclusion as compared to the parametric test.
  • 75.
    Difference between Parametric& Non-parametric Tests
  • 76.
    Types of Non-ParametricTests Chi-square Tests - For the use of a chi-square test, the data is required in the form of frequencies. The majority of the applications of chi-square are with the discrete data. The test could also be applied to continuous data, provided it is reduced to certain categories and tabulated in such a way that the chi-square may be applied. Some of the important properties of the chi-square distribution are: • Unlike the normal and t distribution, the chi-square distribution is not symmetric. • The values of a chi-square are greater than or equal to zero. • The shape of a chi-square distribution depends upon the degrees of freedom. With the increase in degrees of freedom, the distribution tends to normal
  • 77.
    Applications of Chi-square 1.Chi-square test for the goodness of fit 2. Chi-square test for the independence of variables 3. Chi-square test for the equality of more than two population proportions. Common principles of all the chi-square tests are as under: • State the null and the alternative hypothesis about a population. • Specify a level of significance. • Compute the expected frequencies of the occurrence of certain events under the assumption that the null hypothesis is true. • Make a note of the observed counts of the data points falling in different cells • Compute the chi-square value given by the formula.
  • 78.
    Applications of Chi-square Comparethe sample value of the statistic as obtained in previous step with the critical value at a given level of significance and make the decision.
  • 79.
    Applications of Chi-square Chi-squaretest for goodness of fit • The hypothesis to be tested in this case is: H0 : Probabilities of the occurrence of events E1, E2, ..., Ek are given by the specified probabilities p1, p2, ..., pk H1 : Probabilities of the k events are not the pi stated in the null hypothesis. The procedure has already been explained.
  • 80.
    Applications of Chi-square Chi-squaretest for independence of variables The chi-square test can be used to test the independence of two variables each having at least two categories. The test makes a use of contingency tables also referred to as cross-tabs with the cells corresponding to a cross classification of attributes or events. A contingency table with three rows and four columns (as an example) is as shown below.
  • 81.
    Applications of Chi-square Assumingthat there are r rows and c columns, the count in the cell corresponding to the ith row and the jth column is denoted by Oij, where i = 1, 2, ..., r and j = 1, 2, ..., c. The total for row i is denoted by Ri whereas that corresponding to column j is denoted by Cj. The total sample size is given by n, which is also the sum of all the r row totals or the sum of all the c column totals. The hypothesis test for independence is: H0 : Row and column variables are independent of each other. H1 : Row and column variables are not independent. The hypothesis is tested using a chi-square test statistic for independence given by:
  • 82.
    Applications of Chi-square Thedegrees of freedom for the chi-square statistic are given by (r – 1) (c – 1). The expected frequency in the cell corresponding to the ith row and the jth column is given by: For a given level of significance α, the sample value of the chi-square is compared with the critical value for the degree of freedom (r – 1) (c – 1) to make a decision.
  • 83.
    Applications of Chi-square Chi-squaretest for the equality of more than two population proportions The analysis is carried out exactly in the same way as was done for the other two cases. The formula for a chi-square analysis remains the same. However, two important assumptions here are different. (i) We identify our population (e.g., age groups or various class employees) and the sample directly from these populations. (ii) As we identify the populations of interest and the sample from them directly, the sizes of the sample from different populations of interest are fixed. This is also called a chi-square analysis with fixed marginal totals. The hypothesis to be tested is as under: H0 : The proportion of people satisfying a particular characteristic is the same in population. H1 : The proportion of people satisfying a particular characteristic is not the same in all populations. The expected frequency for each cell could also be obtained by using the formula as explained early. The decision procedure remains the same.
  • 84.
    Applications of Chi-square Examiningstrength of relationship between two nominal scale variables 1. Contingency coefficient – Applicable when number of rows equal the number of columns in a contingency table. The value of the contingency coefficient is given by: The lower limit of C equals zero when χ2 is zero. The upper limit of C when the number of rows is equal to the number of columns is given by the expression:
  • 85.
    Applications of Chi-square 2.Phi coefficient (Ф) – Can be applied when the number of rows and columns in a contingency table are two. The phi-coefficient like the correlation coefficient can assume any value between –1 and 1. In a 2x2 table given below phi coefficient can be computed as: Column 1 Column 2 Total Row 1 a b a + b Row 2 c d c + d Total a + c b + d (a+b+c+d)
  • 86.
    Applications of Chi-square 3.Cramer’s V Statistic – To be used when number of rows are not equal to number of columns in a contingency table. Minimum value of V equals zero when chi-square is equal to zero. The maximum value of chi-square equals n (f-1) and in that case the maximum value of V equals 1.
  • 87.
    Run Test forRandomness Run test is used to test the randomness of a sample. Run: A run is defined as a sequence of like elements that are preceded and followed by different elements or no elements at all. Let n = Total size of the sample n1 = Size of sample in group 1 n2 = Size of sample in group 2 r = Number of runs For large samples, either n1 > 20 or n2 > 20, the distribution of runs (r) is normally distributed with: Standard Deviation Mean
  • 88.
    Run Test forRandomness The hypothesis is to be tested is: H0 : The pattern of sequence is random. H1 : The pattern of sequence is not random. For a large sample the test statistic is given by: For a given level of significance, if the absolute value of computed z is greater than the absolute value of tabulated z, null hypothesis is rejected. In case of numerical data, the original data are grouped into two categories, one above and second below median.
  • 89.
    One-Sample Sign Test •The test on mean discussed in Chapter 12 is based upon the assumption that the samples are drawn from a population having roughly the shape of a normal distribution. • This assumption gets violated, especially while using the non-metric data (ordinal or nominal). • In such situations, the standard tests can be replaced by a non-parametric test. • One such test is called one-sample sign test.
  • 90.
    One-Sample Sign Test •Suppose the interest is in testing the null hypothesis H0 : μ = μ0 against a suitable alternative hypothesis. • Let n denote the size of sample for any problem. To conduct a sign test, each sample observation greater than μ0 is replaced by a plus sign, whereas each value less than μ0 is replaced by a minus sign. • In case a sample observation equals μ0, it is omitted and the size of the sample gets reduced accordingly.
  • 91.
    One Sample SignTest • Testing the given null hypothesis is equivalent to testing that these plus and minus signs are the values of a random variable having a binomial distribution with p = ½. For a large sample, z test as given below is used: SLIDE 7-1 As the binomial distribution is a discrete one whereas the normal distribution is a continuous distribution, a correction for continuity is to be made. For this, X is decreased by 0.5 if X > np and increased by 0.5 if X < np.
  • 92.
    One-Sample Sign Test Fora given level of significance, the absolute value of computed Z is compared with absolute value of tabulated Z to accept or reject the null hypothesis. As under the null hypothesis, p = ½, therefore
  • 93.
    Two-Sample Sign Test •This test is a non-parametric version of paired-sample t-test. • It is based upon the sign of a pair of observations. • Suppose a sample of respondents is selected and their views on the image of a company are sought. • After some time, these respondents are shown an advertisement, and thereafter, the data is again collected on the image of the company. • For those respondents, where the image has improved, there is a positive and for those where the image has declined there is a negative sign assigned and for the one where there is no change, the corresponding observation is dropped from the analysis and the sample size reduced accordingly. • The key concept underlying the test is that if the advertisement is not effective in improving the image of the company, the number of positive signs should be approximately equal to the number of negative signs. • For small samples, a binomial distribution could be used, whereas for a large sample, the normal approximation to the binomial distribution could be used, as already explained in the one-sample sign test.
  • 94.
    Mann-Whitney U Testfor Independent Samples • This test is an alternative to a t test for testing the equality of means of two independent samples discussed in Chapter 12. • The application of a t test involves the assumption that the samples are drawn from the normal population. • If the normality assumption is violated, this test can be used as an alternative to a t test.
  • 95.
    Mann-Whitney U Testfor Independent Samples • A two-tailed hypothesis for a Mann-Whitney test could be written as: H0 : Two samples come from identical populations or Two populations have identical probability distribution. H1 : Two samples come from different populations or Two populations differ in locations.
  • 96.
    Mann-Whitney U Testfor Independent Samples The following steps are used in conducting this test: (i) The two samples are combined (pooled) into one large sample and then we determine the rank of each observation in the pooled sample. If two or more sample values in the pooled samples are identical, i.e., if there are ties, the sample values are each assigned a rank equal to the mean of the ranks that would otherwise be assigned. (ii) We determine the sum of the ranks of each sample. Let R1 and R2 represent the sum of the ranks of the first and the second sample whereas n1 and n2 are the respective sample sizes of the first and the second sample. For convenience, choose n1 as a small size if they are unequal so that n1 ≤ n2. A significant difference between R1 and R2 implies a significant difference between the samples.
  • 97.
    Mann-Whitney U Testfor Independent Samples If n1 or n2 > 10, a Z test would be appropriate. For this purpose, either of U1 or U2 could be used for testing a one-tailed or a two-tailed test. In this test, U2 will be used for the purpose.
  • 98.
    Mann-Whitney U Testfor Independent Samples • Assuming the level of significance as equal to α, if the absolute sample value of Z is greater than the absolute critical value of Z, i.e., Zα/2, the null hypothesis is rejected. • A similar procedure is used for a one-tailed test. Under the assumption that the null hypothesis is true, the U2 statistic follows an approximately normal distribution with mean:
  • 99.
    Wilcoxon Signed-Rank Testfor Paired Samples • The case of paired sample (dependent sample) was discussed in Chapter 12 using a t distribution. • The use of t distribution is based on the normality assumption. • However, there are instances when the normality assumption is not satisfied and one has to resort to a non-parametric test. One such test earlier discussed was the two-sample sign test. • In two-sample sign test, only the sign of the difference (positive or negative) was taken into account and no weightage was assigned to the magnitude of the difference. • The Wilcoxon matched-pair signed rank test takes care of this limitation and attaches a greater weightage to the matched pair with a larger difference. • The test, therefore, incorporates and makes use of more information than the sign test. • This is, therefore, a more powerful test than the sign test.
  • 100.
    Wilcoxon Signed-Rank Testfor Paired Samples The test procedure is outlined in the following steps: (i) Let di denote the difference in the score for the ith matched pair. Retain signs, but discard any pair for which d = 0. (ii) Ignoring the signs of difference, rank all the di’s from the lowest to highest. In case the differences have the same numerical values, assign to them the mean of the ranks involved in the tie. (iii) To each rank, prefix the sign of the difference. (iv) Compute the sum of the absolute value of the negative and the positive ranks to be denoted as T– and T+ respectively. (v) Let T be the smaller of the two sums found in step iv.
  • 101.
    Wilcoxon Signed-Rank Testfor Paired Samples • When the number of the pairs of observation (n) for which the difference is not zero is greater than 15, the T statistic follows an approximate normal distribution under the null hypothesis, that the population differences are centered at 0. • The mean μT and standard deviation σT of T are given by: • The test statistics is given by:
  • 102.
    Wilcoxon Signed-Rank Testfor Paired Samples • For a given level of significance α, the absolute sample Z should be greater than the absolute Zα /2 to reject the null hypothesis. • For a one-sided upper tail test, the null hypothesis is rejected if the sample Z is greater than Zα and for a one- sided lower tail test, the null hypothesis is rejected if sample Z is less than – Zα.
  • 103.
    The Kruskal-Wallis Test •The Kruskal-Wallis test is in fact a non-parametric counterpart to the one-way ANOVA. • The test is an extension of the Mann-Whitney U test. • Both of them require that the scale of the measurement of a sample value should be at least ordinal. • The hypothesis to be tested in-Kruskal-Wallis test is: H0 : The k populations have identical probability distribution. H1 : At least two of the populations differ in locations.
  • 104.
    The Kruskal-Wallis Test Theprocedure for the test is listed below: (i) Obtain random samples of size n1, ..., nk from each of the k populations. Therefore, the total sample size is n = n1 + n2 + ... + nk (ii) Pool all the samples and rank them, with the lowest score receiving a rank of 1. Ties are to be treated in the usual fashion by assigning an average rank to the tied positions. (iii) Let ri = the total of the ranks from the ith sample.
  • 105.
    The Kruskal-Wallis Test •The Kruskal-Wallis test uses the χ2 to test the null hypothesis. The test statistic is given by: CONCEPTS AND which follows a χ2 distribution with the k–1 degrees of freedom. Where, k = Number of samples n = Total number of elements in k samples. • The null hypothesis is rejected, if the computed χ2 is greater than the critical value of χ2 at the level of significance α.
  • 106.
    Meaning of Univariate,Bivariate & Multivariate Analysis of Data • Univariate Analysis – In univariate analysis, one variable is analysed at a time. • Bivariate Analysis – In bivariate analysis two variables are analysed together and examined for any possible association between them. • Multivariate Analysis – In multivariate analysis, the concern is to analyse more than two variables at a time. The type of statistical techniques used for analysing univariate and bivariate data depends upon the level of measurements of the questions pertaining to those variables. Further, the data analysis could be of two types, namely, descriptive and inferential.
  • 107.
    Descriptive vs InferentialAnalysis Descriptive analysis - Descriptive analysis deals with summary measures relating to the sample data. The common ways of summarizing data are by calculating average, range, standard deviation, frequency and percentage distribution. The first thing to do when data analysis is taken up is to describe the sample. Examples of Descriptive Analysis: • What is the average income of the sample? • What is the average age of the sample? • What is the standard deviation of ages in the sample? • What is the standard deviation of incomes in the sample? • What percentage of sample respondents are married? • What is the median age of the sample respondents? • Is there any association between the frequency of purchase of product and income level of the consumers?
  • 108.
    Descriptive vs InferentialAnalysis • Is the level of job satisfaction related with the age of the employees? • Which TV channel is viewed by the majority of viewers in the age group 20–30 years? • Types of Descriptive Analysis – The table below presents the type of descriptive analysis that is applicable under each form of measurement.
  • 109.
    Descriptive vs InferentialAnalysis Inferential Analysis – Under inferential statistics, inferences are drawn on population parameters based on sample results. The researcher tries to generalize the results to the population based on sample results. Examples of Inferential Analysis: • Is the average age of the population significantly different from 35? • Is the average income of population significantly greater than 25,000 per month? • Is the job satisfaction of unskilled workers significantly related with their pay packet? • Do the users and non-users of a brand vary significantly with respect to age? • Is the growth in the sales of the company statistically significant?
  • 110.
    Descriptive vs InferentialAnalysis • Does the advertisement expenditure influence sale significantly? • Are consumption expenditure and disposable income of households significantly correlated? • Is the proportion of satisfied workers significantly more for skilled workers than for unskilled works? • Do urban and rural households differ significantly in terms of average monthly expenditure on food? • Is the variability in the starting salaries of fresh MBA different with respect to marketing and finance specialization?
  • 111.
    Descriptive Analysis ofUnivariate Data One should look at the missing data, if any, before starting the analysis. The analysis is to be carried out as stated below: • Frequency distribution & percentage distribution (for Nominal scale) • Analysis of multiple responses (for Nominal scale) • Analysis of ordinal scaled questions • Grouping of large data sets
  • 112.
    Descriptive Analysis ofUnivariate Data Measures of Central Tendency • Arithmetic mean (appropriate for Interval and Ratio scale data) • Median (appropriate for Ordinal, Interval and Ratio scale data) • Mode (appropriate for Ordinal, Interval and Ratio scale data)
  • 113.
    Descriptive Analysis ofUnivariate Data Measures of Dispersion • Range (appropriate for Interval and Ratio scale data) • Variance and Standard Deviation (appropriate for interval and ratio scale data) • Coefficient of variation (appropriate for Ratio scale data) • Relative and absolute frequencies (appropriate for Nominal scale data)
  • 114.
    Descriptive Analysis ofBivariate Data Preparation of cross-tables Interpretation of cross-tables – For interpretation of cross-tables, it is required to identify dependent and independent variable. Percentages should be computed in the direction of independent variable. There is no hard and fast rule as to where the dependent or independent variables are to be taken. They can be taken either in rows or in columns.
  • 115.
    Descriptive Analysis ofBivariate Data Elaboration of cross-tables: • Once the relationship between the two variables has been established, the researcher may introduce a third variable into the analysis to elaborate and refine the initial observed relationship between two variables. • The main question being asked is whether the interpretation of the relationship is modified with the introduction of the third variable. • There would be four possibilities on introducing the third variable. (i) It may refine the association that was observed originally between two variables. (ii) By introducing the third variable, it may be found that there was no association between initial variables or the original association was spurious. (iii) Introducing a third variable may indicate association between original two variables although no association was observed originally. (iv) Introduction of the third variable may not show any change in the initial association between two variables.
  • 116.
    Descriptive Analysis ofBivariate Data Refining an initial relationship: The data reported below represents the relationship between consumption of ice cream and income level. The above table indicates that 55 per cent of high income respondents fall into high consumption category as compared to 30 per cent of low income respondents. Before concluding that high income respondents consume more ice cream as compared to low income families, a third variable, namely, gender, is introduced into the analysis. The results are reported in the following table:
  • 117.
    Descriptive Analysis ofBivariate Data In case of females, 60 per cent with high income fall in the high consumption category as compared to 20 per cent of those with low income. In case of males, 38 per cent with high income fall in the high consumption category as compared to 30 per cent with low income. Therefore, it is seen that percentages are closer in case of males. Therefore, the relationship between ice cream consumption and income has been refined by introduction of a third variable, namely, gender.
  • 118.
    Descriptive Analysis ofBivariate Data Initial relationship was spurious: The data below reports the relationship between ownership of flats in high-rise buildings and education level. The above table indicates that 35 per cent of respondents with high education own a flat in a high-rise building as opposed to 22 per cent with low education. Now when a third variable ‘income’ categorized as low and high income is introduced, the resulting table is as follows:
  • 119.
    Descriptive Analysis ofBivariate Data In the above table it is found that irrespective of the education level, the ownership of flat in high-rise buildings depends upon the income level.
  • 120.
    Descriptive Analysis ofBivariate Data Reveal suppressed association: The relationship between desire to visit temple and age group is presented in the table below: The above table shows that desire to visit temple is independent of age. Now, when gender is added as the third variable, the results obtained are summarized in the following table.
  • 121.
    Descriptive Analysis ofBivariate Data It is seen from the above table that 65 per cent of males above 35 have a high desire to go to temple whereas 70 per cent of females below 35 have a high desire to go to temple. Therefore, the introduction of the third variable has revealed the suppressed relationship between desire to visit temple and age.
  • 122.
    Descriptive Analysis ofBivariate Data No change in initial relationship: The relationship between household size and the size of toothpaste bought by households is given in the table below: The above table indicates that 60 per cent of the large households buy large-sized toothpaste whereas 60 per cent of small households buy small-size toothpaste. Now if income categorized as low income and high income is introduced as third variable, the resulting table is as follows:
  • 123.
    Descriptive Analysis ofBivariate Data It is found that even with the introduction of the third variable, i.e., income, the initial relationship remains unchanged. Spearman’s rank order correlation coefficient In case of ordinal scale data, the measure of association between two variables is obtained through Spearman’s rank order correlation coefficient.
  • 124.
    Descriptive Analysis ofBivariate Data Spearman’s rank correlation coefficient is given by The rank correlation coefficient takes a value between –1 and +1.
  • 125.
    More on Analysisof Data Calculating summarized rank order The rankings of attributes while choosing a restaurant for dinner for 32 respondents can be presented in the form of frequency distribution in the table below.
  • 126.
    More on Analysisof Data To calculate a summary rank ordering, the attribute with the first rank is given the lowest number (1) and the least preferred attribute is given the highest number (5). The summarized rank order is obtained with the following computations as: The total lowest score indicates the first preference ranking. The results show the following rank ordering: (1) Food quality (2) Service (3) Ambience (4) Menu variety (5) Location
  • 127.
    More on Analysisof Data Data transformation The original data is changed to a new format for performing data analysis so as to achieve the objectives of the study. This is generally done by the researcher through creating new variables or by modifying the values of the scaled data. The following illustrations show how it is carried out. • Ask the question on date of birth instead of asking the exact age. • At times it may become essential to collapse or combine adjacent categories of a variable so as to reduce the number of categories of original variables. In a 5-point Likert scale, having categories like strongly agree, agree, neither agree nor disagree, disagree and strongly disagree can be clubbed into three categories.
  • 128.
    More on Analysisof Data • The researcher could create new variables by re-specifying the data with numeric or logical transformation. Suppose a multiple-item Likert scale designed to measure the perception of a customer towards the bank has 10 items. The total score of a respondent can be computed as: Total score of ith respondent = Score of ith respondent on item 1 + Score of ith respondent on item 2 + ... + Score of ith respondent on item 10. Once the total score for each of the respondent is computed, the average score can be obtained by dividing it by the number of items. It can be further categorized as favourable, neutral and unfavourable perception that could be related to various demographic variables depending upon the objectives of research.