Download as pdf or txt
Download as pdf or txt
You are on page 1of 22

Dr. Md. Abdus Salam Akanda Website: http://du.ac.

bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Introduction to Statistics,
Brief Knowledge in SPSS&
Data Entry in SPSS

Introduction to Statistics
Definition of Statistics:
It is difficult to define statistics in a few words, since its dimension, scope, function, use and
importance are constantly changing over time. Facts and figures of phenomenon or events are
called statistics.

Statistics is concerned with scientific methods for collecting, organizing, summarizing,


presenting and analyzing sample data as well as drawing valid conclusions about population
characteristics and making reasonable decisions on the basis of such analysis.

Uses and importance of Statistics:


The scope and uses of statistics are so wide and universal that they cannot be enumerated
instantly in a few words. Statistics has now been recognized as a separate discipline of human
knowledge in its own right. The scope of statistics is ever increasing. A proliferation of books
and courses in the later years of the twentieth century has increased awareness of statistical
methods and aroused tremendous interest in the development of new statistical methods.
With the passage of time, the scope of statistics has embraced more and more new fields and
the expansion and development of statistical tools have made use of the science of statistics
as indispensable.

1
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

The role of statistics in any field of applications is an aid to solving problems or to be more
precise, to answering a variety of questions raised in solving problems. It has its wider
applications in accounting, marketing, finance and production processes. In modern times,
importance of statistics is felt in every walk of life and has indispensable connection with the
appropriate policy formulation and sound decision making. Policy makers and program
managers are fully dependent on statistical information for national planning. Statistical
methods have extensive applications in natural, biological, agricultural and other branches of
sciences. It is also widely used in solving problems of both chemical and preventive medicine
as well as in health. A few examples of applications of statistics may interest the readers:

 A prospective businessman is planning to initiate a business and trying to identify the


main factors that determine loss or profit in business. He guesses investment, experience
of sales personnel, floor space, income level of the consumers and the like as some of the
determining factors. A statistical investigation will help him to justify his guess

 A pharmaceutical company is designing an experiment to test hundreds of medications,


with an aim to find one that will be safe, effective and superior to the standard treatment
of a disease. Human beings vary in their responses and so do the animals on which
medications are initially applied. This variation introduces a statistical aspect to the
problem.

 The farmer’s profit depends largely on yields, costs and sale prices of his products. A
farmer will be interested to ascertain whether a given amount of fertilizer will result in
additional yield. This needs to be verified through field trial. It is part of the work of a
statistician who will design an experiment to establish a relationship between the crop-
yield and amount of fertilizer. This may be in the form of a curve or assume a
mathematical expression. The farmer uses this tool to decide on the amount of fertilizer to
use, together with the information on cost and anticipated sale price.

 In a nutrition survey, the weights of a group of under-five children in rural areas have
been compared with another group of children in urban areas of the same age group The
investigation revealed that the urban children weigh one and a half pound more than the
rural children on the average. Can this difference be considered as a true difference or it
has been due to chance? Only statistical testing can provide the answer to this query.

 In a manufacturing industry, 3 machines produce electric bulbs. The quality control


officer picks up a bulb from a day’s output and finds the bulb to be defective. He now

2
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

wants to ascertain which machine did produce this bulb. To arrive at a probabilistic
decision, the manager must use statistical knowledge.

 An insurance company offers to sell a one-year term insurance policy to a 40-year old
person, who has a probability 0.90 of surviving one year more. How large a premium
should the insurance company charge him for a Tk. 50,000 term life insurance? A
statistical approach is needed to solve this problem.

 A survey was conducted among the children of Bhola district to study the prevalence of
night-blindness. The investigation revealed that the children of well-to-do families are
more frequent to suffer from night-blindness than the children of poor families. What
caused this differential? A statistical analysis will lead to draw valid conclusion to arrive
at a decision.

