Abhinn - Spss Lab File
Abhinn - Spss Lab File
SOCIAL SCIENCES
LAB FILE
SUBMITTED TO:
ABHINN BAJAJ
Dr. R. Srivastava
DTU/2K13/MC/002
Assistant Professor 3rd
SEMESTER
Department of Applied Mathematics GROUP R1
DTU
INTRODUCTION
SPSS Statisticsis asoftware packageused forstatistical analysis. Long
produced bySPSS Inc., it was acquired byIBM in 2009. The current
versions (2014) are officially namedIBM SPSS Statistics.
SPSS is a widely used program for statistical analysis in social science. It
is also used by market researchers, health researchers, survey companies,
government, education researchers, marketing organizations, data miners,
and others.
The many features of SPSS Statistics are accessible via pull-down menus
or can be programmed with a proprietary 4GL command syntax language.
Command syntax programming has the benefits of reproducibility,
simplifying repetitive tasks, and handling complex data manipulations and
analyses. Additionally, some complex applications can only be programmed
in syntax and are not accessible through the menu structure. The pull-down
menu interface also generates command syntax; this can be displayed in the
output, although the default settings have to be changed to make the
syntax visible to the user. They can also be pasted into a syntax file using
the "paste" button present in each menu.
SPSS Statistics places constraints on internal file structure, data types,
data processing, and matching files, which together considerably simplify
programming. SPSS datasets have a two-dimensional table structure,
where the rows typically represent cases (such as individuals or households)
and the columns represent measurements (such as age, sex, or household
income). Only two data types are defined: numeric and text (or "string").
All data processing occurs sequentially case-by-case through the file. Files
can be matched one-to-one and one-to-many, but not many-to-many.
The graphical user interface has two views which can be toggled by clicking
on one of the two tabs in the bottom left of the SPSS Statistics window.
The 'Data View' shows a spreadsheet view of the cases (rows) and
variables (columns). Unlike spreadsheets, the data cells can only contain
numbers or text, and formulas cannot be stored in these cells. The 'Variable
View' displays the metadata dictionary where each row represents a
variable and shows the variable name, variable label, value label(s), print
width, measurement type, and a variety of other characteristics. Cells in
both views can be manually edited, defining the file structure and allowing
data entry without using command syntax. This may be sufficient for small
datasets. Larger datasets such as statistical surveys are more often
created in data entry software, or entered during computer-assisted
personal interviewing, by scanning and using optical character recognition
and optical mark recognition software, or by direct capture from online
questionnaires. These datasets are then read into SPSS.
SPSS Statistics can read and write data from ASCII text files (including
hierarchical files), other statistics packages, spreadsheets and databases.
SPSS finds its uses in various fields with one basic application ie to hold
and analyze huge amount of data.
It is used in fields such as:
1. Stock Exchange
2. Used by Cosmologists
3. Analyzing Census Data
4. Marketing
5. Survey Companies
6. Other Purposes Include Educational researches, etc.
INDEX
INPUTS:
FILES:Book1.xlxs,state.txt
PROCEDURE FOLLOWED:
Through excel
COMMANDS:
File-->Open-->Data
OUTPUT
FILE:Book1.sav
DATA VIEW
VARIABLE VIEW
THROUGH A TEXT FILE
COMMANDS:
File-->Read Text Data
OUTPUT
DATA VIEW
VARIABLE VIEW
CONCLUSION
Any document file in excel ,text etc. formats can be transported to SPSS editor
window.
PRECAUTIONS
INPUTS
The user defines the variables and its attributes and enters the data.
PROCEDURE
COMMANDS FOLLOWED
File-->New-->Data
OUTPUT
A file can be made in spss by defining variables and their attributes and data can
be then entered and stored accordingly.
PRECAUTIONS
1. Merging of cases
INPUTS
3 files File1, File@ and File3 are crated in SPSS in which the user defines the
variables, their attributes and enters the data.
PROCEDURE
MERGING OF CASES
1. Open FILE1.sav
File-->Open-->Data
2. Data--> Merge Files--> Add Cases
OUTPUT
OUTPUT:2
We can conclude that in spss, we can either merge complete files with one another
or we can add variables of one file to the variables of another files.
PRECAUTIONS
While adding variables to a file, make sure both the files were sorted in ascending
order.
While merging cases, the unpaired variables should be properly renamed and then
paired accordingly.
OBJECTIVE 4:
Demonstrate the following in a SPSS file :
Filtering of Data
Splitting of File According to Variable(s)
INPUTS :
Files : "car_sales.sav"
PROCEDURE
Filtering Of Data
Open "car_sales.sav" from the samples provided along with the software.
Data > Select Cases
Choose the radio button saying "If condition is satisfied".
Click on the "if" button.
Specify the condition in the dialog box that opens.
Click on "Continue".
Click on "OK".
Splitting of File According to Variable(s)
File : "car_sales_splitting.sav"
CONCLUSION :
Small extracts of very large document files can be viewed easily through splitting
and filtering of data on given specific cases.
PRECAUTIONS :
Give a program for finding the sum of obtained marks in a set of Multiple Choice
Questions for 5 students, if correct answers of "Q1", "Q2" and "Q3" are "d", "b"
and "a" respectively.
INPUT
OBJECTIVE5.sav
PROCEDURE
OUTPUT :
CONCLUSION :
New variables have been created on the basis of the answers of the given questions.
Result is computed on the basis of number of questions correctly answered by the
student.
PRECAUTIONS :
The value of the new variable should be given carefully depending on the correct
answer.
The numeric expression for the target variable should be given carefully and properly.
OBJECTIVE :6
INPUT:
OBJECTIVE6.sav
PROCEDURE:
THE VALUE OF FIRST AND THE LAST VARIABLES ARE STILL EMPTY
BECAUSE THERE ARE NO NEARBY VARIABLES ABOVE AND BELOW THEM
RESPECTIVELY AND THE VALUE OF 14TH VARIABLE IS STILL EMPTY
BECAUSE THE NO OF NEARBY VARIABLES WAS TAKEN TO BE 2 AND
AVERAGE CAN'T BE CALCULATED
5. Similarly, choose the methods Median of Nearby Points as the method to
replace missing variables.
THE VALUE OF FIRST AND THE LAST VARIABLES ARE STILL EMPTY BECAUSE THERE
ARE NO NEARBY VARIABLES ABOVE AND BELOW THEM RESPECTIVELY AND THE
VALUE OF 14TH VARIABLE IS STILL EMPTY BECAUSE THE NO OF NEARBY VARIABLES
WAS TAKEN TO BE 2 AND MEDIAN CAN'T BE CALCULATED
CONCLUSION :
Missing values of certain fields is calculated by applying various methods like mean
of the complete data, mean of nearby data, median of nearby data, etc
PRECAUTIONS :
.
OBJECTIVE :7
INPUTS:
Objective7.sav
PROCEDURE:
6. Do the same for Histogram, Scatter Plot, Box Plot, Bar Graph & Pie Chart.
HISTOGRAM
BAR GRAPH
PIE CHART
BOX PLOT
SCATTER PLOT
CONCLUSION :
We conclude that for any given set of data we can represent it easily with
the help of graphs.
PRECAUTIONS :
Descriptive Statistics.
INPUT:
Objective8.sav
PROCEDURE
3. Click on the button saying "Statistics..." and choose the required options to be displayed
and click on the button saying "Continue". Click on the button saying "Charts..." and
select "Histograms" and click on the button saying "Continue".
4. Click on the button saying "OK" to proceed to the output.
OUTPUT:
CONCLUSION :
PRECAUTIONS :
INPUT:
Objective9.sav
PROCEDURE:
A. CORRELATION
3. Select "Two-tailed" and click "OK" and the output is displayed in the Output Window.
B. REGRESSION
3. Under the category "Models", select "Linear", "Quadratic" & "Exponential".Click on "OK" to
view the output.
CONCLUSION :
From the above data, we conclude that M3 and DM are very partially correlated
as Pearson's correlation coefficient is very small and as sig value in both one tailed
and two tailed tests are greater than 0.05, we fail to reject the null hypothesis Ho
that M3 and DM are not correlated and alternate hypothesis Ha that M3 and DM
are correlated is rejected.
PRECAUTIONS :
OBJECTIVE 10:
Distribution curves
INPUTS:
FILES:breakfast.sav
PROCEDURE FOLLOWED:
COMMANDS:
1. Files-->Open-->Data
OUTPUT
COLUMN WISE: FINDING FREQUENCY BY GENDER TO JELLY DONUT(JD)
OUTPUT
BOTH ROW WISE AND COLUMN WISE: FINDING
FREQUENCY BY GENDER TO COFFEE CAKE(CC) AT
ROW AND JELLY DONUT(JD) AT COLUMN
OUTPUT
CONCLUSION
PRECAUTIONS
Data variables for frequency curves should be decided before hand for proper
results.
OBJECTIVE 11:
Chisquare test
INPUTS:
FILES:breakfast.sav
COMMANDS:
1. INDEPENDENT
1 .Files -->Open-->Data
1. Analyse--> Nonparametric test --> Legacy Dialogs --> Chi Square
OUTPUT
2. Dependent
COMMANDS:
1. Analyse--> Descriptive Statistics --> Cross Tabs
OUTPUT
CONCLUSION
Chi square test is a statistical test commonly used to compare observed data with
data we would expect to obtain according to a specific hypothesis.
PRECAUTIONS
It may not show proper results so what we have to observe should be decided
before hand.
OBJECTIVE 12:
Perform T test
INPUTS:
FILES:breakfast.sav
PROCEDURE FOLLOWED:
1. One Way
COMMANDS:
COMMANDS:
CONCLUSION
PRECAUTIONS:
Variables should be chosen properly.
It may not show proper results so what we have to observe should be decided
before hand.
OBJECTIVE 13:
ANOVA Test
INPUTS:
breakfast.sav
PROCEDURE FOLLOWED:
A. One Way
COMMANDS:
B. Two Way
COMMANDS:
ANOVA test is used to compare the means of three or more groups to determine
significantly from one another. Another important function is to estimate the
differences between specific groups. The most common method to detect differences
among groups in one-way ANOVA IS F-test, which is based on assumption that
the populations for all samples share a common, but unknown, standard deviation.
We recognized, in practise , that samples often have different standard deviations.
PRECAUTIONS
It may not show proper results so what we have to observe should be decided
before hand.