Graphs with SPSS

advertisement
Graphs with SPSS
Aravinda Guntupalli
Bar charts
 Bar Charts are used for graphical representation of
Nominal and Ordinal data
 Height of the bar is proportional to the number of
values in the category.
 Select the icon for the chart type you want, and
select the option under Data.
 You can either show group of cases or groups of
variables using bar chart.
Summaries for Groups of Cases
 Categories of a single variable are
summarized.
 Bar height is determined by the Bars
Represent option.
 Example: To see number of males and
females from the Gender variable
Bar chart for SES
100
90
80
70
60
Count
50
40
low
SES
middle
high
How to?
 From the menus, choose: Graphs, Bar
 Select the icon for Simple and select Summaries
for groups of cases.
 Select Define.
 Select a variable for the category axis and move it
into the Category Axis box. This variable may be
numeric, string, or long string.
Summaries of groups of
variables
 Two or more variables are summarized
within categories of another variable.
 Two or more Bars Represent variables (Var
1, Var 2).
 For example bar chart for gender and SES
variables.
Clustered Bar chart (a)
58
56
For Numeric
variable
54
52
50
Mean
48
science score
46
social studies score
low
SES
middle
high
How to?
 From the menus, choose: Graphs and Bar
 Select the icon for Clustered and select Summaries
of separate variables.
 Select Define.
 Select at least two variables and move them into the
Bars Represent box. These variables must be
numeric.
 Select a category variable and move it into the
Category Axis box. This variable may be numeric,
string or long string.
Clustered Bar chart (b)
50
40
30
SES
20
Count
low
middle
10
high
.00
GENDER
1.00
How to?
 From the menus, choose: Graphs and Bar
 Select the icon for Clustered and select
Summaries of groups of cases.
 Select Define.
 Select at least two variables and move them
into the Bars Represent box.
 These variables can be categorical.
Pie Diagram
 The Pie Chart is an alternative to the Bar
Chart for Nominal and Ordinal data.
 The proportion of the Pie represents the
category’s percentage in the population or
sample.
 Must identify slices.
Pie diagram
high
29.0%
low
23.5%
middle
47.5%
How to make pie diagram?
 From the menus, choose: Graphs and Pie
 Select Summaries for groups of cases.
 Select Define.
 Select a variable and move it into the Define
Slices by box. This variable may be numeric,
string, or long string.
Boxplot
 A boxplot consists of box and 2 tails.
 The horizontal line inside the box tells the position
of the median and its upper and lower boundaries
are its upper and lower quartiles.
 The tails run to the most extreme values.
 boxplot in sum shows structure of the data along
with its skewness and spread.
Drawing a boxplot.
Question: We have recorded the heights in cm of boys in a
class as shown below. We will draw a boxplot for this data.
Q2
QL
Qu
137, 148, 155, 158, 165, 166, 166, 171, 171, 173, 175, 180, 184, 186, 186
Lower
Quartile
= 158
130
140
Upper
Quartile
= 180
Median
= 171
150
160
170
180
cm
190
Boxplot
80
70
60
50
40
30
20
N =
SES
47
95
58
low
middle
high
How to make a boxplot?
 From the menus, choose: Graphs and Boxplot
 Select the icon for Simple and select Summaries
for groups of cases.
 Select Define.
 Select the variable for which you want boxplots,
and move it into the Variable box.
 Select a variable for the category axis and move it
into the Category Axis box. This variable may be
numeric, string, or long string.
Histogram
A Histogram is a graphical representation of
a frequency distribution for continuous data.
The height is proportional to the frequency of
that class
Histogram (2)
30
20
10
Std. Dev = 9.37
Mean = 52.6
N = 200.00
0
32.5
37.5
35.0
42.5
40.0
math score
47.5
45.0
52.5
50.0
57.5
55.0
62.5
60.0
67.5
65.0
72.5
70.0
75.0
How to make histogram?
 From the menus, choose: Graphs and
Histogram
 Select a numeric variable for Variable in the
Histogram dialog.
 Select Display normal curve to display a
normal curve on the histogram.
Negatively skewed
Positively skewed
Number of modal classes
 A modal class is the one with the largest number
of observations.
The modal class
A unimodal histogram
Number of modal classes
A modal class
A modal class
A bimodal histogram
Bell shaped histogram
Many Statistical techniques require normal distribution.
Histogram helps verify the shape of population.
Scatter plot (1)
 To know the relationships between two quantitative
variables we are interested in we can use scatter
plots.
 A scatter diagram plots the value of one economic
variable against the value of another variable.
 It can be used to reveal whether a relationship exists
and the type of relationship that exists.
 A scatter plot can describe the relation between
reading and writing scores.
Scatter plot (2)
80
70
60
50
40
30
20
30
writing score
40
50
60
70
Typical Patterns
Positive linear relationship
Negative nonlinear relationship
No relationship
Negative linear relationship
Nonlinear (concave) relationship
How to make scatter plots?




From the menus, choose: Graphs and Scatter
Select the icon for Simple.
Select Define.
You must select a variable for the Y-axis and a
variable for the X-axis. These variables must be
numeric, but should not be in date format.
 You can select a variable and move it into the Set
Markers by box. This variable may be numeric or
string.
P-P plots
 Plots a variable’s cumulative proportions against
the cumulative proportions of any of a number of
test distributions.
 Probability plots are generally used to determine
whether the distribution of a variable matches a
given distribution.
 If the selected variable matches the test
distribution, the points cluster around a straight line.
Normal P-P plot
Normal P-P Plot of math score
1.00
.75
.50
.25
0.00
0.00
.25
Observed Cum Prob
.50
.75
1.00
How to make P-P plots?
 From the menus, choose: Graphs and
P-P
 Select one or more numeric variables and
move them onto the Variables list.
 Select a test distribution.
Q_Q plots
 Plots the quantiles of a variable's distribution
against the quantiles of any of a number of test
distributions.
 Probability plots are generally used to determine
whether the distribution of a variable matches a
given distribution.
 If the selected variable matches the test distribution,
the points cluster around a straight line.
How to make Q-Q plots?
 From the menus, choose: Graphs and
Q_Q
 Select one or more numeric variables and
move them onto the Variables list.
 Select a test distribution.
Normal Q_Q plot
Normal Q-Q Plot of math score
80
70
60
50
40
30
20
20
30
Observed Value
40
50
60
70
80
Thank You
Wish you colorful time making graphs
Download