Statistical inference vis-à-vis generalizations are needed in many instances. To mention a few
examples, we may think of
(i) assessing the value of all property in Dhaka City for the year 2020 on the basis of
business trends, population projection, and other factors;
(ii) comparing the effectiveness of two or more teaching methods on the basis of samples
of students thus taught;
(iii) determining the most effective dose of a new vaccine on the basis of experiments
conducted with volunteer patients from selected hospitals;
(iv) predicting the traffic jam over a bridge to be built in near future;
(v) predicting the number of teaching positions to be created in the university within
next 10 years on the basis of the current trend in the enrollment of the students and
future planning.

In each of the above examples, there always remain uncertainties. It is perhaps the job of the
statistician to suggest a most reasonable and promising course of action.

To summarize, the concept of number and measurement vis-à-vis quantitative information


pervades almost every sphere of human activities and statistics as a scientific method, has
been proved to be extremely useful and often indispensable in our everyday life.
Scope of Statistics: Statistics has been useful in researcher of almost all disciplines. A few
fields are: Planning, Population, health, family planning, Biology, Business and commerce,
Agriculture, Physical science, Socio-economic study, Environment, Medicine, Psychology

3
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

and education, Production industry, Astronomy etc.

Variable and its type:


A variable is a characteristic whose value varies from person to person, object to object or
from phenomenon to phenomenon. Example: Age, income, hair color, family size,
profession etc.

4
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Quantitative variable: A quantitative variable is one for which the resulting observations are
numeric and thus possesses a natural ordering. Example: Age, Height Family size etc.
Qualitative Variable: A qualitative variable is one for which numerical measurement is not
possible, such as, hair color, religion, profession etc.
Difference between quantitative and qualitative variables:

Qualitative variable Quantitative variable


(i) A qualitative variable is one for which (i) Quantitative variable can be expressed
numerical measurement is not possible. numerically.
(ii) Qualitative variable can only be counted. (iii) Quantitative variable can be counted
and measured.
(iv) These types of variable are always (ii) These types of variable may be discrete
discrete. or continuous.
(v) The average of qualitative variable can (iii) The average of quantitative variable can
be measured by median and mode. be measured by any measure of central
tendency.
(vi) Intelligence, beauty are the examples of (iv) Heights, weights, price of commodity
qualitative variable. are the examples of quantitative
variable.

Quantitative variables may be further classified as discrete or continuous.

Discrete variable: When a variable can assume only the isolated values within a given range,
the variable is called discrete variable such as family size, class size etc.

Continuous variable: When a variable can theoretically assume any value within a given
range the variable is said to be continuous variable. Thus age, height, temperature etc. are
continuous variables.

Difference between discrete and continuous variables:


Discrete variable Continuous variable
(i) When a variable can assume only (i) A variable is said to be continuous if it can
isolated values, it is called a discrete theoretically assume any value within a

5
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

variable. given range or ranges.


(ii) Discrete variable can only assume (ii) Continuous variable can assume both
integral values. integral and fractional values.
(iii) Discrete variables are countable. (iii) Continuous variables are measurable.
(iv) The number of children in a family (iv) Height of students of a class is an example of
is an example of discrete variable. continuous variable.

Population: An aggregate of all individuals or items of interest in any particular study


defined on some common characteristics is called a population.

Sample: A representative part of the population is called a sample. The number of


individuals in the sample is called sample size.

Difference between population and sample:

Population Sample
(1) An aggregate of all individuals or items (1) A small but representative part with
(actual or possible) defined on some finite number of individuals or items of a
common characteristics is called a population is called a sample.
population.
(2) It may be finite or infinite. (2) A sample is always finite.

6
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

(3) Capital letters are used to denote (3) Small letters are used to denote sample
population size usually by 𝑁. size usually by 𝑛.
(4) The statistical constants of population (4) The statistical measures obtained from
are usually referred to as parameters. the sample observations has been termed
as statistics
(5) Population size is always greater than (5) Sample size is always smaller than the
the sample size. population size.
(6) Census survey deals with the population. (6) Sample survey deals with the sample.
(7) Population is considered as a universal (7) Sample is a subset of the population.
set.

Parameter: Any characteristics or functions or numerical expressions of population values


about which inferences are to be made, is called parameter. Population mean  is a
parameter.

