Statistics Can Be Broadly Classified Into Two Categories Namely (I) Descriptive Statistics and (II) Inferential Statistics

Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 59

TESTING OF HYPOTHESIS 

 “The greatest tragedy of research is the slaying of a


beautiful hypothesis by an ugly fact.”
 
 Statistics can be broadly classified into
two categories namely
 (i) Descriptive Statistics and
 (II) Inferential Statistics.
 This unit deals with the inferential
statistics, in particular, Testing of
hypothesis.
 
STATISTICAL INFERENCE

Statistical Inference means making inference


about the population from the sample taken
from it. This is classified into two broad
categories, namely
1. Estimation Theory
2. Testing of Hypothesis.
The overview of Statistical Inference is
furnished below.
 TESTING OF HYPOTHESIS

Hypothesis:
A statistical hypothesis is some statement
made about the population characteristic in terms
of the parameter value of parent distribution.
In testing of hypothesis we either reject or
accept the null hypothesis.
 The basic idea is take a random sample from
the population. If the sample supports your
hypothesis then accept the hypothesis. (i.e.,
the hypothesis is true), otherwise reject the
hypothesis
Statisticaltesting involves verifying or
refuting statements concerning properties
of the population, with some probability of
error, based on data from a subset of that
population.
The subset of the population, which is
selected randomly, is termed a sample.

From the sample data, a test statistic is


calculated which allows us to make a
decision regarding the null hypothesis.
Test procedure involves the following 5 steps
Step 1.
Hypothesis Framing of Hypotheses

 A. Null hypothesis
 Null Hypotheses are presumptions about the status quo
in the population and are either upheld or disallowed
depending upon the result of a statistical test.
 Null Hypothesis:
 Version 1 Null  neutral (Text Book)
 Version 2 Null  nullify (RA Fisher Reject /

Discard)
Null hypothesis is a neutral or null state hypothesis

Horlicks Vs Complan
Hypo 1: H > C
Hypo 2: H < C
Hypo 3: H = C
Among them which one is in null state?
How to guarantee the null state?
Begin your hypothesis with :
There is no significant difference between
_____________ and ______________
Version 2
 According to RA Fisher Null Hypothesis is
an Hypothesis which is tested for possible
rejection under the assumption that it is true.
He insists us to select the easily reject able
hypothesis as the null hypothesis
 As the consequence, Instead of simpliy
writing the inference as, null hypothesis is
accepted, it is expected to be written as “
since the data do not support for the rejection
of Null hypothesis, it is not rejected”
 The researcher must give an Alternative
Hypothesis in the test procedure.

 Whenever the Ho is rejected the H1 will be


accepted automatically.

 Based on Alternative hypothesis, the test is


called one-tailed test or two-tailed test.
Unless there are good reasons about
the hypothesis, a two tailed test
should be postulated.
One-tailed tests are appropriate
when a theoretical perspective based
on previous research would suggest
that the difference should occur other
than the one predicated.
Step 2. Fixing lvel of significance
based on Type 1 and Type 2 errors

ACCEPT REJECT

HO TRUE  Type I error

HO FALSE Type II error 


EDUCATION:

PASS FAIL

Good Student  Type I error

Poor Student Type II error 


ACCEPT REJECT

Good Product  Type I error

Poor Quality Type II error 


Our aim is to minimize both Type
I and Type II error
simultaneously.

But unfortunately they work on


opposite direction. i.e., if you
reduce Type I error then the
Type II error will increase and
vice versa.
What can at best achieved is a reasonable
balance between these two errors.
In all testing of hypothesis procedures, it is
simply assumed that type I error is much
more severe than type II error and so needs
to be controlled.
Hence what we do in statistical testing
procedure is, we are fixing the Type I error
at a specified level. Usually at 5% or 1%.
But this is not mandatory.
You can fix any level of your choice.
Hence fixing the level of significance is
the work of the scholar.
Z=

Step 3. Construction of Test Statistic:


The general formula for test statistic is
given by
Statistic - E(Statistic)
• Test Statistic :
Standard Error (Statistic)

Example : Large Sample:


x
Z =  ~ N[0,1]
• n
Small Sample

x
t= ~ tn-1
S
n
Step 4: to find the Calculated
value

In the case of problems, we calculate


and substitute the required entities in
the test statistics from the sample and
do the simplification. Ultimately we
get a single value known as the ‘
Calculated Value’
 Inference can be done in any one of three
approaches. All of them will lead to the same
conclusion.
The three approaches are:
1. Critical value approach.
2. P- value approach.
3. Confidence interval approach.
Note: In the SPSS output, one can see the
provisions for all these three. The researcher can
select any one of the approaches. Select p-value
approach due its advantages.
Classical approach: Class room teaching
 Under the “Classical approach, with a fixed
predetermined value namely ‘critical value’ or
‘table value’, a test will produce a decision as to
whether or not to reject Ho.
Decision rule
If the calculated value is less than the table
value , the sample does not provide any evidence
to reject the null hypothesis and hence H 0 is
accepted. Otherwise, it is rejected.

