You are on page 1of 35

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

50

Count

40 low middle high

SES

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

54

For Numeric variable

52

50

48

Mean

science score 46 low middle high social studies score

SES

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 low

Count

middle 10 .00 1.00 high

GENDER

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 categorys 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.
QL Q2 Qu 137, 148, 155, 158, 165, 166, 166, 171, 171, 173, 175, 180, 184, 186, 186

Lower Quartile = 158

Median = 171

Upper Quartile = 180

130

140

150

160

170

180

cm

190

Boxplot
80

70

60

50

40

30

20
N = 47 95 58

low

middle

high

SES

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 0 32.5 37.5 42.5 47.5 52.5 57.5 62.5 67.5 72.5 75.0 35.0 40.0 45.0 50.0 55.0 60.0 65.0 70.0 N = 200.00

math score

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

40

50

60

70

writing score

Typical Patterns
Positive linear relationship No relationship Negative linear relationship

Negative nonlinear 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 variables 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 .50 .75 1.00

Observed Cum Prob

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 40 50 60 70 80

Observed Value

Thank You
Wish you colorful time making graphs

You might also like