Statistic: Any characteristics or functions or numerical expressions of sample values which is


usually known is called statistic. The sample mean (x ) is a statistic.

7
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Difference between Parameter and Statistic:

Parameter Statistic
(1) Any function of the population values is (1) Any function of the sample observation
called parameter. is called statistic.
(2) Parameter is an unknown constant. (2) Statistic does not contain unknown
constant.
(3) Parameters are not used to estimate (3) Statistic are used to estimate population
population characteristics. characteristics (such as parameters)
(4) Parameters are free from sampling and (4) Statistics are subject to sampling and
other errors. non-sampling error.
(5) There is no distribution of parameter. (5) Statistic has distribution, which is called
sampling distribution.

(6) The population mean  , variance  2 etc (6) The sample mean x , variance s 2 etc
are called parameter. are called statistic.
Distinguishing Between a Parameter and a Statistic
Decide whether the numerical value describes a population parameter or a sample statistic.
Explain your reasoning.
1) A recent survey of 200 college career centers reported that the average starting salary
for petroleum engineering majors is $83,121.
2) The 2182 students who accepted admission offers to Northwestern University in 2009
have an average SAT score of 1442.
3) In a random check of a sample of retail stores, the Food and Drug Administration
found that 34% of the stores were not storing fish at the proper temperature.

Solution
1) Because the average of $83,121 is based on a subset of the population, it is a sample
statistic.
2) Because the SAT score of 1442 is based on all the students who accepted admission
offers in 2009, it is a population parameter.
3) Because the percent of 34% is based on a subset of the population, it is a sample
statistic.

8
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Data: Data is a plural word and comprehend the idea of collection of pieces of information
on some variables. Data are the foundation stones and basic raw, disorganized facts and
figures collected from any field of inquiry.

Data versus Information:


Subject Information
Data
matter
Meaning Data is raw, disorganized facts that need to When data is processed,
be processed. Data can be something organized, structured or
simple and seemingly random and useless presented in a given context so
until it is organized. as to make it useful, it is called
information.
Example Each student’s test score is one piece of The average score of a class or
data. of the entire school is
information that can be derived
from the given data.

9
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Model of
data and
information

Statistical data depending upon the sources are of two types


1) Primary data
2) Secondary data.
1) Primary data: The data which are originally collected by an investigator or an agent for
the first time for the purpose of statistical enquiry are known as primary data. The data is
thus original in character.

2) Secondary data: The data which are collected or obtained from some published or
unpublished sources are called secondary data. This type of data is not original in
character. For example: the reports and publications made by Central Bureau of
Statistics are primary for that organization but secondary for those who use it.

Difference between the primary and secondary data:

The main difference between primary and secondary data is only of degree one. Data which
are primary in the hands of one becomes secondary in the hands of other. That is primary data
once collected and published becomes secondary data for other investigators. For example:
the data relating the population of Bangladesh published by Bangladesh Bureau of Statistics
are primary for that organization but secondary for those who use it.

10
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

There are the following differences between primary and secondary data:

Basis Primary data Secondary data


Definition The data which are obtained by direct The data which are already obtained
observations from the population or by some other persons or
sample is called primary data. organizations and are already
published or utilized are called
secondary data
Originality It is original. Primary data are It is not original. Secondary data is
collected from the original sources. collected from some organizations,
journal s, newspapers etc.
Expenses It involves large expanses in terms of It is relatively a less costly method.
time, energy and money.
Suitability If the data has been collected in a It may or may not suit the objective of
systematic manner, its suitability will the survey.
be positive.
Reliable Primary data is more reliable than Secondary data is less reliable than
secondary data. primary data.
Dependency Primary data is completely Secondary data depend on the primary
independent. data.
Precautions No extra precautions need be taken in It should be used with care.
making use of primary data.
Qualified Any reliable primary data can be In case of primary data there is no
interviewers obtained only by the qualified need of the qualified interviewers.
interviewers.

The data collected on quantitative variables is called quantitative data and the data collected
on qualitative variables is called qualitative data.

Measurement: Measurement is a process of assigning numbers to some characteristics or


variables or events according to scientific rules. In research, measurement is concerned with
assigning value of the qualitative object. It is the process by which empirical data are
organized in some systematic relationship to the concept being studied. Measurement is at the

11
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

heart of any discipline. For example, we want to measure how much an employee is satisfied
with his job.

Scale: A scale may be defined as any series of items [that] are arranged progressively
according to value or magnitude, into which an item can be placed according to its
quantification. In other words, a scale is a continuous spectrum or series of categories. The
purpose of scaling is to represent, usually quantitatively, an item’s, a person’s, or an event’s
place in the spectrum.

Scale of Measurement:
Measurement is a process of assigning number to some characteristics or variables or events
according to scientific rules.
The variables in any study may be of different nature and they may represent some attributes,
characteristics or key factors of interest. These variables can be measured under four levels or
scales of measurement. The measurement scales are:
1. Nominal scale
2. Ordinal scale
3. Interval scale
4. Ratio scale
Comparative study of scales of measurement:

Scale of Mathematical operations Examples


measurement
Nominal Classification & Counting Gender, Religion
Ordinal Classification, Counting & Ranking Economic Status
Interval Classification, Counting, Ranking, Addition, Temperature, IQ
Subtraction & Zero is not absolutely zero score
Ratio Classification, Counting, Ranking, Addition, Age, Family size
Subtraction, Multiplication, Division & Zero is
absolutely zero

12
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Nominal Scale: The measurement scale, in which numbers are assigned to the categories or
variable values for identification only, is called a nominal scale. For example: gender,

13
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

smoking status etc.

Ordinal Scale: The measurement scale in which numbers are assigned to the categories or
variable values for identification as well as for ranking is called an ordinal scale. For
example: consider the variable economic status which can be categorized as rich (1), middle
class (2) and poor (3).

Interval Scale: The measurement scale in which numbers are assigned to the variable values
in such a way that the level of measurement is broken down on a scale of equal units and the
zero value on the scale is not absolutely zero, is called an interval scale. For example: the
variable temperature can have values o 0 c, 100 c, 200 c etc.

Ratio Scale: The measurement scale in which numbers are assigned to the variable values in
such a way that the level of measurement is broken down on a scale of equal units and the
zero value on the scale is absolutely zero, is called a ratio scale. For example: age, weight,
pulse rate, parity etc.
Classification of variable by scale of measurement:

Variables

Qualitative Quantitative
Economic status, Religion Age, family size

Nominal Ordinal Interval Ratio


ID, Religion Economic Status Temp., IQ Score Age, Income

14
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Brief knowledge in SPSS


Origin:
The statistical package SPSS was first devised in 1966. Actually SPSS was developed as an
analysis program for social scientists.
The abbreviation SPSS stood for “Statistical Package for Social Sciences”.
The SPSS Company gave the old abbreviation a new meaning (not very modest): Superior
Performing Software System. One of the strong points of SPSS is that it can perform almost
any statistical analysis.

Different versions of SPSS:


 SPSS – X is the SPSS version for minicomputers and mainframe computers.
 SPSS/PC+ is the SPSS version for DOS based computers
 SPSS for Windows

SPSS – X can use up to 315 variables in comparison to the 500 that SPSS/PC+ can use. SPSS
for Windows can use more than 500 variables.
SPSS for Windows has been derived from the mainframe version and not from SPSS/PC+
version.
The exchange of files between the different versions of SPSS (SPSS – X, SPSS/PC+, SPSS
for Windows) is handled by special SPSS files that are created and read with the IMPORT
and EXPORT commands. Communication with other well-known PC packages is also
possible.

15
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

We will stick to SPSS for windows. SPSS for windows is an advanced statistical package
designed to run interactively on PC and other computers in a graphical environment, using
descriptive menus and simple dialog boxes to do most of the work. Most tasks can be
accomplished simply by pointing and clicking the mouse.

What can SPSS do?


 data entry
 manipulate and manage data
 produce reports and tables
 perform simple and complex statistical analyses
 produce graphical output

SPSS for windows: Getting started


