You are on page 1of 9

QUESTION NO.

2:

Create a data file for the six variables and fifteen sample students presented in
example 1-2.1.NAME your variables: ID, DAY, TIME, MORNING, GRADE AND
WORK. You should code DAY as 1= Monday /Wednesday /Friday, 2 = Tuesday
/Thursday. Code TIME as 1 =morning, 2 = afternoon. Code MORNING as 0 = No, 1
= yes .Code WORK as 0= no, 1 = part-time, 2 = full time. Be sure you enter value
labels for different variables. Note that because value labels are not appropriate
for ID and grade, these are not coded. When complete perform the following:

1. Save your data and retrieve your data (provide syntax)


2. Now add a new variable as training whether or not student got a training
code 0 as no and 1 as yes
3. Make a frequency distribution for a suitable variable. (interpret your result)
4. Find a descriptive statistics for suitable variable. ( interpret your result)
5. Make a cross tabulation for suitable variable. ( Interpret result )
6. Assign grades A, B, C And D to grades variable using recode command.
7. Use select case command to select student who work.
ANSWER:
Save and Retrieve the Data:

Syntax:
DATA SET:

ADDING A NEW VARIABLE AS TRAINING


FREQUENCY DISTRIBUTION:

Syntax:
FREQUENCIES VARIABLES=DAY/ORDER=ANALYSIS
OUTPUT:

INTERPRETATION:
The frequency table indicate how many observation fall in the given
category the sample contained a total of 15 students and variable DAY
show that 9 students work at Monday, Wednesday, & Friday and 6
students work at Tuesday, & Thursday .
DESCRIPTIVE STATISTIC:
Syntax:
DESCRIPTIVES VARIABLES=TRANNING
/STATISTIC =MEAN STDDEV MIN MAX.

INTERPRETATION:

The output for the Descriptive command is quite straightforward. It show


that we have one variable as TRANNING and that we have obtained N = 15 ,
MEAN = 0.5333 ,Minimum = 0.00 , Maximum = 1.00 and std. deviation =
0.51640
CROSS TABULATION:

Syntax:
/TABLES = DAY BY MORNING
/FORMAT = AVALUE TABLES
/CELLS = COUNT
/COUNT ROUND CELL.
OUTPUT:

INTERPRETATION:
The output consists of the contingency table. Each level of timing in given in
the column. And day of classes are given in the row. It show that 8 students
take classes at Monday, Wednesday, and Friday they are not a morning
students while other 1 are morning student. And 2 students take classes at
Tuesday, and Thursday they are not a morning students while other 4 are
morning students.
CASE COMMAND:

Syntax:
USE ALL.
COMPUTE filter_$=(Work(WORK)).
VARIABLE LABELS filter_$ 'MEAN(WORK) (FILTER)'.
VALUE LABELS filter_$ 0 'Not Selected' 1 'Selected'.
FORMATS filter_$ (f1.0).
FILTER BY filter_$.
EXECUTE.
OUTPUT:
ASSIGNING GRADES:

Syntax:

STRING Gradecat (A8) .


RECODE Grade (80 thru 90='A') (70 thru 79='B') (60 thru 69='C') (50 thru
59='D') INTO Gradecat.
VARIABLE LABELS gradecat ‘grades of studentd’ .
EXECUTE.

OUTPUT:

THE END

You might also like