Entering data, calculating descriptive
statistics and exploring your data using SPSS
Dr. Christine Gregory
November 2010
• Open SPSS
• Open, import and save data files
• Defining variables
• Summarising data
– Descriptive statistics– Descriptive statistics
– Chart builder
• What else can SPSS do?
ASK Week Fall 2010
Opening SPSS 15.0Always open SPSS first, then open or type in data.
Choose ONE
Open a data file from
SPSS OR Excel
ASK Week Fall 2010
Open existing data
Opening data in SPSS 15.0
Open existing data
from the File menu.
ASK Week Fall 2010
Output File• Shows output for ALL analysis run in SPSS
• Keeps a log of all activity of open data files
• Saved with the extension .spo
Everything done in SPSS is
shown here, in outline form.
A data file was saved as test.sav.
This was recorded in the log here.
ASK Week Fall 2010
Saving your SPSS files• Save in one of YOUR folders
• Name file appropriately
• Choose correct file extension
ASK Week Fall 2010
Save as type:.sav for data files
.spo for output files
Importing data from Excel
• The file MUST BE .xls NOT .xlsx
• Variable names CAN be imported too
• Must be in row 1 of the worksheet
• Must begin with a letter
• No spaces and no special characters (except _ )
• Data will appear in SPSS data editor
ASK Week Fall 2010
For Example. Importing data from Excel.
Variable names(Row 1)
Filename (.xls)
Sheet1 contains the dataset
ASK Week Fall 2010
For Example. Importing data from Excel.
Filename (.xls)
Select All Files
to see your .xls
ASK Week Fall 2010
For Example. Importing data from Excel.
Tick here if
variable names
are in row 1.
Is this range correct?
If NOT
Enter correct range here
ASK Week Fall 2010
Variable names(from Row 1)
View all data
For Example. Importing data from Excel.
View and define
variables
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
Variable name
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
ASK Week Fall 2010
If numeric...
SPSS Data Editor: Variable ViewView and define variables
Describe the
variable
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
Width of column
in data view
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
Alignment of
data entries in
data view
ASK Week Fall 2010
SPSS Data Editor: Variable ViewView and define variables
Classify
variable type
ASK Week Fall 2010
SPSS Data Editor: Data ViewView, enter or change data entries
Menu Bar
Tool Bar
Choose your view:Choose your view:
Numerical values
OR
Value labels
SUMMARISING DATASUMMARISING DATARepresenting data Diagrammatically & Numerically
ASK Week Fall 2010
Levels of MeasurementData
CategoricalQualitative
ScaleQuantitative
Nominal(Unranked categories)
Ordinal(Ranked categories)
Discrete(Not possible to take
Continuous(Possible to take
ASK Week Fall 2010
(Unranked categories)
� Marital Status
� Political Party
� Eye Color
(Ranked categories)
� Satisfaction level
� Level of agreement
(Not possible to take
fractional values)
� No. of cars
� No. of students
(Possible to take
fractional values)
� Height
� Weight
• In SPSS, data is either Nominal, Ordinal or Scale.
• It is essential to classify data correctly in SPSS.- Incorrect classification will result in incorrect analyses.
Summarising Variables Graphically
Categorical
1 Variablee.g., Gender
2 Variablese.g., Satisfaction rating
Categorical – Nominal or Ordinal
e.g., Gender e.g., Satisfaction rating
by Gender
Simple Bar Chart
OR
Pie Chart
Clustered Bar Chart
ASK Week Fall 2010
Summarising Variables Graphically
Quantitative
1 Variablee.g., Gross Annual Income
Quantitative
by
Categorical
Quantitative – Scale
2 or more related
Variablese.g., Holding breath, Categorical
e.g., Gross Annual Income by
Gender
Histogram
1-D Boxplot
Stem & Leaf Plot
Simple Boxplot
Population Pyramid
Bar Chart of Means
Clustered Boxplot
e.g., Holding breath,
drinking water, gargling,
spoon of sugar.Related: the same group of
participants tried all 4 methods to
get rid of hiccups.
Bar Chart
of Means
Summarising Variables Numerically
Categorical
1 Variablee.g., Gender
2 Variablese.g., Satisfaction rating
Categorical – Nominal or Ordinal
e.g., Gender e.g., Satisfaction rating
by Gender
Frequency table
Mode and/or Medianuse Frequencies in SPSS
Contingency tableuse Crosstabs in SPSS
ASK Week Fall 2010
Summarising Variables Numerically
Quantitative
1 Variablee.g., Gross Annual Income
Quantitative
by
Categorical
Quantitative – Scale
Categoricale.g., Gross Annual Income by
Gender
Descriptive Statsuse Frequencies or
Descriptive Statistics in SPSS
Descriptive Statsuse Explore in SPSS
ASK Week Fall 2010
DESCRIPTIVE STATISTICSDESCRIPTIVE STATISTICSDescribing and presenting data using SPSS
Download “employ.sav” from the ASK section on U-Link to carry out several of the
analysis shown in the remainder o the presentation.
ASK Week Fall 2010
Descriptive Statistics Menu
Statistics
Charts• Bar
• Pie
• Histogram
Frequency tablesFrequency tables
ASK Week Fall 2010
Descriptive Statistics Menu
Limited statistics• Mean, SE of Mean
• Stdev, Variance
• Range, Min, Max
• Skewness, Kurtosis
ASK Week Fall 2010
Descriptive Statistics Menu
Statistics
Plots• Boxplots
• Stem-and-leaf
• Histogram
• Normality plots• Normality plots
ASK Week Fall 2010
Descriptive Statistics Menu
Contingency table(Counts or %’s)
•Observed tallies
• Expected tallies
Crosstab statistics• Chi-square• Chi-square
• Correlations
Clustered bar charts
ASK Week Fall 2010
Frequencies. Multiple scale and/or categorical variables.
ONLY
appropriate for
categorical variables
ASK Week Fall 2010
Frequencies Output. Ethnic group and Job Satisfaction Scale 1
• ONLY a frequency table was outputted.
• Did not request statistics for these categorical variablesEthnic Group
36 51.4 51.4 51.4
18 25.7 25.7 77.1
14 20.0 20.0 97.1
2 2.9 2.9 100.0
70 100.0 100.0
White/European
Asian
West Indian
African
Total
ValidFrequency Percent Valid Percent
Cumulative
Percent
ASK Week Fall 2010
70 100.0 100.0
Job Satisfaction Scale - Item 1
7 10.0 10.3 10.3
22 31.4 32.4 42.6
24 34.3 35.3 77.9
13 18.6 19.1 97.1
2 2.9 2.9 100.0
68 97.1 100.0
2 2.9
70 100.0
Strongly Disagree
Disagree
Undecided
Agree
Strongly Agree
Total
Valid
0Missing
Total
Frequency Percent Valid Percent
Cumulative
Percent
Total A
Total B
Percent = (Frequency)/(Total B)Valid Percent = (Frequency)/(Total A)
• Descriptive statistics
• Histogram with normal curve overlay.
Frequencies Output. Gross Annual Income
Statistics
Gross Annual Income
68
2
7819.12
7800.00
6800a
997.947
995897.7
.370
Valid
Missing
N
Mean
Median
Mode
Std. Deviation
Variance
Skewness
ASK Week Fall 2010
.291
-.294
.574
4600
5900
10500
6925.00
7800.00
8675.00
Std. Error of Skewness
Kurtosis
Std. Error of Kurtosis
Range
Minimum
Maximum
25
50
75
Percentiles
Multiple modes exist. The smallest value is showna.
Messages appear at the bottom
Q1Q2
Q3
(Quartiles)
Descriptives. Analyse scale variables.
• Appropriate for scale variables ONLY.
• Offers fewer statistics than Frequencies.
ASK Week Fall 2010
Calculates the z-values for each
variable and saves as a new variable.
Descriptives Output. Gross annual income and Age last birthday
Standardised values
saved as variables:
ASK Week Fall 2010
saved as variables:
Z-values for Gross
Annual Income and age
Explore. Examine each scale variable by each categorical variable.
Add 1 or more
scale variables here
Add 1 or more
categorical
variables here
Output
Statistics ONLY
Plots ONLY
or Both
Outputs most
descriptives
offered under
Frequencies
ASK Week Fall 2010
variables here
K-S test for normality for
each group within each
Factor variable for each
Dependent variable
Explore Output. Exam Performance by Gender
ASK Week Fall 2010
Explore Output. Exam Performance and Anxiety by Gender
Male and Female
together for each
Dependent
ASK Week Fall 2010
Anxiety and
Performance together
for each Factor
Crosstabs. Ethnic group by Gender
Add 1 or more
categorical
variables for row
and column
ASK Week Fall 2010
SPSS helps out by
identifying which
stats should be
used on certain
data types
Output
One crosstabs table
between each row
and column variable
Crosstabs Output. Ethnic group by Gender
Case Processing Summary
70 100.0% 0 .0% 70 100.0%Ethnic Group * Gender
N Percent N Percent N Percent
Valid Missing Total
Cases
Ethnic Group * Gender Crosstabulation
22 14 36
20.1 15.9 36.0
31.4% 20.0% 51.4%
Count
Expected Count
% of Total
White/EuropeanEthnic
Group
female male
Gender
Total Observed
Expected
% out of 70
ASK Week Fall 2010
31.4% 20.0% 51.4%
8 10 18
10.0 8.0 18.0
11.4% 14.3% 25.7%
8 6 14
7.8 6.2 14.0
11.4% 8.6% 20.0%
1 1 2
1.1 .9 2.0
1.4% 1.4% 2.9%
39 31 70
39.0 31.0 70.0
55.7% 44.3% 100.0%
% of Total
Count
Expected Count
% of Total
Count
Expected Count
% of Total
Count
Expected Count
% of Total
Count
Expected Count
% of Total
Asian
West Indian
African
Total
% out of 70
CHART BUILDERCHART BUILDERRepresenting data graphically using SPSS
ASK Week Fall 2010
Opening the Chart Builder• Select Chart Builder… from the Graphs menu
• Access Graphs from the Data Editor
– Data View OR Variable View
• OR Access Graphs from the Output window
ASK Week Fall 2010
All variables
listed here
Select
chart type
Select
chart format
Build your
chart here
Start over!
Histograms• Simple. ONE continuous scale variable
• Stacked. ONE continuous scale variable split by ONE
categorical variable.
• Frequency Polygon. ONE continuous scale variable
• Population Pyramid. ONE continuous scale variable
split by ONE categorical variable.split by ONE categorical variable.
Simple Histogram Stacked Histogram
Frequency Polygon
Population Pyramid
ASK Week Fall 2010
Simple Histogram. Gross Annual Income.
Choose Histogram from
properties window
Displaying the Normal
Curve is optional.
Drag scale variable here
e.g. Gross Annual Income
SPSS output
ASK Week Fall 2010
Stacked Histogram. Gross Annual Income by Ethnic Group.
Choose Histogram from
properties window
Drag categorical variable here
e.g. Ethnic Group
Drag scale variable here
e.g. Gross Annual Income
SPSS output
ASK Week Fall 2010
Stacked Histogram. Gross Annual Income by Gender.
Drag categorical variable here
e.g. Gender
Drag scale variable here
e.g. Gross Annual Income SPSS output
ASK Week Fall 2010
Boxplots• Simple: ONE scale variable split by ONE category.
• Clustered: ONE scale variable clustered by ONE
category and split by ONE category.
• 1-D: ONE scale variable.
Simple Boxplot 1-D Boxplot
Clustered Boxplot
ASK Week Fall 2010
Simple Boxplot. Gross Annual Income by Ethnic Group.
Drag scale variable here
e.g. Gross Annual Income
Drag categorical variable here
e.g. Ethnic Group
ASK Week Fall 2010
SPSS output
Clustered Boxplot.
Drag categorical variable here
e.g. Cluster by Gender
Gross Annual Income split by Ethnic Group & clustered by Gender.
Drag scale variable here
e.g. Gross Annual Income
Drag categorical variable here
e.g. Split by Ethnic Group
ASK Week Fall 2010
SPSS output
1-D Boxplot. Employee Age Last Birthday.
Drag scale variable here
e.g. Age Last Birthday
SPSS output
ASK Week Fall 2010
Bar Charts• Simple.
– ONE categorical variable.
• Simple OR Simple Error.
– ONE scale variable split by ONE categorical variable.
– TWO OR MORE related scale variables (e.g. compare means).
Simple Bar Chart
Simple Error
ASK Week Fall 2010
Simple Bar Chart. Gender.
Select Count from the
properties window
* No equivalent Simple Error Bar Chart.
SPSS outputDrag categorical variable here
e.g. Gender
ASK Week Fall 2010
Simple Bar Chart. Cholesterol level by Smoke.* Same process for a Simple Error Bar Chart.
Drag scale variable here
e.g. Cholesterol level(Select Mean from the properties window)
SPSS output
Drag categorical variable here
e.g. Smoke
ASK Week Fall 2010
Simple Bar Chart. Methods for getting rid of hiccups.
Drag multiple scale variables heree.g. Breath, Drinking, Gargling and Sugar
(Select Mean from the properties window)
* Same process for a Simple Error Bar Chart.
SPSS output
Leave this empty. It will change
to INDEX after you choose Y.
ASK Week Fall 2010
Bar Charts• Clustered OR Stacked.
– ONE categorical variable clustered by ONE categorical variable.
– ONE scale variable split by ONE categorical variable and
clustered by ONE categorical variable.
– TWO OR MORE scale variables clustered by ONE categorical
variable (e.g. compare means).
Stacked Bar Chart
Clustered Bar Chart
ASK Week Fall 2010
Clustered Bar Chart.
Drag categorical variable here
e.g. Cluster by Gender
Cholesterol level split by Smoke & clustered by Gender.
Drag scale variable here
e.g. Cholesterol level(Select Mean from the properties window)
SPSS output
Drag categorical variable here
e.g. Split by Smoke
* Same process for a Stacked Bar Chart.ASK Week Fall 2010
Clustered Bar Chart. Hiccup methods clustered by Gender.
Drag categorical variable here
e.g. Cluster by Gender
Drag multiple scale variables heree.g. Breath, Drinking, Gargling and Sugar
(Select Means from the properties window)
SPSS outputLeave this empty. It will change
to INDEX after you choose Y.
Error bars are optional
* Same process for a Stacked Bar Chart.ASK Week Fall 2010
Line Charts• Simple. Alternative to a Simple Bar Chart.
• Multiple. Alternative to a Clustered Bar Chart.
Multiple Line Chart
Simple Line Chart
ASK Week Fall 2010
Pie Charts• Pie.
– ONE categorical variable (alternative to a Simple Bar Chart).
– ONE scale variable split by ONE categorical variable.
ASK Week Fall 2010
Pie Chart. Ethnic Group.
Select Value from the
properties window
SPSS outputDrag categorical variable here
e.g. Ethnic Group
ASK Week Fall 2010
Pie Chart. Gross Annual Income split by Ethnic Group.
Drag scale variable here
e.g. Gross Annual Income
SPSS output
Drag categorical variable here
e.g. Ethnic Group
ASK Week Fall 2010
CAUTION: This representation can be misleading and misinterpreted if the count of each
ethnic group is not close in size (if not equal). Each piece represents the proportion of
the total gross annual income of the entire sample for each ethnic group. Thus, as most
participants were White/European, this group makes up the largest proportion.
Scatter Plot• Simple. ONE scale independent variable by ONE OR
MORE scale dependent variables.
• Grouped. ONE scale independent variable by ONE or
more scale dependent variables and split by ONE
categorical variable .
• Matrix. TWO OR MORE scale variables.
Simple Scatter Grouped ScatterSimple Scatter
Matrix Scatter
Grouped Scatter
ASK Week Fall 2010
Simple Scatter. Exam Performance by Time Spent Revising.
Drag 1 or more scale variables heree.g. Exam Performance
* Could also use to create a time series.
SPSS output
Drag independent scale variable here
e.g. Time Spent Revising
ASK Week Fall 2010
Grouped Scatter.
Drag 1 or more scale variables here
e.g. Exam Performance
Exam Performance by Time Spent Revising and split by Gender.
Drag categorical variable here
e.g. Split by Gender
SPSS output
Drag independent scale variable here
e.g. Time Spent Revising
ASK Week Fall 2010
Matrix Scatter.Exam Performance, Exam Anxiety and Time Spent Revising
SPSS output
ASK Week Fall 2010
Drag 2 or more scale variables here
e.g. Exam Performance, Exam Anxiety,
Time Spent Revising
WHAT ELSE…?WHAT ELSE…?A quick look at what else SPSS can do
ASK Week Fall 2010
Quick list of common uses of SPSS• Correlation Coefficients
• Parametric & Nonparametric Hypothesis Tests
– T-tests
– Chi square tests
– ANOVA
– MANOVA– MANOVA
• Recode variables
• Transform variables
• Select special cases of a variable to analyse
• Generate random numbers (or samples)
• …and the list goes on…
ASK Week Fall 2010
SPSS Course at University of Colorado at Colorado Springs:http://www.uccs.edu/~faculty/lbecker/SPSS/content.htm
SPSS Tutorials (lots of links on this site):http://www.uccs.edu/~faculty/lbecker/SPSS/content.htm
SPSS On-Line Training Workshops (tutorials & videos):http://calcnet.mth.cmich.edu/org/spss/toc.htm
ASK Week Fall 2010
SPSS Survival Manual, 4th Edition (2010) by Julie Pallant.
(For SPSS Version 15 or later)
Discovering Statistics Using SPSS, 3rd Edition (2009) by Andy Field.
(For SPSS Version 15 or later)
ASK Week Fall 2010
• Stats & SPSS drop-in (≈10 min).(If more time is needed we’ll make an appointment)
• Undergraduates:
Friday 12.00-13.00
ASK area, ground floor of libraryASK area, ground floor of library
• Post Graduates:
Thursdays 13.30-15.00
Graduate School Training Room
(it’s in with the offices on the top floor)
ASK Week Fall 2010
THE ENDTHE END
ASK Week Fall 2010