You can start SPSS either by Using Start menu or by using Shortcut icon.
1) Using Start menu: Click on Start menu at the bottom-left corner of your screen.
Point the cursor to Programs, point the cursor to SPSS Inc and then click on SPSS
Statistics 20.0.
2) Using Shortcut icon: Double click on Shortcut icon of SPSS Statistics 20.0 on the
desktop.
There are two icons for SPSS (if you open it from start button)
o SPSS Statistics 20.0 (This will be of our interest)
o SPSS Statistics 20.0 License Authorization Wizard.lnk
If we start SPSS Statistics 20.0, the following window will be open. If a dialog box appears,
click on Cancel or press the ESC key from key board. The dialog box will disappear. Now
existing window is SPSS Statistics Data Editor window.

Different types of important windows in SPSS


Data Editor: This is the first window that will appear when you start an SPSS session. You
will see the Menu bar, the Tool bar and other important contents of a data file.

16
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Viewer Window: The viewer window is where we see the statistics and graphics – the output
from the work in SPSS. The viewer window is also called Output Window which is split
into two parts or panes:
The Outline Pane (Left side of the viewer window)
The Display Pane (Right side of the viewer window)

Pivot table: Most of SPSS’s tabular and statistical output appears in the viewer in the form of
pivot tables. Double clicking a pivot table lets you edit it.
Chart editor: Double clicking a chart in the viewer will open the chart editor. Now we can

17
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

modify the chart and even the chart type.


Syntax Editor: A syntax window is a window into which we can paste and/or write SPSS
command. Then running the syntax on a data file we can get the desired output.
To create a new syntax file, follow the steps:
Click on File menu from the data window. Point the cursor to New and then click on Syntax.
(A Syntax Window will appear).
We can save the Syntax Window as well as Output Window at our desire location simply by
pressing Ctrl+S.

Various Types of Files in SPSS


SPSS reads, creates and writes different types of files. Conventions for naming, printing,
deleting or saving files and for submitting command files for processing differ from one
computer to another or from one operating system to another. The following are some
common files available in SPSS. Each file is used to store a particular type of information.
Type of File Extension Purpose
SPSS data file or SAV Stores data along with the descriptive information of
SPSS type file each variables and their values
SPSS syntax file or SPS Contains various commands and instructions to
Command file perform various task. Sometimes it contains inline
data.
Output file SPO Contains outputs/ results generated after executing
commands through menu or syntax.

Creating a Data File in SPSS


A data set is the organized or structured form of information obtained from experiments,
surveys or other sources. Before starting data analysis in SPSS, it is important to be clear
about how the variables are recorded for each case/individual.
Note that in the Data Editor window of SPSS each column will represent a variable and each
row will stand for a case/respondent/individual.

Naming a Variable:
 The name of a variable should be short in size (no specific limit). You may use an
alpha-numeric name (First character must be alphabet).

18
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

 You may use _ (underscore) or . (dot) between two words if the name is long, but
can’t use space or - (dash). For example, Residential Status variable as res_stat or
res.stat, but not res-stat or res stat.
 Give a label for the variable so that you can get a portrayal of the variable in the
output.
Now we’ll learn how to input data in SPSS. Let’s do create a data file in SPSS using the
information given below:
ID Name Sex Age Region Height Education Monthly
(inc.) income (Tk)
1 Ahmed Ali Male 45 Dhaka 67 Higher 32000
2 John Abraham Male 36 Chittagong 70 Secondary 14000
3 Meena Female 23 Barisal 62 Secondary 13000
4 Ronjon Sharma Male 42 Khulna 71 Illiterate 4000
5 Helal Male 57 Rajshahi 65 Primary 9000
6 Nancy Female 40 Dhaka 59 Higher 28000
7 Suzuka Female 34 Rangpur 64 Secondary 11000
8 Mintu Male 67 Rajshahi 57 Illiterate 7500
9 Romeo Male 38 Khulna 68 Primary 9500
10 Anisul Haque Male 41 Sylhet 69 Secondary 10000

Sex: Male = 1, Female = 2


Education: Illiterate = 0, Primary = 1, Secondary = 2, Higher = 3

