Document Sample
hypothesis Powered By Docstoc
					  Module 5

Hypothesis testing
           Hypothesis - What
• Null Hypothesis – A statement of status quo
  which means no difference or no effect.

• Alternative Hypothesis – A statement where
  some difference or effect is expected.
   General Procedure for Hypothesis Testing
            Formulate the null and alternative hypotheses

                      Select an appropriate test

                   Choose the level of significance

              Collect data and calculate the test statistic

                                             Check the critical value
Determine the probability      Compare         of the test statistic
 associated with the test

                Reject or do not reject null hypothesis
      Errors in hypothesis testing
• Type I Error – Sample results lead to the rejection
  of the null hypothesis when it is in fact true.
  (probability of type I error denoted by α)

• Type II Error – Sample results lead to the
  acceptance of the null hypothesis when it is infact
  false. (probability of type II error denoted by β)
                                 Hypothesis Tests

          Parametric tests                               Non Parametric tests

   One                   Two                          One                Two
  Sample               Samples                       Sample            Samples
t test                                              Chi - square
z test                                              K-S
         Independent         Paired                 Binomial                 Paired
         Two group           Paired t                                    Sign
         t test              test                     Chi - square       Wilcoxon
         z test                                       Mann - Whitney     McNemar
                                                      Median             Chi - Square
             Parametric Tests

• Parametric tests assume that the variables pf
  interest are measured on at least an interval

• Provide inferences about means of parent
                    t - test
• T statistic used for making inferences about
  the parent populations.

• T – test: Assumes that the variable is normally
  distributed, with μ mean, population variance
  σ² is unknown
• Population variance is estimated from the
  sample s².
               T - Test Cont…
• T distribution similar to normal but with more
  area under the tails and less under the peak

• T distribution approaches normal distribution
  as degrees of freedom increase.

• For samples of 120 or more, t and normal
  distributions are mutually indistinguishable.

• Degree of freedom = n-1
                    Z test
• Z test is conducted in case of normal

• The population standard deviation is assumed
  to be known in this case
                     F test
• F Test is conducted in case of comparison of
  two independent samples. (eg. Difference
  between users and non users)

• An F test of sample variance may be
  conducted if it is not known if the two
  populations have equal variance.
          Non Parametric tests

• Non Parametric tests assume that the
  variables of interest have been measured on
  nominal or ordinal scales

• Tests are available for
  – One ; Two (independent or paired tests)
     U test (Mann – Whitney’s U)
• Used in case of two independent samples

• Used when the difference in the location of the two
  populations is to be compared based on two
  independent samples

• Samples are combined and cases ranked in ascending
  order. If the samples are from the same population,
  their distribution should be random.
    Rank Sum test – Wilcoxon test

• Used in case of paired samples

• Test analyses the differences of the between paired
  observations taking into account the magnitude.

• Computes the differences and ranks the differences.
• In case of no difference the ‘Z’ statistic is a standard
  normal variate with mean 0 and variance 1
     KW test (Kruskal Wallis test)
• It is a non parametric test for comparing
  population medians.

• Tests the null hypothesis that k samples from
  possibly different populations actually
  originate from the same population.
           KW test procedure
• Each observation in K samples replaced by its
  rank with smallest observation getting 1 and
  greatest N (N= total sample size of k samples)

• Sum of ranks is computed for each sample.

• KW determines whether the sums are
  different enough for the samples to have
  come from different populations

Shared By: