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

單變量變異數分析

(Analysis of Variance, ANOVA)


Retail stores usually have certain types of
promotion tools, such as coupon, discount or free
gifts to attract customers. They use these tools to
increase sales volume. However, we are
wondering that sales volume will be different
when we use different promotion tools.

5-1
ANOVA
When we are trying to test three (or above) independent
population in order to see whether the average values are
the same or not, we should use analysis of variance
techniques, ANOVA.
Analysis of variance has an important feature. That is the
independent variables are qualitative data, the dependent
variables are quantitative data.
For example, different promotion tool (independent
variable) will have different impact on sales volume
(dependent variable).

5-2
ANOVA
By knowing the number of dependent variables, we
can categorize ANOVA by UNIANOVA and
MANOVA. By knowing the number of
independent variables, we can categorize ANOVA
into single and multiple factor ANOVA. Please
read the following table.
# dependent variables #independent name
1 1 One factor ANOVA
( UNIANOVA ) 2(+) Multiple ANOVA
2(+) 1 One factor ANOVA
( MANOVA ) 2(+) Multiple ANOVA
5-3
ANOVA
Example:
The school is trying to
understand whether different
teaching style will cause different
academic performance.
Therefore, the school categorizes
students into three groups (each
group has five students). Then,
different teaching styles
(democratic, restrict, free) are
applied to the three groups. After
a certain period of time, the
school has a test. From the table
to the right, do you see any
difference? 5-4
ANOVA
Total variance can be categorized into two parts,
intra group variance and internal group variance.
From the previous example, the variance comes
from intra group (teaching style) and internal group
(students’ background). We would like the intra
group variance as large as possible and the internal
group variance as small as possible.

5-5
ANOVA Testing Result
• When the value Sig. is smaller (<0.05), we tend to
reject the null hypothesis. ( As before, the Null
hypothesis is there is no difference among groups)

5-6
Example 1
Please use the “school grade” file to understand whether
different department’s students have different math score
操作:
1. 點選 Analyze/Compare Means/One-Way ANOVA
2. Hypothesis :
H0 : the math scores are the same for students from
different department(μ1= μ2= μ3)
H1 : the math scores are different for students from
different department

5-7
Example-Result

Since Sig.=0.000<0.05 , reject H0


Conclusion : the math score is different among
different departments

ANOVA

數學能力測驗
Sum of
Squares df Mean Square F Sig.
Between Groups 15703.89 4 3925.973 8.386 .000
Within Groups 105329.9 225 468.133
Total 121033.8 229

5-8
Since we know that different department has
different math score, we would like to know which
department(s) has math scores different than
others?
Define:
Orthogonal Comparison: every event is independent
and there is no overlapping among information
Non-orthogonal Comparisons: every event is not
independent and there is overlapping among
information

5-9
ANOVA

Multiple Comparisons Table :


Prior Orthogonal Method Measure # samples Type I Error
/posterior
Prior Orthogonal Fisher t Same or not highest
Non Dunnett   t medium
Same or not
-orthogonal
Bonferroni t Same or not mediuim
Posterior Non Sheffe F lowest
Same or not
-orthogonal
HSD Q same higher
Duncan’s Q same medium
Method

5-10
Example 2

Continue from Example 1, please analyze the


differences among different departments.
Procedure :
1. 點選
Analyze/Compare Means/ One-Way ANOVA/Post Hoc
(The one that is commonly used is Scheffe)

5-11
Example 2―Result
Multiple Comparisons
Dependent Variable: math capabilities test
Scheffe

Mean Difference 95% Confidence Interval


(I) DPRTMNT (J) DPRTMNT (I-J) Std. Error Sig. Lower Bound Upper Bound
electronics information system 2.87 4.712 .985 -11.76 17.51
business administration 8.55 4.635 .494 -5.84 22.95
foreign language 18.56* 4.802 .006 3.65 33.47
law 21.58* 4.778 .001 6.74 36.42
information system electronics -2.87 4.712 .985 -17.51 11.76
business administration 5.68 4.288 .780 -7.64 19.00
foreign language 15.69* 4.467 .017 1.81 29.56
law 18.71* 4.442 .002 4.91 32.51
business administration electronics -8.55 4.635 .494 -22.95 5.84
information system -5.68 4.288 .780 -19.00 7.64
foreign language 10.01 4.386 .271 -3.62 23.63
law 13.03 4.360 .066 -.51 26.57
foreign language electronics -18.56* 4.802 .006 -33.47 -3.65
information system -15.69* 4.467 .017 -29.56 -1.81
business administration -10.01 4.386 .271 -23.63 3.62
law 3.02 4.536 .979 -11.07 17.11
law electronics -21.58* 4.778 .001 -36.42 -6.74
information system -18.71* 4.442 .002 -32.51 -4.91
business administration -13.03 4.360 .066 -26.57 .51
foreign language -3.02 4.536 .979 -17.11 11.07
*. The mean difference is significant at the .05 level.