Remark
But merely comparing the observed test
statistic with some critical value and
concluding as
 “using a 5% test, reject Ho” or
 “reject Ho with significance level 5%” or
“result is significant at 5%”
(all equivalent statements)
does not provide the recipient of the results
with clear detailed information on the
strength for the evidence against Ho.
P-value
A more informative approach is to calculate and quote
the probability value (p – value ) of the observed test
statistic.
The p-values is the lowest level at which Ho can be
rejected. The smaller the p-value, the stronger is the
evidence against the null hypothesis.
Decision Rule:
If the p value is less than the level of significance α, the
null hypothesis H0 is rejected. Otherwise it is accepted.

Note the difference between these two approaches: The


researcher may likely to have confusion but be clear.
Let us revisit the Statistical testing procedure which
requires the following steps:
 data, statements(hypotheses) regarding the
population are formulated,
 A sample, randomly selected from the
population, containing information pertinent to
the hypothesis, is drawn,
 An acceptable significance level (alpha) is
established,
 A test statistic and its observed significance
level (p value) are computed from the sample
Continue:

The p value of the test statistic is compared to


alpha,
A decision regarding the null hypothesis is
made.
This procedure allows the researcher to draw
conclusions about the population whether to
accept or reject the null hypothesis made
about the population from the sample data.
Why the “Normal Distribution” is important?
 
 The “Normal distribution” is important
because in most cases, it will approximate the
function that was introduced in the previous
paragraph.
 The distribution of many test statistics is
normal or follows some form that can be
derived from the Normal distribution.
 An important aspect of the ‘description’ of a
variable is the shape of its distribution, which
tells you the frequency of values from different
ranges of the variable.
 Typically a researcher is interested in how well
the distribution can be approximated by the
normal distribution (see also the Elementary
Concepts section).
 Simple descriptive statistics ( Histogram,can
provide some information relevant to this issue.
TESTS OF MEANS: t – TESTS:
 Although there are a variety of
parametric tests, this module concentrates on
three commonly used tests of means.
 All three of these procedures assume that
the data is measured at a interval scale or
quantitative data in random samples selected
from a Normally-distributed Population. Each
of these tests employs a statistic which
follows a t-distribution.
One Samples t – test:
  The first procedure is the one-sample t-
test.
 In this case the objective is to test whether the
population mean is equal to a specific value.
 The null hypothesis, which is a statement
of the status quo, states that the population
mean is equal to the hypothesized value.
 Another way to state this null hypothesis is to
say that we are testing whether the difference
between the population mean and the
hypothesized value is equal to zero.
 H0 : µ = µ0 or H0 : µ - µ0 = 0

 The two-sided alternate hypothesis states that this


mean difference is not zero. This procedure is
termed a one-sample test since only one sample
from the population is involved.
 H1 : µ ≠ µ0 or H1 : µ - µ0 ≠ 0
T-test one sample
• Test Statistic


x 
•t = S ~ tn-1
n
 Another procedure is the dependent-sample
t-test.
 In this instance the purpose is to test whether

the population means of two different


variables are equal.
 Here the null hypothesis states that the two

population means are equal, which is the


same as stating that the mean of the
difference between the two variables is equal
to zero.
Continue:
The two-sided alternate hypothesis
specifies that this difference is
unequal to zero.

This procedure is so named because


both variables being tested come
from the same observations and are
therefore statistically dependent.
Assumption: differences constitute a random
sample from a normal distribution
Ho: o (=1 - 2) = 

D
Test statistics is under Ho = ~ t n 1
Sot n

 
Why Paired t-test?
• In testing for difference between two
population means, the use of independent
samples can have a major drawback.
• Even if a real difference does exist, the variability
among the responses within each sample can be
large enough to make it.
• The random variation within the samples
will mask the real difference between the
populations from which they come.
 One way to control this variability external to
the issue in question is
 to use a pair of responses from each subject
and then work with the differences within the
pairs.
 The aim is to remove as far as possible the
subject-to-subject variation from the
analysis, and thus
 to “home in” on any real difference between
the populations.
 The final procedure is the independent-
samples t-test.
 The goal here is to test whether two

population means are equal.


 For this test, two samples are drawn (or one

sample is divided into two mutually exclusive


groups ), and the test is performed using a
variable common to both groups.
 The null hypothesis states that the population
means of the two groups are equal.

 The two-sided alternate hypothesis states that the


means are unequal.

 The two samples, or sample groups, are


independent of each other because no
observation is present in both groups, hence the
name independent- samples t-test.
BASIC TESTS - TWO INDEPENDENT
SAMPLES:

• Testing the value of the difference


between two population means:
Basic situations:
• Independent random
samples, sizes n1 and n2 from N (1,12)
and N (2,22)
• H0: 1- 2 =
 12, 22 known
Continue:

x1  x 2  
• Test statistic: z =
 2
 2
1
 2

n1 n2

• (b) 12 , 22 unknown – much the more


usual situation when 12, 22 known.

 Further, the Central Limit Theorem justifies the


use of a normal approximation for the
distribution of the test statistic in sampling
from any reasonable populations, so the
requirement that we are sampling from normal
distributions is not necessary.
Small Samples:

Under the assumptions 12=22 (=2 say), this


common variance is estimated by Sp2, and is
distributed as t with n1 + n2 – 2 degrees of
freedom under H0. So

x1  x 2  
 t =
1 1
sp 
n1 n 2
Continue:
2 2
(n - 1) s + (n - 1)s
1 2
Remember that Sp2 =
Problem
n 1  n2  2
In an experiment using identical twin babies,
one baby in each of 10 sets was fed food stuff, A. While
the other twin was fed food stuff B. the gains in weight
in kg are given below 
A 24 28 31 32 25 27 37 31 26 29
B 19 24 32 28 28 29 31 33 29 27
  Identify which type of t-test has to apply.
  Analysis of variance is one of the
powerful tool in testing of hypothesis.
 If one is interested in testing equality of
several means at a time, the technique of
Analysis of Variance is used.
   There are many situations where data
are classified into one, two or more ways.
One way classification:
 Let there be three treatments A,B,C each
replicated n1,n2 and n3 times.
   A B C

X11 X21 X31

X12 X22 X32

. . .

. . .

. . .

X1n1 X2n2 X3n3

T1 T2 T3
Total
ANOVA continue
Ho :   
A B c

H1 : Atleast one treatment is different from others.

Grand total (G) = T1 + T2 + T3 =


  xij
i j

G2
Correction Factor CF = , n is number of observations
n
Sources Sum of d.f Mean sum of F- ratio
of squares squares
variation
Treatment SST (K-1) MST = SST/K-1 F =MST/ MSE
Error SSE (N-K) MSE = SSE / N-K
Total TSS (N-1)

Inference : If Fcal < Ftab Accept Ho otherwise


reject.
 
Catalyst 1 Catalyst 2 Catalyst 3

100 76 108

96 80 100

92 75 96

96 84 98

92 82 100

Total 476 397 502


Based on the above data, can it be inferred that the effect of three
catalysts differ significantly with respect to yield of the chemical
product?
Ho: Average yield of the chemical product
under the three catalysts is same.
H1: Average yield of the chemical product for
atleast one catalyst is different from the yield
corresponding to the remaining catalysts.
Following the general practical steps, we find
the various sums of squares, noting that here
number of levels 3 (which is equal to k ) and
n1 = 5 (number of batches tested for each
level).
 
1. G = (100 + 96+ .. + 92) +
2. (76+80+….82) +
(108+100+…+100)
= 1375
2.
i
j
x = (1002 + 962+ .. + 922) +
ij
(762+802+….822) +
(1082+1002+…+1002)
= 127425
3. N =  n1= n1 + n2 + n3 = 5+ 5+ 5 = 15
Anova calculations
• 4. CF = G2 / N = 13752­ / 15 = 126041.67 
• 5. TSS =  - CF = 127425 – 126041.67
• = 1383.33
• 6. SS =  (  / n) - CF
= 4762 + 3972++ 5022) / 5 – 126041.67
= 1196.1 
• 7. SS4 = TSS – SS4
= 1383.33 – 1196.13
• = 187.20
The results are summarized in the following ANOVA table.

