# 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
```
{"ft_lang_label":"__label__en","ft_lang_prob":0.7669569,"math_prob":0.8228288,"size":3839,"snap":"2023-14-2023-23","text_gpt3_token_len":1315,"char_repetition_ratio":0.14393742,"word_repetition_ratio":0.23362832,"special_character_ratio":0.23391508,"punctuation_ratio":0.13089803,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9771498,"pos_list":[0,1,2],"im_url_duplicate_count":[null,1,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2023-03-28T04:57:06Z\",\"WARC-Record-ID\":\"<urn:uuid:f4cf4902-8136-4671-9f78-f6f59f776286>\",\"Content-Length\":\"42786\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:02e9c751-fd53-4e7b-811f-e1ac3d76fa18>\",\"WARC-Concurrent-To\":\"<urn:uuid:85798d4e-e771-4989-8545-4dbb8e98b16e>\",\"WARC-IP-Address\":\"172.67.193.104\",\"WARC-Target-URI\":\"https://studylib.net/doc/25705427/chisquare\",\"WARC-Payload-Digest\":\"sha1:WXVL2326FDXJHT3WIMAR3ZRW3JCU52KO\",\"WARC-Block-Digest\":\"sha1:H7KC3VXOL4T7WGNQHTPI7HCMA6IKA2HY\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2023/CC-MAIN-2023-14/CC-MAIN-2023-14_segments_1679296948765.13_warc_CC-MAIN-20230328042424-20230328072424-00061.warc.gz\"}"}