chisquare

```The UK’s European university
Week 4: Quantitative
Research Methodology
Marketing Research
Yu-Lun Liu
Categorical Variable
Chi-square test
(Dependent Variable)
Discriminant analysis
Logistic Regression
Continuous Variable
Categorical Variable
(Independent Variable)
(Independent Variable)
Independent-samples
t-test
Paired-sample t-test
One-way ANOVA
Simple/Multiple Linear
Regression Analysis
Continuous Variable
(Dependent Variable)
Chi-Square
2
(χ )
Test
Two Categorical variables

Chi-Square Test Statistic
a statistical method assessing the goodness of fit between a set of observed values and
those expected theoretically. It is used to test the relationship between two categorical
variables
The Chi-square test statistic is:
( fo  fe )
  
fe
all cells
2
2
• where:
fo = observed frequency in a particular cell 觀察到的次數
fe = expected frequency in a particular cell if H0 is true 預期的次

degree of freedom for 2 = (columns-1)(rows-1) 自由度為(行-1)*(列-1)
 2 for the 2 x 2 case has 1 degree of freedom (2-1)*(2-1) = 1
(Assumed: each cell in the contingency table has expected frequency of at least 5)
(Theoretical) Expected Cell Frequencies
• Expected cell frequencies:
row total  column total
fe 
n
Where:
row total = sum of all frequencies in the row
column total = sum of all frequencies in the column
n = total sample
• VARIABLE 1: Stage 1: 一開始的答案 (Categorical)
• VARIABLE 2: Stage 2: 跟組員討論後的結果 (Categorical)
• VARIABLE 3: GroupAorB:
A group – 答對加分組;
B group: 答錯扣分組(Categorical)
• VARIABLE 4: Programme: 1 – Masters（碩士）, 2 – undergraduate（

• VARIABLE 5: Changed answer: 1 – changed; 2 – remain the same
(Categorical)
Question: Whether people choose to (or not to) change
when
under
different
conditions
(punishment/reward)? 是否人們會在不同的獎懲情況

H0: The condition (punishment/reward) will not affect
people’s intention to change their decision 獎懲情境不

=
H1: The condition (punishment/reward) will affect
people’s intention to change their decision 獎懲情境會

≠
Hypothesis testing (two-sided)
Chi-square test
Under the
punishment condition

Changed response
Observed frequenc觀察次數:?
Under the
reward condition

Observed frequency:?

Remain the same

Expected frequenc理論預期次數:?
Expected frequency:?
Observed frequency:?
Observed frequency:?
Expected frequency:?
Expected frequency:?
Footer text
Page 9
Using SPSS to find the answer
Chi-square test
Under the
punishment condition

Changed response
Observed frequenc觀察次數:?
Under the
reward condition

Observed frequency:?

Remain the same

Expected frequenc理論預期次數:?
Expected frequency:?
Observed frequency:?
Observed frequency:?
Expected frequency:?
Expected frequency:?
Footer text
Page 11
• χ2 (degrees of freedom, N = sample size) = Chi-square statistic
value, p = p value.
• χ 2 (___, N = ___) = ___, p = (or &lt; ) _____.
• A Chi-square test (χ 2 (1, N = 105) = 15.27, p &lt; .01.) reveals that
people in a punishment condition are more likely to change their
decision and revise their previous choice. Therefore, H1 is supported.
• 卡方檢定顯示 (χ 2 (1, N = 105) = 15.27, p &lt; .01.) 人們在
Question: Compared to EMBA students, do Masters
students get affected by others more due to different
conditions (punishment/reward)?

Make two-sided hypothesis for testing
(take 95% confidence level)

Question: Compare to EMBA students, do Masters
students get affected by others more due to different
conditions (punishment/reward)?
H0: EMBA students and Masters students get affected by
others option equally相較於進修部同學，日間部碩

H1: EMBA students and Masters students do not get
affected by others option equally相較於進修部同學，日

Hypothesis testing (two-sided)
=
≠
Using SPSS to find the answer
```