ANOVA Table for Life of Batteries


Source d.f SS MS F F

Catalyst 2 1196.13 598.65 38.375 F0.5@2,12 =


3.89*
Error 12 187.20 15.60 F3.212 = 6.93**

Total 14 1383.33

Note: Tabulated F-values at 5% and 1% levels are


indicated by * and ** respectively.
Inference:
Here calculated value of F is greater than the
tabulated value of F and hence the null
hypothesis is rejected. Therefore, we may
conclude that the three catalysts differ
significantly.
Problem :
Identify the appropriate t-test.

The gain in weight of two random samples of


rats fed on two different diets A and B are given
below. Examine whether the difference in mean
increases in weight is significant.

Diet A: 13 14 10 11 12 16 10 8
Diet B: 7 10 12 8 10 11 9 10
Problem :
• Tow horses A and B were tested according to the
time (in seconds) to run a particular track with
the following results.
Horse A: 28 30 32 33 33 29 34
Horse B: 29 30 30 24 27 29
• Test whether the two horses have the same
running capacity. Find the appropriate t-test.
 
 A test was given to five students taken at
random from the fifth class of three schools
of a town individuals scores are:

 School 1: 9 7 6 5 8

 School 2: 7 4 5 4 5

 School 3: 6 5 6 7 6
Carryout analysis of variance and state
your conclusion.
Problem : Yields of three varieties of wheat
given below
Variety yield
 I 10 9 8
 II 7 7 6
 III 8 5 4
 Parametric tests are more powerful when the
following conditions are satisfied:

 Normality

 Measurement in interval scale

 Sample size is reasonable


Note:
 If any of these conditions are
violated the parametric tests are not
appropriate.
 In such cases one should go for the

Nonparametric tests.
 That is the focal theme of the next

module.

You might also like