Hypothesis Testing
Hypothesis Testing
Presented by:
ANGANA SAHU
VINEET KOTHARI
SUMITI SIDANA
ANIL GOENKA
Data Types
Data
Data
Quantitative
Quantitative Qualitative
Qualitative
Discrete
Discrete Continuous
Continuous
Hypothesis Tests
Qualitative Data
Qualitative
Qualitative
Data
Data
22 or
or more
more
11 prop.
prop. prop.
prop.
Proportion
Proportion Independence
Independence
22 prop.
prop.
ZZ Test
Test ZZ Test
Test 22 Test
Test 22 Test
Test
Why Hypotheses?
Guides the direction of the study
Identifies facts that are relevant
conditions:
• Must be adequate for its purpose
• Must be testable
The Normal Distribution
Many continuous variables follow a normal distribution, and it plays a
special role in the statistical tests we are interested in;
Mean and standard deviation tell you the basic features of a distribution
mean = average value of all members of the group
standard deviation = a measure of how much the values of individual
members vary in relation to the mean
• The normal distribution is symmetrical about the mean
Normal Distribution and Confidence
Intervals
Any normal X
distribution can be Z
transformed to a
standard distribution
(mean 0, s.d. = 1)
using a simple
transform
-1.96 1.96
0.025 = p-value: probability of a measurement value not belonging to this distribution
Multi-Sample: Setting Up the
Hypothesis
H0: 1 2 H0: 1 - 2 0
OR Right
H1: 1 > 2 H1: 1 - 2 > 0 Tail
Xi
Zi
• The standard deviation of the
sampling distribution.
The Z-test – an example
H0: μ=4000a
Ha: μ=4000, S.E= σ/n½=200/100½=20 rating points.
Z= X- μ0 =3980-4000 =-1
S.E 20
Population
Obtained
mean=-1
-1
Ho
Sample=100
Basic idea:
Sampling Distribution
20 = 50 Sample Mean
Determining the error involved
Correct
Correct Type1 Type2 error
Decision
Decision error
Alpha:α Beta :β
Alpha (α)
Note that alpha (α) is:
• The probability of rejecting the null
hypothesis when the null is in fact true.
• It is this the probability of making a
Type I error
• By convention, we usually set α=.05
Two sample
Independent Dependent
sample
Ha : 1 2 A 8.95 0.4 200
n1 + n 2 - 2
= 301.160 = 6.721
Before 189 202 220 207 194 177 193 202 208 233
After 170 179 203 192 172 161 174 187 186 204
H : l 17
Answer
Ha : l 17
0.05
Finding the mean weight loss and S.D
A low p-value for this test (less than 0.05 for example) means
that there is evidence to reject the null hypothesis in favour of
the alternative hypothesis.
Dependent T-test
Dependent t-test:
• Most commonly used to evaluate the difference in
means between two groups.
• Used to compare means on the same or related subject
over time or in differing circumstances.
• Compares the differences in mean and variance
between two data sets
mean ( x ) mean ( y )
t
2 ( x) 2
( y)
n( x )
Where σ (x) is the standard deviation of nx( yand
) n (x) is the number of
elements in x.
Two-sample T-test
Frequently we need to compare the
means of two different samples.
Is one group higher/lower than some
other group?
e.g. is the Income of blacks
significantly lower than whites?
The two-sample t difference of means
test is the typical way to address this
question.
Examples
Is the income of blacks lower
than whites?
Are teachers salaries in IBS and
X1 X 2
t
2 2
s s
1 2
n1 n2
The standard two sample T-test
In order to conduct the two sample t-
test, we only need the two samples
Population data is not required.
We are not asking whether the two
samples are from some large
population.
We are asking whether they are from
the same population, whatever it may
be.
Normal Distribution vs T-distribution
t-test is based on t distribution (z-test was based
on normal distribution)
Difference between normal distribution and
t-distribution
Normal t-distribution
distribution
Hypothesis Testing: Two Sample
Tests
TEST FOR EQUAL MEANS TEST FOR EQUAL VARIANCES
Ho Ho
Population 1
Population 1
Population 2
Population 2
Ha Ha Population 1
s 2 l arg er
F( n1 1,n2 1) 2
s smaller
ANOVA Terminology
Single Factor Independent Measures Design
(One-way Design)
• Factor
Variable that is independent (manipulated) or quasi-
independent (non-manipulated, grouping)
• Independent measures
Designates that it is a between-subjects design
• How many “levels” does the factor have?
Levels refers to number of treatments conditions (groups)
k = number of levels
When to Use ANOVA
You MAY use ANOVA whenever you
have 2 or more independent groups
You must use ANOVA whenever you
X = 15+18+19+22+11+22+27+18+21+17+18+24+19+16+22+15
1.
16
=19 Grand mean using all data
Ho= μ1= μ2= μ3, H1= μ1, μ2, μ3 are not equal
Method 1 Method 2 Method 3
Daily 18
Prodn 15 22 24
of
16New 18 27 19
Employ 19 18 16
ees 22 21 22
11 17 15
85 105 114
Sampl ÷5 ÷5 ÷6
e 17 = x1 21 = x2 19 = x3
means
n1=5 n2 = 5 n3 = 6
Analysis of variance is based on the comparison of 2 different estimates of
the variance, σ2 of our overall population.
Examine the variance between the 3 sample means, 17,21 & 19.
Examine the variance within the 3 samples themselves,(15,18,19,22,11),
(22,27.18,21,17), & (18,24,19,16,22,15).
Compare the 2 estimates.
Hypothesis Testing with ANOVA
exceeds critical F
Calculation of between column variance
n X (2) X (2)-(3) [4]2 n* (5)
(3) (4) (5)
5 17 19 -2 4 20
5 21 19 2 4 20
6 19 19 0 0 0
40
Between-column variance= 40 =20
k-1
Expected count
Number of
outcomes
3. Degrees of Freedom: k - 1
Test Basic Idea
2
Example
As personnel director, you
want to test the perception
of fairness of three
methods of performance
evaluation. Of 180
employees, 63 rated
Method 1 as fair. 45
rated Method 2 as fair.
72 rated Method 3 as fair.
At the .05 level, is there a
difference in perceptions?
Test for k Proportions
2
Solution
2 Test for k Proportions
Solution
H0 : Test Statistic:
Ha:
=
n = n2 = n3 =
1
Critical Value(s):
Decision:
Reject
Conclusion:
0 2
Test for k Proportions
2
Solution
H0 : p 1 = p 2 = p 3 = Test Statistic:
1/3
Ha: At least 1 is
different
= .05
n1 = 63 n2 = 45 n3 Decision:
= 72
Critical Value(s): Conclusion:
2 Test for k Proportions
Solution
2 Test for k Proportions
Solution
H0 : p 1 = p 2 = p 3 = Test Statistic:
1/3 2 = 6.3
Ha: At least 1 is
different
= .05
Decision:
Reject
= .05 Conclusion:
0 5.991 2
2 Test for k Proportions
Solution
H0 : p 1 = p 2 = p 3 = Test Statistic:
1/3 2 = 6.3
Ha: At least 1 is
different
= .05
Decision:
Reject Reject at = .05
= .05 Conclusion:
0 5.991 2
Test for k Proportions
2
Solution
H0 : p 1 = p 2 = p 3 = Test Statistic:
1/3 2 = 6.3
Ha: At least 1 is
different
= .05
Decision:
Reject at = .05
Reject
= .05 Conclusion:
There is evidence of a
difference in proportions
0 5.991 2
Types of statistical tests and its
characteristics
Hypothesis No. of Measurement Test Requirements
Testing samples scale
Hypotheses One Nominal Χ2
about
frequency Two or More Nominal χ2
distributions