DATA ANALYSIS
Instructor: Prof. M J Xavier
OBJECTIVES:
• To learn how to create an SPSS Data file
• To learn how to make Frequency Tables
• To learn how to find mean. Median, mode, standard deviation, and variance of a
continuous variable using SPSS
• To learn how to make contingency Tables
• To learn how to use Correspondence Analysis for graphical representation of
Contingency Tables
• To learn how to perform independent t-test and one-way ANOVA
• To learn how to transfer data from SPSS output to Power-point slides
TASKS:
Open the file exercise1.xls and study the data structure
Create the SPSS file exercise1.sav along with the instructor.
Create a frequency Table and a pie chart for the variable Income using:
ANALYZE
DESCRIPTIVE STATSTICS
FREQUENCIES
Move variable `Income’
CHARTS
PIE CHARTS
CONTINUE
OK
See the new SPSS output file and study the results
Repeat the same for Brands and Gender. This time ask for a Bar Chart.
1
Find out the mean. Median, etc. of the variable `units consumed’ using:
ANALYZE
DESCRIPTIVE STATISTICS
DESCRIPTIVES
Drag `units consumed’ TO VARIABLES
options
MEAN, MEDIAN, MODE, STANDARD DEVIATION, VARIANCE, RANGE
CONTINUE
OK
Study the results obtained.
Calculate the units consumed per month Brand-wise using:
ANALYZE
COMPARE MEANS
MEANS
Move the variable `units’ to DEPENDENT LIST
Move `brands’ to INDEPENDENT LIST
OK
Study the results and also carry-out the analysis income-wise and gender-wise.
Do a cross tabulation of Income Vs Brand using:
ANALYZE
DESCRIPTIVE STATISTICS
CROSS TABS
Take `Income’ to ROW VARIABLE
Take ‘brand’ to COLOUMN VARIABLE
CELLS
ROW PERCENTAGE
CONTINUE
STATISTICS
Check CHI-SQUARE
CONTINUE
OK
Study the resulting Table along with the Instructor. Learn how to interpret a cross-
tabulation data.
Repeat the analysis with gender and interpret the results.
Use the following commands to run the independent t-test to validate the Hypothesis that
Females consume more than males.
2
ANALYZE
COMPARE MEANS
INDEPENDENT SAMPLES t TEST
Drag `Units Consumed’ to TEST VARIABLE
Drag `Gender’ to GROUPING VARIABLE
DEFINE GROUPS
Mark 1 in GROUP1
Mark 2 in GROUP2
CONTINUE
When we have to compare more than two means we use one-way ANOVA. Use the
following commands for the same analysis to check the Hypothesis that consumption
varies across income groups.
ANALYZE
COMPARE MEANS
ONE-WAY ANOVA
Drag `Unites Consumed’ to INDEPENDENT LIST
Drag `Income’ to FACTORS
OPTIONS
Check DESCRIPTIVES
CONTINUE
OK
Carryout the analysis with Brands Vs consumption.
Open a new Power-point file. Copy and paste the Tables and charts from the SPSS
output file to Power-point. Annotate the charts and figures.
Save the SPSS data file as exercise1.sav
Save the output file as exercise1.spo
3
Correspondence Analysis:
Copy the Income VS Brand table onto a new Excel sheet and recast the data as the
instructor does it. Use the same to create a new SPSS file exercise2.sav
Carry out correspondence analysis using:
DATA
WEIGHT CASES
WEIGHT CASES BY
Highlight the variable `frequency’ and drag to FREQUENCY VARIABLE
OK
ANALYZE
DATA REDUCTION
CORRESPONDENCE ANALYSIS
Drag `income’ to ROW VARIABLE and DEFINE RANGE
MINIMUM VAUE `1’ MAXIMUM VALUE `4’ UPDATE CONTINUE
Drag `brand’ to COLUMN VARIABLE and DEFINE RANGE
MINIMUM VAUE `1’ MAXIMUM VALUE `4’ UPDATE CONTINUE
OK
Examine the resulting graph and interpret the meaning of the same.
Take the graph to Power-point and annotate.
Practice the methods learnt using dataset product_usage_survey.sav.
PRACTICE MAKES A PERSON PERFECT
Income Code Brand Code Gender Code
less than $ 1000 1 Brand A 1 Male 1
$1001 to $ 3000 2 Brand B 2 Female 2
$3001 to $ 5000 3 Brand C 3
Above $5000 4 Brand D 4
4
No. Income Code Brand Code Gender Code Units
Consumed
1 $3001 to $ 5000 3 Brand A 1 Female 2 5
2 Above $5000 4 Brand B 2 Female 2 5
3 Less than $ 1000 1 Brand A 1 Male 1 2
4 $1001 to $ 3000 2 Brand A 1 Male 1 3
5 $3001 to $ 5000 3 Brand D 4 Female 2 5
6 Above $5000 4 Brand A 1 Female 2 6
7 $1001 to $ 3000 2 Brand A 1 Female 2 4
8 Above $5000 4 Brand C 3 Male 1 3
9 Above $5000 4 Brand A 1 Female 2 7
10 Less than $ 1000 1 Brand A 1 Male 1 3
11 $1001 to $ 3000 2 Brand B 2 Female 2 4
12 $1001 to $ 3000 2 Brand B 2 Male 1 4
13 $3001 to $ 5000 3 Brand A 1 Female 2 4
14 $3001 to $ 5000 3 Brand B 2 Female 2 4
15 Less than $ 1000 1 Brand D 4 Male 1 2
16 $3001 to $ 5000 3 Brand C 3 Female 2 5
17 Less than $ 1000 1 Brand C 3 Male 1 3
18 Above $5000 4 Brand D 4 Female 2 4
19 Above $5000 4 Brand D 4 Female 2 6
20 Less than $ 1000 1 Brand A 1 Female 2 5
21 $1001 to $ 3000 2 Brand B 2 Female 2 4
22 Less than $ 1000 1 Brand A 1 Male 1 3
23 $1001 to $ 3000 2 Brand B 2 Male 1 3
24 $3001 to $ 5000 3 Brand C 3 Female 2 5
25 Above $5000 4 Brand D 4 Female 2 5
26 Less than $ 1000 1 Brand A 1 Male 1 2
27 $1001 to $ 3000 2 Brand D 4 Male 1 2
28 Above $5000 4 Brand D 4 Female 2 4
29 $3001 to $ 5000 3 Brand C 3 Male 1 3
30 $1001 to $ 3000 2 Brand C 3 Male 1 2
31 Less than $ 1000 1 Brand B 2 Female 2 2
32 Less than $ 1000 1 Brand B 2 Male 1 2
33 $3001 to $ 5000 3 Brand B 2 Male 1 6
34 $3001 to $ 5000 3 Brand C 3 Female 2 4
35 Above $5000 4 Brand D 4 Female 2 6
36 $1001 to $ 3000 2 Brand D 4 Male 1 3