5-12
Conclusion
The math scores are no much difference among
departments of law, foreign language and business
administration.
The math scores are no much difference among
departments of electronics, information system
and business administration.
The scores for the students from the department of
electronics and information system are higher
than the scores from other departments.

5-13
Practice Question

Please use the “school grade” file, please analyze


whether “area” will influence the IQ test result.

5-14
貳、雙因子變異數分析
(Double Factors Analysis of Variance)

If you doubt that a quantitative dependent


variable will be influenced by two qualitative
independent variables, the better analyze method
is to use “double factors analysis of variance”
method. For example, if you like to know whether
“gender” and “living area” will have some impact
to “deposit” , you should use the above method.

5-15
Area/Gender Female (j=1) Male (j=2) Mean

East (i=1) 434.13 464.21 446.82

West (i=2) 433.57 449.65 441.51

Central (i=3) 457.64 343.04 402.54

Mean 439.9 425.22 433.04

5-16
雙因子變異數分析
(Double Factors Analysis of Variance)

Please use the “bank customer” file


Procedure :
1. 點選 Analyze/General Linear Model/Univariate

5-17
Double Factors Analysis of Variance

5-18
雙因子變異數分析
(Double Factors Analysis of Variance)
Conclusion:
The average deposit amount has no much
difference between male and female customers.
The average deposit amount has no significant
difference among living areas.
“Gender” and “area” have cross sectional effect to
average deposit amount.

5-19
Double Factors Analysis of Variance

From the following result, it is shown that “gender”


and “area” has cross affect F=5.886
(sig.=0.003<0.05) 。 Therefore, we have to control
some main factor in order to get more detail result.

5-20
Double Factors Analysis of Variance
Area(A)/ Female (B1) Male (B2) Major Effect
Gender(B)
East(1) A1 A1B1 A1B2 A1

West(2)A2 A2B1 A2B2 A2

Central(3)A3 A3B1 A3B2 A3

Major Effect B1 B2

5-21
Double Factors Analysis of Variance
Control “Area”
Focusing on A1 ( east ) , we would like to
understand whether “gender” will cause different
depositing behavior. 。 (A1B1 and A1B2)
Procedure :
Data/Select Cases/Area=1(using Independent Sample t-
test)

5-22
Result (By controlling “Area” A=1)

sig.=0.368>0.05 cannot reject H0


Conclusion : There is no significant difference of
depositing for males living in the east area and for
females living in the east area.
5-23
Double Factors Analysis of Variance
Control “gender”
By controlling B1 ( female customer ) , we can study
people from different area will have different depositing
behavior ( A1B1 、 A2B1 and A3B1 )。 We can use one-
way ANOVA

sig.=0.682>0.05 cannot reject H0


Conclusion : Females from different areas show no
difference depositing behavior.
5-24
Please analyzing the unfinished table. That is,
select A2 (west) and A3 (central). Study whether
Gender cause any deposit behavior.
Select Male, study whether different area will
cause different deposit behavior.

商管研究資料分析- SPSS 的應用 Chapter 5 單變量變異數分


5-25

Double Factors Analysis of Variance
Control “Area”
Focusing on A2 ( west ) , we would like to
understand whether “gender” will cause different
depositing behavior. 。 (A2B1 and A2B2)
Procedure :
Data/Select Cases/Area=2(using Independent Sample t-
test)

5-26
Result (By controlling “Area” A=2)

sig.=0.556>0.05 cannot reject H0


Conclusion : There is no significant difference of
depositing for males living in the west area and for
females living in the west area.
5-27
Double Factors Analysis of Variance
Control “Area”
Focusing on A3 ( central ) , we would like to
understand whether “gender” will cause different
depositing behavior. 。 (A3B1 and A3B2)
Procedure :
Data/Select Cases/Area=3(using Independent Sample t-
test)

5-28
Result (By controlling “Area” A=3)

sig.=0.001<0.05 reject H0
Conclusion : There is significant difference of depositing
for males living in the central area and for females
living in the central area.
5-29
Double Factors Analysis of Variance
Control “gender”
By controlling B2 ( male customer ), we can study people
from different area will have different depositing
behavior ( A1B2 、 A2B2 and A3B2 ) 。 We can use one-
way ANOVA

sig.=0.001<0.05 reject H0
Conclusion : Males from different areas show different
depositing behavior.
5-30
5-31
5-32
Double Factors Analysis of Variance
The depositing behavior is no much difference between
male and female.
The depositing behavior is no much difference among
people living in different area.
There is a cross sectional effect for area and gender 。 For
people living in the central area, females depositing
amount is significantly higher than males; for male
customers, the deposit amount for people live in the “east
and “west” sides is significantly higher than male live in
the central area.
5-33
Practice Questions

Please use the “school grade” file to answer the


following questions
1. Is there any difference for the “English 1” scores
for students from different departments.
2. Whether there is any cross sectional effect
between “gender”, “department” and “English
1”.

5-34
Practice Questions

3. According to the “bank customer” file, please


discuss how “area” and “credit” can affect
customer’s loan.

5-35
Question 1

5-36
Question 2

5-37
Question 3

5-38

You might also like