Docsity

SPSS Tutorial and exercise book, Lecture notes of Statistics

Toggle sidebar
bg1
UNIVERSITY OF MISKOLC
Faculty of Economics
Institute of Business Information and Methods
Department of Business Statistics and Economic Forecasting
PETRA PETROVICS
SPSS TUTORIAL & EXERCISE BOOK
FOR BUSINESS STATISTICS
MISKOLC
2012
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30
pf31
pf32
pf33
pf34
pf35
pf36
pf37
pf38
pf39
pf3a
pf3b
pf3c
pf3d
pf3e
pf3f
pf40
pf41
pf42
pf43
pf44
pf45
pf46
pf47
pf48
pf49
pf4a
Discount

On special offer

Partial preview of the text

Download SPSS Tutorial and exercise book and more Lecture notes Statistics in PDF only on Docsity!

UNIVERSITY OF MISKOLC

Faculty of Economics Institute of Business Information and Methods Department of Business Statistics and Economic Forecasting

PETRA PETROVICS

SPSS TUTORIAL & EXERCISE BOOK

FOR BUSINESS STATISTICS

MISKOLC

TABLE OF CONTENT

  • I. SPSS Tutorial
      1. Introduction to SPSS
      1. Transform / Select Data...............................................................................................
      1. Graphs
      1. Central Tendencies, Measures of Distribution, Measures of Asymmetry
      1. Estimation and Hypothesis Testing
      1. Statistical Dependence
      1. Correlation and Linear Regression
      1. Multiple Correlation and Linear Regression
      1. Curvilinear Regression
      1. Time Series Analyzes
  • II. Exercises for SPSS...........................................................................................................
  • Figure 1 – Opening an SPSS Data File ................................................................................... LIST OF FIGURES
  • Figure 2 – Variable Type Dialog Box .....................................................................................
  • Figure 3 – Value Labels Dialog Box .......................................................................................
  • Figure 4 – Missing Values Dialog Box ...................................................................................
  • Figure 5 – Compute Variable Dialog Box ...............................................................................
  • Figure 6 – Frequencies Dialog Box.......................................................................................
  • Figure 7 – Select Cases Dialog Box ......................................................................................
  • Figure 8 – Selected Subset of Cases......................................................................................
  • Figure 9 – Bar Charts Dialog Box.........................................................................................
  • Figure 10 – Bar Charts Dialog Box .......................................................................................
  • Figure 11 – Chart Editor .......................................................................................................
  • Figure 12 – Bar Chart ...........................................................................................................
  • Figure 13 – Chart Editor Properties Dialog Box....................................................................
  • Figure 14 – Pie Chart ............................................................................................................
  • Figure 15 – Stacked Bar Chart Dialog Box ...........................................................................
  • Figure 16 – Stacked Bar Chart ..............................................................................................
  • Figure 17 – Scatter / Dot Dialog Box ....................................................................................
  • Figure 18 – Simple Scatter Plot Dialog Box..........................................................................
  • Figure 19 – Simple Scatter Plot ............................................................................................
  • Figure 20 – Box Plot.............................................................................................................
  • Figure 21 – Box Plot Dialog Box ..........................................................................................
  • Figure 22 – Box Plot Chart Editor ........................................................................................
  • Figure 23 – Clustered Box Plot Chart Editor .........................................................................
  • Figure 24 – Clustered Box Plot .............................................................................................
  • Figure 25 – Descriptives Dialog Box ....................................................................................
  • Figure 26 – Clustered Box Plot .............................................................................................
  • Figure 27 – Frequencies Statistics Dialog Box ......................................................................
  • Figure 28 – One-Sample T Test Dialog Box for Estimation ..................................................
  • Figure 29 – One-Sample T Test Dialog Box for Hypothesis Testing .....................................
  • Figure 30 – Independent Samples T Test Dialog Box ...........................................................
  • Figure 31 – One-Sample Kolmogorov–Smirnov Test Dialog Box .........................................
  • Figure 32 – Histogram Dialog Box .......................................................................................
  • Figure 33 – Histogram ..........................................................................................................
  • Figure 34 – Two-Independent-Samples Tests Dialog Box.....................................................
  • Figure 35 – Crosstabs Dialog Box ........................................................................................
  • Figure 36 – Cell Display Dialog Box ....................................................................................
  • Figure 37 – Crosstabs Statistics Dialog Box .........................................................................
  • Figure 38 – Chi-square Distribution......................................................................................
  • Figure 39 – Means Dialog Box .............................................................................................
  • Figure 40 – Means Options Dialog Box ................................................................................
  • Figure 41 – Bivariate Correlations Dialog Box .....................................................................
  • Figure 42 – Linear Regression Dialog Box ...........................................................................
  • Figure 43 – Linear Regression: Statistics Dialog Box ...........................................................
  • Figure 44 – Linear Regression Dialog Box: Statistics for Estimating the Coefficients ...........
  • Figure 45 – Linear Regression: Save for Prediction Intervals ................................................
  • Figure 46 – Multiple Linear Regression ................................................................................
  • Figure 47 – Curve Estimation Dialog Box ............................................................................
  • Figure 48 – Curve Fit ...........................................................................................................
  • Figure 49 – Sequence Charts Dialog Box..............................................................................
  • Figure 50 – Sequence Chart ..................................................................................................
  • Figure 51 – Curve Estimation for Linear Trend Model .........................................................
  • Figure 52 – Curve Estimation: Save Dialog Box ...................................................................
  • Figure 53 – Predicted Number of Birth .................................................................................
  • Figure 54 – Define Dates Dialog Box ...................................................................................
  • Figure 55 – Sequence Chart Dialog Box ...............................................................................
  • Figure 56 – Time Axis Reference Line Dialog Box ..............................................................
  • Figure 57 – Time Axis Reference Line Dialog Box ..............................................................
  • Figure 58 – Seasonal Decomposition Dialog Box .................................................................
  • Figure 59 – Seasonal Decomposition Dialog Box .................................................................
  • Figure 60 – Error Component ...............................................................................................
  • Figure 61 – SAF_1: Seasonal Component.............................................................................
  • Figure 62 – SAS_1: Component without Seasonality ............................................................
  • Figure 63 – STC_1: Smoothed Trend-cycle Component .......................................................
  • Figure 64 – Forecasted Values ..............................................................................................
  • Figure 65 – Predicted Railway Transport ..............................................................................

