Professional Documents
Culture Documents
Hypothesis and Hypothesis Testing
Hypothesis and Hypothesis Testing
HYPOTHESIS A statement about the value of a population parameter developed for the purpose of testing.
HYPOTHESIS TESTING A procedure based on sample evidence and probability theory to determine whether
the hypothesis is a reasonable statement.
TEST STATISTIC A value, determined from sample information, used to determine whether to reject the null
hypothesis.
CRITICAL VALUE The dividing point between the region where the null hypothesis is rejected and the region
where it is not rejected.
Important Things to Remember about H0 and H1
H0: null hypothesis and H1: alternate
hypothesis
H0 and H1 are mutually exclusive and Keywords
Inequality
Part of:
collectively exhaustive Symbol
H0 is always presumed to be true
H1 is the research hypothesis Larger (or more) than > H1
A random sample (n) is used to “reject H0”
Smaller (or less) < H1
If we conclude 'do not reject H0', this does
not necessarily mean that the null No more than H0
hypothesis is true, it only suggests that
there is not sufficient evidence to reject H0;
At least ≥ H0
rejecting the null hypothesis then, suggests
that the alternative hypothesis may be true.
Has increased > H1
Equality is always part of H0 (e.g. “=” , “≥” ,
“≤”). Is there difference? ≠ H1
“≠” “<” and “>” always part of H1
In actual practice, the status quo is set up Has not changed = H0
as H0
In problem solving, look for key words and Has “improved”, “is better See left H1
convert them into symbols. Some key than”. “is more effective” text
words include: “improved, better than, as
effective as, different from, has changed,
etc.”
Signs in the Tails of a Test
Two-tailed Test
Two-tailed tests -
the rejection
region is in both Rejection Rejection
tails of the Region Region
Acceptance
distribution
Region
One-tailed tests
- the rejection One-tailed Test
region is in only
on one tail of Rejection
the distribution Region Acceptance
Region
Types of Errors
H 0 is true H 0 is false
MEAN
PROPORTION
Steps in hypothesis testing
x
t
s n
s2
x 2
i
i
n 1507.55.
n 1
s 1507.55 38.83
Testing when is unknown
Rejection region
• The test statistic is 1.676 1.89
x 460.38 450
t 1.89
s n 38.83 50
One-Sample Test
p̂p̂pp
ZZ
pp((11pp))//nn
where np
where np55 and and nn((11pp))55
Testing the Proportion
Example 12.6
– A pharmaceutical company claimed that its
medicine was 80% effective in relieving
allergy. In a sample of 200 persons, who were
given medicine only 150 persons had relief.
Do you thank that the effectiveness is below
80%? Use 0.05 level of significance.
Testing the Proportion
Solution
– The problem objective is to test the
effectiveness of medicine.
– The data are nominal.
– The parameter to be tested is ‘p’.
– Success is defined as “having relief”.
– The hypotheses are:
H0: p = .8
H1: p < .8
Testing the Proportion
– Solution
• The rejection region is z < z = z.05 = -1.645.
• The sample proportion is pˆ 150 200 .75
• The value of the test statistic is
pˆ p .75 .8
Z 1.786
p (1 p ) / n .8(1 .8) / 200
Since calculated z is less than critical value, we
reject null hypothesis and conclude that the
claim of the company that its medicine is 80%
effective is not justified.
T-Tests : When sample size is small
(<30) or When the Population
Standard Deviation Is Unknown
Variable : Normal
Types of t-tests:
One-sample t-test
Paired or dependent sample t-test
Independent samples t-test (Equal and
Unequal Variance)
One-sample t-test
H 0 : 0
H1 : 0
H1 : 0
H1 : 0
Paired sample t-test
H0 : d 0
H1 : d 0
H1 : d 0
H1 : d 0
Matched pairs
Test statistic:
xD D
t
s D nD
Degree of freedom = nD 1
Independent sample t-test
H 0 : 1 2
H 1 : 1 2
H 1 : 1 2
H 1 : 1 2
The sampling process.
Population 1 Population2
Parameters: Parameters:
1and 1 2
2 and 22
Statistics: Statistics:
2
x1 ands1 2
x2 ands 2
Sample size: n1 Sample size: n2
If the two population standard deviations are
unknown, then we can estimate the standard
error of the difference between two means.
ˆ ˆ2 2
ˆ x1 x2 1 2
n1 n2
Test statistic:
z
x1 x2
ˆ2
ˆ 2
1
2
n1 n2
If population variance unknown and the sample size
is small and the population variances are equal
1 1
x1 x2 sp
2
n1 n2
Where:
s
2 n 1 s n 1 s
1
2
1 2
2
2
n1 n2 2
p
Test statistic:
t
x1 x2
1 1
s
2
p
n1 n2
Degree of freedom = n1 n2 2
One way
Analysis of Variance ( ANOVA )
The Null Hypothesis is that the population means are the same. The Alternative
Hypothesis is that at least one of the means is different.
H0: µ1 = µ2 =…= µk
H1: The means are not all equal
Reject H0 if F > F,k-1,n-k
The test statistic used to test the hypothesis is
F statistic
Assumptions:
H 0 : 1 2 3 ........
H1 : Not all means are same
ANOVA – Example (File Airlines.sav)
EXAMPLE
Recently a group of four major carriers
joined in hiring Brunner Marketing
Research, Inc., to survey recent
passengers regarding their level of
satisfaction with a recent flight. The
survey included questions on ticketing,
boarding, in-flight service, baggage
handling, pilot communication, and so
forth.
To compute SSE, find deviation between each observation and its treatment mean. Each of these
values is squared and then summed for all 22 observations.
SSE = {(94-87.25)2 + (90-87.25)2 + ……+ (80-87.25)2 } + {(75-78.20)2 + (68-78.20)2 + ……+ (88-
78.20)2 } + {(70-72.86)2 + (73-72.86)2 + ……+ (65-72.86)2 } + {(68-69)2 + (70-69)2 + ……+ (65-
69)2 } = 594.41
Finally, determine SST = SS total – SSE.
SST = 1485.10 – 594.41 = 890.69
ANOVA – Example
Step 3: Find the appropriate test statistic. Use the F statistic
Calculations: It is convenient to summarize the calculations of F statistic in an
ANOVA Table.
The computed value of F is 8.99, which is greater than the critical value of 5.09, so the
null hypothesis is rejected.
Conclusion: The mean scores are not the same for the four airlines; at this point we can
only conclude there is a difference in the treatment means. We cannot determine which
treatment groups differ or how many treatment groups differ.
ANOVA Example – SPSS Output
Test of Homogeneity of Variances
Satisfaction
Levene Statistic df1 df2 Sig.
.962 3 18 .432
ANOVA
Satisfaction
Sum of
Squares df Mean Square F Sig.
Between 890.684 3 296.895 8.991 .001
Groups
Within Groups 594.407 18 33.023
Total 1485.091 21
ANOVA Example – SPSS Output
Multiple Comparisons
Satisfaction
Tukey HSD
(I) Carrier (J) Carrier Mean 95% Confidence Interval
Difference (I- Lower Upper
J) Std. Error Sig. Bound Bound
TWA 9.050 3.855 .124 -1.85 19.95
Eastern Allegheny 14.393 *
3.602 .004 4.21 24.57
Ozark 18.250* 3.709 .001 7.77 28.73
Eastern -9.050 3.855 .124 -19.95 1.85
TWA Allegheny 5.343 3.365 .410 -4.17 14.85
Ozark 9.200 3.480 .071 -.63 19.03
Eastern -14.393 *
3.602 .004 -24.57 -4.21
Allegheny TWA -5.343 3.365 .410 -14.85 4.17
Ozark 3.857 3.197 .631 -5.18 12.89
Eastern -18.250 *
3.709 .001 -28.73 -7.77
Ozark TWA -9.200 3.480 .071 -19.03 .63
Allegheny -3.857 3.197 .631 -12.89 5.18
*. The mean difference is significant at the 0.05 level.
ANOVA Example – SPSS Output
Homogeneous Subsets
Satisfaction
Tukey HSDa,b
Carrier
Subset for alpha = 0.05
N 1 2
Ozark 6 69.00
Allegheny 7 72.86
TWA 5 78.20 78.20
Eastern 4 87.25
Sig. .078 .085
Means for groups in homogeneous subsets are displayed.
a. Uses Harmonic Mean Sample Size = 5.266.
b. The group sizes are unequal. The harmonic mean of the group
sizes is used. Type I error levels are not guaranteed.
Chi-squared Test of a
Contingency Table
Test of Independence : Test on
association between two nominal
variables regarding contingency tables.
O E
k
2
i i
i 1 Ei
Contingency table 2 test – Example
Example
Degree Accounting Finance Marketing
BA 31 13 16 60
BENG 8 16 7 31
BBA 12 10 17 60
Other 10 5 7 39
61 44 47 152
Example
Solution
– The hypotheses are:
H0: The two variables are independent
H1: The two variables are dependent
i 1 Ei
Calculation of the 2 statistic
• Solution – continued
Undergraduate MBA Major
Degree Accounting Finance Marketing
BA 31 24.08
31 (24.08)
k 13 (17.37) 2 16 (18.55) 60
(f e )
BENG 2 8 (12.44) 16 (8.97) 7 (9.58) 31
BBA 31 24.08
12 (15.65)
i i
10 (11.29) 17 (12.06) 39
Other
31 24.08
10 (8.83)
1
i61
e 55 6.39
(6.39) 77 6.80
i
(6.80) 22
44 47 152
5 6.39 7 6.80
31 24.08
The expected frequency
5 6.39 7 6.80
31 24.08
5 6.39 7 6.80
2= (31 - 24.08)2
24.08 +….+
(5 - 6.39)2
6.39 +….+
(7 - 6.80)2
6.80
= 14.70
Contingency table test – 2
Example
• Solution – continued
– The critical value in our example is:
2 ,( r 1)( c 1) .205,( 4 1)( 31) 12.5916
• Conclusion:
Since 2 = 14.70 > 12.5916, there
is sufficient evidence to infer at 5% significance
Likelihood Ratio
13.781 6 .032
Linear-by-Linear Association
2.003 1 .157
N of Valid Cases
152
a. 0 cells (.0%) have expected count less than 5. The minimum expected count is
6.37.
Yates’ Correction for Continuity
Chi-square distribution is a continuous
distribution. Whenever the degrees of freedom
(in case of a 2x2 table), certain corrections for
continuity can be made
Required conditions –
the rule of five
The test statistic used to perform the test
is only approximately Chi-squared
distributed.
For the approximation to apply, the
expected cell frequency has to be at least
5 for all the cells (np 5).
If the expected frequency in a cell is less
than 5, combine it with other cells.