ge5 tutorial 7 rules of engagement no computer or no power → no lessonno computer or no power →...
TRANSCRIPT
GE5 Tutorial 7GE5 Tutorial 7
rules of engagementrules of engagement• no computer or no power → no lessonno computer or no power → no lesson• no SPSS → no lessonno SPSS → no lesson• no homework done → no lessonno homework done → no lesson
Content seminar
1. Quiz
2. Discussion homework
3. New material: chapters 14 to 16 of Howitt & Cramer– Chi square– Probability– Reporting tests
4. SPSS workshop
5. ( Discussion homework next week ) → no homework!
1Quiz
Quiz
• Password: …
2Discussion homework
Review Assignments
• Refer to Moodle
3Chapter 14 to 16 Howitt & Cramer:Chi square, probability, reporting
Chi Square test
Comparing nominal variables
• The t-test that we used last week can only be applied to one ratio/interval variable and one nominal variable
• We sometimes upgrade ordinal variables to still use the t-test– This is a common practice with Likert scales, where participants
indicate whether they agree/disagree with a statement on a 7 point scale
– There are better tests for ordinal variables, but they are not commonly used
• What to do with TWO nominal variables?
Examples of nominal variable pairs
• What is your favority color – which clothes stores do you go to?• Which brand of computer do you own – do you value style highly?• Gender – Favorite type of TV show
• In all these examples, we have multiple groups (HC say samples), and for each group, we can classify their answer on a question of interest– Group: Gender– Question of interest: Type of TV show preferred– The result is a contingency table– The 'question of interest' (dependent variable) is listed down
Type of TV show Males Females
Quiz 30 30
Sport 50 8
Detective 40 45
Cooking 12 50
News 30 40
Hypothesis
• What is our hypothesis (H1) for the table on the previous slide?• That men and women like different types of shows
– In general, the hypothesis is that the answer to the question of interest varies by group
• What is therefore the null hypothesis (H0)? • That there is no difference between men and women in terms of shows
they like– In general, the H0 is that the groups do not differ on the question of
interest• How do we reject H0 in this case?• To answer this question, let's look at what the table would look like if H0
were true.
If H0 were true...
• Or, what would a sample look like it were drawn from a population defined by H0
• In a population defined by H0, there are no differences between men and women in terms of the TV shows
• With some simple math, we can compute the expected frequencies in the cells under H0
First a simple case• Groups: 10 men and 10 women• Question: Like chocolate yes or no• If we know 60% of all people like
chocolate we expect to find:• Note that 12 is 60% of 20.
Chocolate Men Women Total
Me Like 6 6 12
Me no like 4 4 8
Total 10 10 20
Computing the expected frequencies
• The formula is simple and intuitive• For each cell compute:
column amount * row amount / total amount• Another way of saying the same is
column percentage * row percentage * total amount• Let's check that for each cell in the previous small table
Chocolate Men Women Total
Me Like 6 6 12 (60%)
Me no like 4 4 8 (40%)
Total 10 (50%) 10 (50%) 20 (100%)
Type of TV show Males Females Row Total Males Females
Quiz 30 30 60 29 31
Sport 50 8 58 28 30
Detective 40 45 85 41 44
Cooking 12 50 62 30 32
News 30 40 70 34 36
Column Total 162 173 335 162 173
Observed and Expected frequencies
- Males liking quizzes has an expected value of 162 * 60 / 335 = 29 (rounded)- Expected values that are very different from the observed value have been underlined.
EO
The chi squared statistic
• If the observed and expected tables are the same or almost the same, H0 is supported
• If the two tables are different enough, we reject the H0 and find evidence for H1
• How much is different enough?
• The chi square measure takes the difference between observed and expected.
• Because we are not interested in the sign, we square it• The difference is scaled by the expected value
– a difference of 5 on a cell with an expected count of 500 is not important (1% more)
– But a difference of 5 on a cell with an expected count of 10 is (50% more)
Chi Square (2)
• The formula is:
for all cells in the table,
Σ [ (O – E) 2 / E ]
• Page 158-159 of the book takes you through a numerical example• It is relatively easy to do this in excel
• The value of chi square is then compared to the chi square distribution, see table 14.1 in the book (p. 157)
• To use this table, you need the degrees of freedom (df):
df = (number of columns – 1) * (number of rows – 1)
What does it mean?
• If the chi square is significant– The observed table and the expected table are different enough– We can reject H0– H0 states that our groups do not differ on the question of interest– We have found evidence for H1– H1 states that our groups differ on the question of interest
• If the chi square is not significant– The observed table and the expected table are almost the same– We can not reject H0 – We have not found any evidence for our H1
In this case
• We found a significant chi square• We can reject H0• We found evidence that men and women are watching different types of
TV shows
• You probably want to know which shows are different, but this test does not answer that question
• It only says that the two tables are different, not where they are different
Follow-up tests
To find out more
• When the chi-square table has more than four cells interpretation becomes difficult
• It is possible to subdivide a big table into a number of smaller (partitioning)
• Howitt and Cramer demonstrate how to divide your table into multiple small tables. You then do a chi square on each of those tables
– Each row must appear in exactly zero or one sub-tables
• You have to divide your significance level (5%) by the number of tables.
– For two tables, you would test at 2.5%
• Your division into sub-tables should be based on theoretical considerations
– Not on the results you obtained
– Not by trying a number of divisions and reporting the most significant one
– If you do either of these things, you results will be too significant
Type of TV show Males Females
Quiz 30 30
Sport 50 8
Type of TV show Males Females
Detective 40 45
Cooking 12 50
News 30 40
First chi square
Second chi
square
Problems and limitations
• The chi square that we described only works for unrelated (independent) samples. If the same person contributes multiple measurements, use the McNemar test (same chapter in Howitt and Cramer)
• No expected value should ever be under 5. If there is any, SPSS will tell you. The results of the chi square test are unreliable if this is the case.
• Only do a chi square on actual counts (frequencies), never use percentages, proportions or other scores.
Probability
Math with probabilities
• A probability is like a percentage, but then divided by 100• Chance of being asleep right now: 3% or p=0.03 • Note that APA requires you to write p=.03 but this is hard to read on slides
• Probabilities can be added to get the chance of A or B:– Chance of being asleep: 0.03– Chance of looking out of the window: 0.12
So the chance of being asleep or looking out of the window is 0.15
• It is often wise to check whether your probabilities add up to 1– Chance of being male: p=.43– Chance of being female: p=.51– Where is the missing p=.06 (or 6%) → probably “no answer”
Multiplication
• Multiplying probabilities of A and B gives you the chance that A and B are both, at the same time, true
• In our chi square example, there were 162 males in a sample of 335– p[male] = 162 / 335 = .48– p[female] = 173 / 335 = .52– So p[human] = p[male] + p[female] = .48 + .52 = 1
• In our chi square example, there 60 lovers of quizes out of 335– p[likes quizes] = 60 / 335 = .18
• Therefore, the expected chance that a random respondent is a male who likes quizes is – p[male] * p[like quizes] = .48 * .18 = .09. – In other words, we expect 0.09 * 335 = 29 of them
Reporting tests
Presenting tests
• Even though statistical tests are a lot of work, we like to present them very succinctly
• The general format is:
TESTNAME (DF) = VALUE, p = CHANCE• For the t-test, we use
– We tested whether males and females differed on the number of hours spent studying the book, and we found this to be the case, t(28) = 14.2, p < .05.
• For the chi square test we use– We tested whether males and females differ in the type of TV shows
they prefer, using the five types of shows that were defined above. We found a significant difference between the genders, χ 2(4) = 55.125, p < .001.
Small points
• Note we use the actual Greek letter 'chi', find it under Insert – Symbol. It looks like a letter X that has sunk a bit.
• The probability level is reported with a small p (not: P).• Most people do not report the exact significance level as returned by
SPSS, although this would be best practice. Instead, people often one of the following– not significant or n.s.– p < .05– p < .01– p < .001
• In tables, we often use 1 to 3 stars to represent these three levels of significance. Non-significant outcomes are not given any stars.
5SPSS workshop
Class assignment
• Open the SZBH data set (on Moodle)• Compare boys and girls (Q2) on the question if/how they have been bullied
(Q21)• If a significant result is found, try to group the table and do follow-up tests• Use Data → Recode into different variables to regroup the table
Class assignment: NHTV research
- psycho-physiology or biometrics- measuring people's reactions to games or media
+ very fast+ objective+ does not interrupt using media- you don't know what they think, 'only' that
the heart rate went up
Sensors that are commonly used- heart rate sensor: higher heart rate is more excited
- skin conductivity senso: when you are startled or afraid, you skin gets a little more moist
- smile muscle sensor: more smiles is usually good
- frown muscle sensor: too many frowns is not good
Frown
Smile
Heart Rate
Skin conductivity
SuperTux
- we measured reactions to the puzzle platformer SuperTux
- divided each level into sections of about equal length
- measure biometrics for each section
- here we present the data for the strongest signal for each section
(Marcello Gomez Maureira won the Gerrit van der Veer prize with this research in 2014)
Results and Analysis
- we present data for a small number of participants
- each participant was measured on 6 sections
- for each section, we scored the strongest biometric change
- the sections can be further divided in core (section 3 to 5) and in/out (section 1,2 and 6)
- the signals can be further divided in potentially positive (high smiles, high heart rate) and potentially negative (high frowns, high skin conductivity)
- dataset supertux-chisq.csv
(this is artificial data that is in line with our real findings, but constructed to demonstrate the chi-square better)
Assignment
- Reseach Question: Do different sections lead to different biometric signals?
- Read the csv or xlsx file (use File: Read Text Data)
- Make a cross table that shows us the data
- Do a chisquare and interpret results
- Where are the numbers larger/smaller than expected?
- Is it allowed to do a subtable analysis?
- If yes:
- Group sections in two groups and produce two more chi squares
- Group biometric signals in two groups and produce two more chi squares
Results
- we find a result over the whole table that is signficant: there are differences between the sections and which sensors they trigger
- we could and will proceed to look at within-table differences
- we find effects for the core sections but not for the in/out sections
- we find effects for smiling and heart rate, but not for skin conductivy and frowning
- it looks like our core levels are different from each other
- if there are differences they are in the more positive indicators
5Homework
• None
6Exam
Howitt & Cramer
Exam
• It is a multiple choice exam, 40 questions• All relevant book chapters• All explanation given in class/ slides etc.• You must understand all formulas on our slides in the chapters of the book
– Except for the following t formulas, which you must know by heart:• Mean
• Variance
• Standard deviation
• Z-scores
• Correlation Pearon’s r
• You can not bring a calculator or use your phone• There might be a few (less than 4) questions about SPSS. We will for
example show you a piece of SPSS output and ask about the interpretation.