INTRODUCTION

This exercise book was written for the students of the University of Miskolc within the framework of Business Statistics and Quantitative Statistical Methods. Some parts of the exercises are translated from the Hungarian book of Domán – Szilágyi – Varga: Statisztikai elemzések alapjai II , which are supplemented by SPSS exercises on the basis of SPSS 16. and 19.0 Tutorial. This book is a tutorial, which includes theoretical background just to understand the examples included.

ACKNOWLEDGEMENTS

The described work was carried out as part of the TÁMOP-4.2.1.B-10/2/KONV-2010- project in the framework of the New Hungarian Development Plan. The realization of this project is supported by the European Union, co-financed by the European Social Fund.

Figure 2 – Variable Type Dialog Box

  • Width: the field width.
  • Decimals: number of decimals in case of Numeric type.
  • Label: descriptive name of a variable (up to 256 characters). It can contain space or other characters, which we could not use in Names.
  • Values: we can assign descriptive value labels for each value of a variable, thus the numeric codes represent non-numeric categories.

Figure 3 – Value Labels Dialog Box

  • Missing: if we do not have data, because e.g. a respondent refused to answer. User- missing values are flagged for special treatment and are excluded from most calculations.

Figure 4 – Missing Values Dialog Box

  • Column: number of characters for the column width.
  • Align: alignment controls the display of data. It can be right, left or center.
  • Measures: it is the scales of measurement, which can be nominal, ordinal, interval or ratio scale. In the SPSS you will find the nominal, ordinal and ratio measures.  Nominal scale: Numbers are labels or groups or classes. Simple codes assigned to objects as labels. We use nominal scale for qualitative data, e.g. professional classification, geographic classification. E.g. blonde: 1, brown: 2, red: 3, black:
  1. A person with red hair does not possess more ‘hairiness’ than a person with blonde hair.  Ordinal scale: Data elements may be ordered according to their relative size or quality, the numbers assigned to objects or events represent the rank order (1st, 2nd, 3rd etc.) E.g. top lists of companies.  Interval scale: There is a meaning of distances between any two observations. The "zero point" is arbitrary. Negative values can be used. Ratios between numbers on the scale are not meaningful, so operations such as multiplication and division cannot be carried out directly. E.g. temperature with the Celsius scale.  Ratio scale (Scale): This is the strongest scale of measurement. Distances between observations and also the ratios of distances have a meaning. It contains a meaningful zero. E.g. mass, length.

2. TRANSFORM / SELECT DATA

Example 1 How old are the respondents? Create a new variable as age!

