Sas Record
Sas Record
To write the SPSS program using variable types and graphical data
exploration.
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File> New > Data.
STEP 2: The main screen will display Data view & Variable view in that choose
Variable view.
STEP 3:Create variable like student name, regno. and subject marks depend
upon the variables, choose the variable type like numeric,string etc.,
STEP 4: Click on Data view then Enter the data values.
STEP 5: Click the transform menu and select the Compute Variable option.
STEP 6:.Enter the target variable value as total and add the marks in Numeric
expression then click ok and the total is displayed on data view.
STEP 7: Follow the step-5 and step-6 to calculate the average .
STEP 8: Click on Graphs menu and select Chart Builder option.
STEP 9: Drag and place the bar graph and drag the data variable x-axis
as student name and y-axis as total .
STEP 10: Click the OK button to view the output.
1
INPUT:
Creating variable :
Calculating total :
2
Calculating average :
OUTPUT :
3
GRAPH:
RESULT:
Thus the program has been executed successfully and the output is verified.
4
EXP.NO.2 Descriptive Statistics and Frequencies, Scatter
25/07 /2022 plots and Correlation
AIM:
To write the SPSS program using data with descriptive statistics
and frequencies, scatter plots and correlation.
PROCEDURE:
STEP 1: Create dataset on a Excel file for Id,Gender,Height,weight and Save it.
STEP 2: Open SPSS software tool and Go to File > Import data > Excel >open
saved file.
STEP 3: Now the excel file will display on the data view.
STEP 4: Click on Analyze > Descriptive Statistics > Descriptives > Select the
Variables (Gender,Height,Weight) .
STEP 5: Click OK button to view the Output for Descriptive Statistics .
STEP 6: Click on Analyze > Descriptive Statistics >Frequencies> Select the
Variables (Gender,Height,Weight) .
STEP 7: Click OK button to view the Output for Frequencies.
STEP 8: Click on Graphs >Chart Builder>choose Scatter/Dot >Drag the
Scatter plot>Drag the data variable x-axis as Height and Y-axis as
Weight .
STEP 9: Click OK button to view the Output for Scatter Plots.
STEP 10: Click on Analyze >Correlate>Bivariate> Select the Variables
(Height,Weight)
STEP 11: Click OK button to view the Output for Correlation.
5
INPUT :
Creating Excel File :
OUTPUT :
6
7
Scatter Plot :
RESULT:
Thus the program has been executed successfully and the output is verified.
8
EXP.NO.3 Sampling and Probability
22/08/2022 Distributions
AIM :
To write a SPSS program for finding Sampling and Probability
distribution.
PROCEDURE :
1) Sampling:
STEP 1: Create dataset on a Excel file for Name, Mark1, Mark2, Mark3,
Mark4, Mark5 and Save it.
STEP 2: Open SPSS software tool and Go to File > Import data > Excel >
opensaved file.
STEP 3: Now the excel file will display on the data view.
STEP 4: Click on Analyze >Bayesian Statistics >One Sample Normal>Drag
theVariables (Mark1,Mark2,Mark3,Mark4,Mark5) to Test Variable .
STEP 5: Choose Estimate Bayes Factor option .
STEP 6: Click OK button to view the Output for Bayesian Statistics .
2) Probability Distribution:
Formula:
pdf –> X¬ B (n=6, p=0.2), X¬(λ=2)
probability when X=0,1,2,3….6
9
STEP 1:Go to the variable view and give x value.
STEP 2: Give from (1,2…6) in Data View.
STEP 3: Go to Transform menu > Compute Variable .
STEP 4: Enter the target variable value as pdf.binom
STEP 5: Go to function group >PDF and non-central PDF option >
Function and Special Variable . click pdf. binom.
STEP 6: Now, a numeric expression will appear like pdf.Binom(?,?,?) .
Give (x,n,p) value as (x,6,0.2).
STEP 7: Click Ok button to view the output for pdf.binom .
STEP 8: Go to function group >PDF and non-central PDF option.
Function and Special Variable, click pdf. poisson.
STEP 9: Now a numeric expression will appear like pdf Poisson(? ,?).
Give (x,mean) value as (x,2).
STEP 10: Click Ok button to view the output for pdf.poisson.
INPUT:
1) Sampling :
10
2) Probability Distribution:
11
OUTPUT:
1) Sampling :
2) Probability Distribution:
RESULT:
Thus the program has been executed successfully and the output is verified.
12
EXP.NO.4 Worksheet: Probability Work
29/08/2022 Session
AIM:
STEP 10: Click on transform select compute variables > give target variable as
13
PDF (Probability Distribution Function) on function group
select PDF and non -Central PDF and on function and special variable
select PDF.NORMAL.
STEP 11: PDF(quant, mean, stdev ) fill it up with (average, mean, stdev) click
ok.
STEP 12: View the output on data view.
INPUT:
Mean:
Pdf:
14
OUTPUT:
RESULT:
Thus the program has been executed successfully and the output is verified
15
12/09/2022 meanand the Central Limit Theorem
AIM:
To write a SPSS program for finding sampling distribution mean .
PROCEDURE :
µ=
∑ of n =
1+2+5
=2.67s
total no of n 3
STEP 4: Go to Variable View and create variable as ID .Click on data view and
enter IDvalues as (1,2,…,5).
STEP 5: Go to Transform menu > Computer Variable.
STEP 6: Give target variable as x1 and go to function group and click random
number option under that select RV.normal option in function and
special variable
STEP 7: The Numeric expression will appear [RV.NORMAL(?,?)] .
Enter mean value as (2.67) and standard deviation as (5.45) .
STEP 8: Continue the same process till (X1 X2 ...X5) in variable view.
STEP 9: Go to Transform menu > Computer Variable .
STEP 10: Give target variable as Xbar1, go to function group, select statistical
option under that click mean option in function and special variable
16
STEP 11: Numeric expression will appear [mean (?,?)] in that give X1
value
STEP 12: Continue the same process for other n values (2,5) for finding xbar2
enter mean value (x1,x2), for finding xbar5 enter mean value
(x1,x2,x3,x4,x5).
STEP 13: Compare the sampling distribution, go to analyze menu, select
descriptive statistics and click frequencies
STEP 14: Move the XBar1, XBar2, XBar5 to other side of a variables
STEP 15: Under that click the display frequency table option to off
STEP 16: At that side go to charts and click histogram option
STEP 17: Now click ok to view the output.
PROCEDURE:
B) Central Limit Theorem:
STEP 1: For central limit theorem use 3 distribution (Normal, binomial,
uniform) to calculate.
STEP 2: Go to variable view and create ID variable.
STEP 3: Transform menu > compute variable.
STEP 4: Give target variable as uniform and in function group click
Random number option.
STEP 5: Click RV.uniform(Random Variable) option In function and
special variable.
STEP 6: A numeric expression will appear [RV.uniform(??)] in that give min as
2 and max value as 5 randomly.
STEP 7: Click ok to view a uniform distribution output .
17
STEP 8: Continue the same process for other distribution (exponential mean as
2.67 and stdev value as 5.45,Binomial).
STEP 9: Go to graph and select histogram option , Now move the (Normal,
uniform, exponential) variable to other side.
STEP 10: Click ok button to view the output.
INPUT:
18
19
B) Central Limit Theorem:
OUTPUT:
20
21
22
B) Central Limit Theorem:
RESULT:
Thus the program has been executed successfully and the output is verified.
23
EXP.NO.6 ILLUSTRATING CONFIDENCE INTERVALS
FOR THE POPULATION MEAN
19/ 09/2022
AIM:
STEP 1: Open SPSS software tool and Go to File> New > Data.
STEP 2: Go to variable view and create name, test1, test2.
STEP 3: Go to Analyse menu > Description Statistics > Explore
STEP4: Choose the variables and drag to other side.
STEP 5: Click Ok button to view the output.
STEP 6: Go to Analyse menu > Compare means and proportions >
one-sample test option.
STEP 7: Select the variable and drag to other side.
STEP 8: And go to options, change the confidence interval value percentage into
98.
STEP 9: Click continue to view the output.
INPUT:
24
Explore :
One-sample test :
OUTPUT :
25
26
27
RESULT:
Thus the program has been executed successfully and the output is verified.
28
EXP.NO.7 Inference for Population Mean
26 / 09 /2022
AIM:
To write the SPSS program using Inference for Population Mean
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File > New > Data.
STEP 2: The main screen will display Data view & Variable view in that choose
Variable view.
STEP 3: Create variable like name, gender,salary,expense and depend
upon the variables, choose the variable type like numeric,string etc.,
STEP 4: Click on Data view then Enter the data values.
STEP 5: Click on Analyze > Compare Means and proportions > One Sample T
Test .
STEP 6: Drag and place (Salary)in Test Variable and Click on Ok to find the
Test Value.
STEP 7: In One Sample Test, take Upper(51139) as Test Value.
STEP 8: Click on Analyze > Compare Means and proportions > One Sample T
Test .
STEP 9: Enter the Test Value as 51139.
29
INPUT:
OUTPUT :
30
RESULT:
Thus the program has been executed successfully and the output is verified.
31
EXP.NO.8 Inference for Population Means II
26/ 09 /2022
AIM:
To write the SPSS program using Inference for Population
Means II
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File> New > Data.
STEP 2: The main screen will display Data view & Variable view in that choose
Variable view.
STEP 3: Create variable like name, gender,salary,expense and depend
upon the variables, choose the variable type like numeric,string etc.,
STEP 4: Click on Data view then Enter the data values.
STEP 5: Click on Graph > Bar > Clustered > Summaries for group of cases.
Click on Define.
STEP 6: Select Other Statistic, Drag and place (Salary)in Variable Option.
STEP 7: Drag and place (Gender) in Category Axis and (Name) in Define
Cluster by.
STEP 8 : Click on Options and Select Display error bars. In Confidence intervals
INPUT :
32
OUTPUT :
RESULT:
Thus the program has been executed successfully and the output is verified
EXP.NO.9 Work Session for Inference on
33
26/09/2022 Proportions and Means
AIM:
To write the SPSS program using Work Session for Inference
on Proportions and Means.
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File > New > Data.
STEP 2: The main screen will display Data view & Variable view in that choose
Variable view.
STEP 3: Create variable like name, gender,salary,expense and depend
upon the variables, choose the variable type like numeric,string etc.,
STEP 4: Click on Data view then Enter the data values.
STEP 5: Click on Analyze > Compare Means and proportions > One Sample
Proportions.
STEP 6: Drag and place (Salary)in Test Variable and Enter the Value as 26000.
STEP 7: Click the OK button to view the output.
INPUT:
34
OUTPUT :
RESULT:
Thus the program has been executed successfully and the output is verified.
35
EXP.NO.10 Frequency Tables and By Group
10/10/2022
Analysis
AIM:
To write SPSS program for finding Frequency Tables and By Group
Analysismean.
PROCEDURE :
STEP 1: Open SPSS software tool and Go to File > New > Data
STEP 2: Create a variables such as name, age, gender and ID and assign values.
STEP 3:Go to Transform menu > Visual Binning > Drag the Age to variables to
bin space.
STEP 4 :Give age_cat in Binned variable, select Excluded(<) in upper endpoints
and click make cutpoints.
STEP 5: Give the nearest starting age that you entered before in first cutpoint
location and type any number in number of cutpoints and click width
below that.
STEP 6: Select make labels and click ok.
STEP 7 :Click value labels and you can see the output.
INPUT :
36
OUTPUT :
RESULT:
Thus the program has been executed successfully and the output is verified.
37
EXP.NO.11 SIMPLE AND MULTIPLE
10/ 10 /2022 LINEAR REGRESSION
AIM:
To write SPSS program for finding the & multiple Simple linear
regression using SPSS stool.
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File> New > Data.
STEP 2: Go to variable view and create Name,mark1,mark2,mark3, mark4 ,
mark5 , total.
STEP 3: Go to Data View and Enter the Data Values.
STEP 4: Go to Analyse Menu >Regression option > Linear .
STEP 5: Drag the variable (Name to Dependent) and (Total to Independent).
STEP 6: Click the plots.Move the variable (ZPRED to x-axis) &ZPESID to
y-axis).
STEP 7: Select Histogram and Normal probability plots .
STEP 8: Click OK button to view the Output for Regression .
INPUT:
38
OUTPUT :
39
40
41
RESULT:
Thus the program has been executed successfully and the output is verified.
42
EX.NO.12 One-Way Analysis of Variance
17/10/2022 (ANOVA)
AIM:
To write the SPSS program using One-Way Analysis of Variance
(ANOVA)
PROCEDURE:
STEP 1: Open SPSS software tool and Go to File> New > Data.
STEP 2: The main screen will display Data view & Variable view in that choose
Variable view.
STEP 3: Create variable like Course,Time and dependupon the variables, choose
the variable type like numeric,string etc.,
STEP 4: Click on Data view then Enter the data values.
STEP 5: Click on Analyze > Compare Means and proportions > One way Anova.
STEP 6: Drag and place (Time)in Dependent list and Drag and place (Course) in
Factor.
STEP 7: Click on PostHoc and Select Tukey.Click on Continue.
43
INPUT :
44
OUTPUT :
45
RESULT:
Thus the program has been executed successfully and the output is verified.
46