Now explore GSS data File “gssnet.sav”


Using questionnaire to create a data file in SPSS data editor window
Questionnaire is an important tool for collecting data in many fields. Data from the
questionnaire are fed to the computer. While you input data in SPSS, you need to care about
many issues. Let us consider the following questionnaire and construct a data file in SPPS data
editor window. First write the variables name in the variable view.

Questionnaire
ID Number ……… Date of interview:
1. Name of the Respondent: … … …
2. Age: …

19
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

3. Sex:
Male …1
Female … 2
4. Residential Status:
Urban …1
Semi urban …2
Slum …3
Rural …4
5. Education:
Illiterate …0
Primary …1
S.S.C …2
H.S.C …3
Graduate and above …4
6. Occupation:
Day laborer …1
Farmer …2
Service …3
Business …4
House wife …5
Retired from service … 6
Others (please specify)…7
7. Family members: ……
8. Total family income per month: ………
9. Smoking Status:
Current smoker …1
Past smoker …2
Never smoked …0
10. Are you suffering from diabetes? (if No go to Q # 14)
Yes …1
No …0

Missing Value Code:


Not Applicable (NAP) : 7 97 997

20
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

Don’t Know (DK) : 8 98 998


Not Available (NA) : 9 99 999
11. How long your diabetes was first diagnosed?

12. Treatment of diabetes:


Diet …1
Tablet …2
Insulin …3
No treatment …0
13. Blood sugar level:
(a) Fasting
(b) 2 hrs after breakfast
14. Are you suffering from hypertension?
Yes …1
No …0
Don’t know …98
15. Blood pressure on admission:
(a) Systolic ……
(b) Diastolic ……

16. Habit of betel-nut chewing:


Current chewer …1
Past chewer …2
Never chewer …0

Enter the hypothetical data in the data editor window. Find inconsistencies if there any.
id date (dd.mm.yy) name age sex Res edu occu f_size income smok
1 02.02.08 Riaz 43 1 4 1 2 5 13000 2
2 10.02.08 Kamal 59 1 1 4 1 6 10000 1
3 05.02.08 Bely 42 2 1 1 3 4 5000 1
4 09.02.08 Nanto 39 1 3 2 4 7 9500 2
5 15.02.08 Monir 43 1 4 4 5 4 8000 2
6 21.02.08 Poresh 64 1 1 3 2 8 14000 0

21
Dr. Md. Abdus Salam Akanda Website: http://du.ac.bd
Professor of Statistics, DU E-mail: akanda@du.ac.bd

7 12.02.08 Zulekha 55 2 2 2 2 4 5000 1


8 21.02.08 Pomy 52 1 1 4 5 3 10000 0
9 19.02.08 Sumi 46 2 1 1 6 6 9000 1
10 27.02.08 Pintu 42 1 1 2 3 5 15500 2

Continuation of data file


diabt dd(yrs) tr_d bsf bsr Hyp sbp dbp hbnut
0 - - - - 1 60 130 2
98 - - - - 1 70 120 1
1 8 3 14 19 98 65 110 0
1 3 2 12 16 1 60 130 1
98 - - - - 1 50 140 2
0 - - - - 0 50 100 1
0 - - - - 1 60 120 0
98 - - - - 1 70 110 0
1 5 1 10 13 0 60 130 1
0 - - - - 1 80 120 2

SYNTAX TO CREATE A DATA FILE IN SPSS

DATA LIST / NAME 1-10 (A) AGE 15-19 SEX 20 (A) EDU 25-28 BSAL 30-40.
VARIABLE LABELS EDU 'EDUCATION' BSAL ‘BASIC SALARY’.
BEGIN DATA
SHAFIQUE 24 M 12 8000
MUKTA 30 F 16 10000
KALAM 35 M 10 5000
SHAHIN 32 M 14 7000
END DATA.

The output will look like the following format:


name age sex edu bsal
SHAFIQUE 24 M 12 8000
MUKTA 30 F 16 10000
KALAM 35 M 10 5000
SHAHIN 32 M 1 7000

22

You might also like