We can create new variables by transforming another one. We have data about the date of birth of employees. If we subtract the year of birth from the current year, we will get their age. In order to determine the age, choose Transform / Compute Variable… from the menus.

Figure 6 – Frequencies Dialog Box

Find the results in the Output View.

Marital status

Frequency Percent

Valid Percent

Cumulative Percent

Valid single 12 5.4 5.5 5.

married 102 45.9 46.6 52. divorced 27 12.2 12.3 64. partner (but not married) 21 9.5 9.6 74. widow 57 25.7 26.0 100. Total 219 98.6 100.

Missing System 3 1.

Total 222 100.

Therefore, 5.4% of people are single in Csernely. (5.5% of respondents are single.)

Example 3 What is the proportion of men within pensioners?

Now, the statistical population is not the respondents, but just pensioners. First we should select the subset of cases ( pensioner ) with Data / Select cases…

Figure 7 – Select Cases Dialog Box

We use a conditional expression to select men: Gender = 1 (because 1 is the code of men).

Figure 8 – Selected Subset of Cases

Then choose Analyze / Descriptive Statistics / Frequencies… The relative frequencies of gender are the question, so Gender should be added to Variables. The following are the results found in the Output view:

Gender Frequency Percent Valid Percent Cumulative Percent Valid Male (^62) 50.4 50.4 50. Female 61 49.6 49.6 100 Total 123 100.0 100.

50.4% of pensioners are men.

Graph is stored in the Output window. To edit a Legacy Dialogs graph, double click on the graph, a Chart Editor window appears. Alternatively, you can also right-click on the chart and select Edit Content and then select ‘In separate window’.^2 Optionally, you can change the proportions of the chart: e.g. colour, depth and angle (3D), width of bars, etc. For attaching the proportion values to the chart, select Data Label Mode, as on the Figure below.

Figure 11 – Chart Editor

Figure 12 – Bar Chart

(^2) SPSS Online Training Workshop, Central Michigan University (accessed: 05-01-2011)

Example 2 Transform the bar chart into a pie chart!

In order to transform a chart, click the previously edited bar chart in the Chart Editor and select the Properties from the menus: Edit / Properties / Variables / Element Type…

Figure 13 – Chart Editor Properties Dialog Box

Figure 14 – Pie Chart

Example 3

Create a column diagram about the proportion of respondents grouped by education level stacked by gender! Embellish the graph!

Example 4

Create a scatter plot of average income and total expenditure of households if you set markers by the type of heating ( heating_bin )! Embellish the graph!

Scatter plot can be obtained by clicking on Graphs / Legacy Dialogs / Scatter/Dot…, and then the following box will appear. Simple scatter plot should be chosen.

Figure 17 – Scatter / Dot Dialog Box

Figure 18 – Simple Scatter Plot Dialog Box

First we should define the axes (x: average income; y: total expenditure), then set markers by the type of heating ( heating_bin ). Optionally, we can label cases by a variable. If we have the names of respondents, that would be the label. Using the Chart Editor, we also can embellish the chart (change the colour or the type of markers).

Figure 19 – Simple Scatter Plot

Example 5 Define a horizontal box plot of total expenditure! Embellish the graph!

First of all, we should define, what a box plot means. The box plot is a set of summary measures of distributions, like median, lower quartile, upper quartile, the smallest and the largest observations, moreover, the asymmetry can be seen as well.

Figure 20 – Box Plot Source: Aczel, 1996

Example 6

Define box plot of total expenditure of households categorized by the type of heating ( heating_bin ) clustered by household clusters! Embellish the graph!

For a categorized chart, choose the clustered box plot, where data in chart are summaries for groups of cases. The selected variable is the total expenditure and the type of heating ( heating_bin ) is on the category axis. The clusters are defined by household clusters.

Figure 23 – Clustered Box Plot Chart Editor

The graph is edited by double clicking on the graph and double clicking on the part of graph which wanted to be edited. Then a Properties dialog box will appear to make changes. After making the changes, click on Apply to effect the changes and then close the dialog box.

Figure 24 – Clustered Box Plot

4. CENTRAL TENDENCIES, MEASURES OF DISTRIBUTION, MEASURES OF

ASYMMETRY

Example

Define the central tendencies, measures of distribution, measures of asymmetry and quartiles for total expenditure (HUF/month) of households!

These are measures of descriptive statistics, which are obtained by clicking on Analyze menu and selecting Descriptive Statistics then Descriptive... Select the variable, which should be analyzed. If we would like, we can standardize variables as well, as it is shown on the figure below.