Computer Lab 1
Computer Lab 1
Computer Lab 1
Dr Euejung Hwang
euejung.hwang@ed.ac.uk
Overview
• Today :
• Preparing the SPSS data file
• Descriptive analysis
• Chi-square test
2
Preparing the SPSS data file
o SPSS data file
• Data view
• Variable view
Figure'3.3:'The!SPSS!Data!Editor'
! The!SPSS!environment! 119!
Then,
This button activates
click on
the Value
Labels dialog box
Figure'3.7:'Defining!coding!variables!and!their!values!
The Variable View
o Numeric
• Numbers (e.g., 1, 0, 70)
o String
• Letters (e.g., messy, Maya, label)
o Currency
• Currency (e.g., £20, $34, €56)
o Date
• Dates (e.g., 12-07-2021, 07-12-2012, 12-Jul-
2021)
The View Window
! The!SPSS!environment! 127!
Graph of
some
data
Tree diagram
of the current
output
Results of
statistical
analysis
Figure'3.11'The!SPSS!Viewer'
Descriptive Statistics
1. Frequency distribution
• Analyze > Descriptive statistics > Frequency
Descriptive Statistics
1. Frequency distribution
Descriptive Statistics
1. Frequency distribution
Descriptive Statistics
2. Measures of central tendency
• Central tendency can be measured in three
ways – the mean, median or mode.
✓ Mode – Nominal scale (e.g., Gender)
✓ Median – Ordinal scale (e.g., Income level)
✓ Mean – Interval/Ratio scale (e.g., age)
Descriptive Statistics
2. Measures of central tendency
• Interval/Ratio scale:
Analyze > Descriptive statistics > Descriptives
Descriptive Statistics
2. Measures of central tendency
Descriptive Statistics
2. Measures of central tendency
Descriptive Statistics
3. Measures of spread
• Different ways of summarising a data set by
describing how spread out the scores are from
the mean.
• E.g., range, deviation, variance, standard
deviation
✓ Variance – The average of the squared
differences from the mean.
✓ Standard deviation – The square root of the
variance.
Descriptive Statistics
2. Measures of central tendency
• Interval/Ratio scale:
Analyze > Descriptive statistics > Descriptives
Descriptive Statistics
3. Measures of Spread
Descriptive Statistics
3. Measures of Spread
Descriptive Statistics
3. Measures of Spread
Descriptive Statistics
3. Measures of Spread
Inferential Statistics for Association
1. Chi-square test
2. Pearson Correlation
Chi-square (χ2) test
o What is a Chi-square (χ2) test?
• A hypothesis test that determines whether there
is an association between categorical (i.e.,
nominal or ordinal) variables.
✓ E.g., Association between smoking behaviour and
voting for different parties.
• Reporting
: χ2(2) = 9.69, p < .01
Outliers
Outliers
o Analyze > Descriptive Statistics > Explore
Outliers
o Analyze > Descriptive Statistics > Explore
Outliers