SPSS LAB FILE www.mcdtu.wordpress.com 1
www.mcdtu.wordpress.com 2
www.mcdtu.wordpress.com 3
OBJECTIVE 1: Transporation of Data Set to SPSS Editor INPUTS: Files: group1.xlsx, group1.txt PROCEDURE FOLLOWED: 1. Through excel COMMANDS: 1. File 2. Open 3. Data OUTPUT: File: group1.sav www.mcdtu.wordpress.com 4
2. Through Text file COMMANDS: 1. File 2. Read text data OUTPUT: www.mcdtu.wordpress.com 5
CONCLUSION: Any document file in excel,text etc. formats can be transported to SPSS editor window. PRECAUTIONS: 1. There should be proper spacing between different variables in text file. 2. Extensions of the files should be strictly taken care of. www.mcdtu.wordpress.com 6
OBJECTIVE 2: Splitting and Merging of files 1. Merging of files: a. By cases b. By variables INPUTS: Files: 1.sav,2.sav,3.sav PROCEDURE FOLLOWED: a. By cases Merging of 1.sav & 2.sav : File: 1.sav File: 2.sav www.mcdtu.wordpress.com 7
COMMANDS: 1. Data 2. Merge Files 3. Add cases MERGED FILE: www.mcdtu.wordpress.com 8
b. By variables Merging of 1.sav & 3.sav : File: 3.sav www.mcdtu.wordpress.com 9
COMMANDS: 1. Data 2. Merge Files 3. Add variables MERGED FILE: www.mcdtu.wordpress.com 10
2. 1-way merging: Both files provide cases Merging of 1.sav & 4.sav File: 4.sav COMMANDS: 1. Data www.mcdtu.wordpress.com 11
2. Merge Files 3. Add variables OUTPUT: MERGED FILE: 3. 2-way merging: Non-active dataset is keyed table Merging of 1.sav & 4.sav COMMANDS: www.mcdtu.wordpress.com 12
1. Data 2. Merge Files 3. Add variables MERGED FILE: Active dataset is keyed table COMMANDS: 1. Data www.mcdtu.wordpress.com 13
2. Merge Files 3. Add variables MERGED FILE: www.mcdtu.wordpress.com 14
4. Split file according to a variable and filtering. INPUTS: Files: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Data 2. Split File OUTPUT: www.mcdtu.wordpress.com 15
COMMANDS: 1. Data 2. Select Cases (where 12 th class marks> 90) OUTPUT: www.mcdtu.wordpress.com 16
CONCLUSION: 1. Different styles of merging can be applied easily to files according to our requirements. 2. Small extracts of very large document files can be viewed easily through splitting and filtering of data on given specific cases. PRECAUTIONS: 1. The format of the files/variables to be merged should be same. 2. The conditional statements on the basis of which the file is to be splited should be given carefully. www.mcdtu.wordpress.com 17
OBJECTIVE 3: Missing Values INPUTS: File: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Transform 2. Record into Same Variables OUTPUT: www.mcdtu.wordpress.com 18
CONCLUSION: Missing Values of the variable MCEPreferenceBefore are replaced with 0. PRECAUTIONS: 1. Missing values should be very carefully taken care of during calculations or graphical plotting. 2. Strings expressions cannot be given in place of missing values. www.mcdtu.wordpress.com 19
OBJECTIVE 4: Pictographical reperesentation of data. INPUTS: File: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Graphs 2. Chart builder Line graph OUTPUT: Pie chart OUTPUT: www.mcdtu.wordpress.com 20
Histogram graph OUTPUT: CONCLUSION: We conclude that for any given data various types of graphs can be represented easily. PRECAUTIONS: 1. Variables should be choosen carefully during plotting graphs. 2. Graph labels should be chosen appropriately. www.mcdtu.wordpress.com 21
OBJECTIVE 5: To compute variables. INPUTS: File: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Transform 2. Compute Variable www.mcdtu.wordpress.com 22
OUTPUT: Calculating the sum of AQ1, AQ2 & AQ3: www.mcdtu.wordpress.com 23
OUTPUT: CONCLUSION: Very tedious calculations can be done very easily. PRECAUTIONS: 1. Variable names should be taken carefully. 2. We should take care that variable do not overlap. www.mcdtu.wordpress.com 24
OBJECTIVE 6: Distribution curves INPUTS: File: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Graphs 2. Legacy dialogs 3. Histogram Row wise: Finding frequency by gender to weight OUTPUT: www.mcdtu.wordpress.com 25
Column wise: Finding frequency of gender to 12th class marks OUTPUT: www.mcdtu.wordpress.com 26
Both row wise and column wise: finding frequency of gender with aieee marks at row and 12th class marks at column OUTPUT: CONCLUSION: Concising the data in terms of frequency makes its analysis easier through curves. PRECAUTIONS: 1. Choice of dependent and independent variables should be made aptly. 2. Data variables for frequency curves should be decided before hand for proper results. www.mcdtu.wordpress.com 27
OBJECTIVE 7: Descriptive statistics. INPUTS: File: group1.sav PROCEDURE FOLLOWED: COMMANDS: 1. Analyze 2. Descriptive Statistics 3. Frequencies OUTPUT: Frequencies Statistics Height Gender 2nd sem marks N Valid 26 26 26 Missing 0 0 0 Mean 1.65 72.23 Median 2.00 71.00 www.mcdtu.wordpress.com 28
Mode 2 71 Std. Deviation.485 14.572 Variance.235 212.345 Skewness -.687 -.640 Std. Error of Skewness.456.456 Kurtosis -1.662.971 Std. Error of Kurtosis.887.887 Range 1 65 Minimum 1 33 Maximum 2 98 Sum 43 1878 Frequency Tables Height Frequency Percent Valid Percent Cumulative Percent 5'1" 5 19.2 19.2 19.2 5'2" 4 15.4 15.4 34.6 5'4" 1 3.8 3.8 38.5 5'5" 1 3.8 3.8 42.3 5'6" 5 19.2 19.2 61.5 Valid 5'7" 1 3.8 3.8 65.4 5'8" 2 7.7 7.7 73.1 5'9" 4 15.4 15.4 88.5 5'95" 1 3.8 3.8 92.3 6' 1 3.8 3.8 96.2 6'1" 1 3.8 3.8 100.0 www.mcdtu.wordpress.com 29
Total 26 100.0 100.0 Gender Frequency Percent Valid Percent Cumulative Percent 1 9 34.6 34.6 34.6 Valid 2 17 65.4 65.4 100.0 Total 26 100.0 100.0 Histogram www.mcdtu.wordpress.com 30
OUTPUT: CONCLUSION: 1. Frequency tables show us vivid statistical interpretation of data. 2. Frequency curves show us easy interpretation of skewness and kurtosis curves. PRECAUTIONS: 1. Curves of symmetry should be judged carefully. 2. Do note that quartile divides distribution into 4 equal parts. www.mcdtu.wordpress.com 31
OBJECTIVE 8: Correlation and Regression INPUTS: Files: group1.sav,group12.sav PROCEDURE FOLLOWED: Correlation : COMMANDS: 1. Analyze 2. Correlate 3. Bivariate OUTPUT: Correlations Descriptive Statistics Mean Std. Deviation N Weight 58.42 9.884 26 1st sem marks 69.31 17.031 26 Gender 1.65.485 26 www.mcdtu.wordpress.com 32
Correlations Weight 1st sem marks Gender Pearson Correlation 1 -.281.507 ** Sig. (2-tailed).165.008 Weight Sum of Squares and Crossproducts 2442.346-1181.385 60.808 Covariance 97.694-47.255 2.432 N 26 26 26 Pearson Correlation -.281 1.086 Sig. (2-tailed).165.676 1st sem marks Sum of Squares and Crossproducts -1181.385 7251.538 17.769 Covariance -47.255 290.062.711 N 26 26 26 Pearson Correlation.507 **.086 1 Sig. (2-tailed).008.676 Gender Sum of Squares and Crossproducts 60.808 17.769 5.885 Covariance 2.432.711.235 N 26 26 26 **. Correlation is significant at the 0.01 level (2-tailed). Non-parametric Correlations Correlations Weight 1st sem marks Gender Kendall's tau_b Weight Correlation Coefficient 1.000 -.330 *.414 * www.mcdtu.wordpress.com 33
Sig. (2-tailed)..021.015 N 26 26 26 Correlation Coefficient -.330 * 1.000.041 1st sem marks Sig. (2-tailed).021..808 N 26 26 26 Correlation Coefficient.414 *.041 1.000 Gender Sig. (2-tailed).015.808. N 26 26 26 Correlation Coefficient 1.000 -.409 *.487 * Weight Sig. (2-tailed)..038.012 N 26 26 26 Correlation Coefficient -.409 * 1.000.049 Spearman's rho 1st sem marks Sig. (2-tailed).038..814 N 26 26 26 Correlation Coefficient.487 *.049 1.000 Gender Sig. (2-tailed).012.814. N 26 26 26 *. Correlation is significant at the 0.05 level (2-tailed). Regression A. Linear COMMANDS: 1. Analyze 2. Regression 3. Linear www.mcdtu.wordpress.com 34
OUTPUT: Regression Descriptive Statistics a Mean Std. Deviation N Weight 63.69 12.703 29 AIEEE marks 67.38 18.263 29 1st sem marks 65.48 18.975 29 2nd sem marks 66.28 17.830 29 a. Selecting only cases for which Computer = 1 Correlations a Weight AIEEE marks 1st sem marks 2nd sem marks Weight 1.000 -.414 -.313 -.217 Pearson Correlation Sig. (1-tailed) N AIEEE marks -.414 1.000.734.552 1st sem marks -.313.734 1.000.773 2nd sem marks -.217.552.773 1.000 Weight..013.049.129 AIEEE marks.013..000.001 1st sem marks.049.000..000 2nd sem marks.129.001.000. Weight 29 29 29 29 AIEEE marks 29 29 29 29 1st sem marks 29 29 29 29 www.mcdtu.wordpress.com 35
a. Selecting only cases for which Computer = 1 2nd sem marks 29 29 29 29 Variables Entered/Removed a,b Model Variables Variables Method Entered Removed 2nd sem marks, 1 AIEEE marks, 1st. Enter sem marks c a. Dependent Variable: Weight b. Models are based only on cases for which Computer = 1 c. All requested variables entered. Model Summary Model R R Square Adjusted R Computer = 1 Square (Selected) Std. Error of the Estimate 1.415 a.172.073 12.231 a. Predictors: (Constant), 2nd sem marks, AIEEE marks, 1st sem marks ANOVA a,b Model Sum of Squares df Mean Square F Sig. Regression 778.474 3 259.491 1.735.186 c 1 Residual 3739.733 25 149.589 Total 4518.207 28 a. Dependent Variable: Weight b. Selecting only cases for which Computer = 1 c. Predictors: (Constant), 2nd sem marks, AIEEE marks, 1st sem marks Coefficients a,b Model Unstandardized Coefficients Standardized Coefficients B Std. Error Beta t Sig. (Constant) 82.631 9.999 8.264.000 1 AIEEE marks -.276.186 -.396-1.480.151 1st sem marks -.040.236 -.059 -.168.868 2nd sem marks.034.204.047.165.870 www.mcdtu.wordpress.com 36
a. Dependent Variable: Weight b. Selecting only cases for which Computer = 1 B. Curve fit: COMMANDS: 1. Analyze 2. Regression 3. Curve Estimation OUTPUT: Curve Fit Model Description Model Name MOD_1 Dependent Variable 1 Weight Equation 1 Linear Independent Variable 12th class marks Constant Included Variable Whose Values Label Observations in Plots Unspecified Case Processing Summary Total Cases 64 N www.mcdtu.wordpress.com 37
Excluded Cases a 0 Forecasted Cases 0 Newly Created Cases 0 a. Cases with a missing value in any variable are excluded from the analysis. Variable Processing Summary Variables Dependent Weight Independent 12th class marks Number of Positive Values 64 64 Number of Zeros 0 0 Number of Negative Values 0 0 User-Missing 0 0 Number of Missing Values System-Missing 0 0 Dependent Variable: Weight Model Summary and Parameter Estimates Equation Model Summary Parameter Estimates R Square F df1 df2 Sig. Constant b1 Linear.003.195 1 62.660 68.576 -.078 The independent variable is 12th class marks. www.mcdtu.wordpress.com 38
CONCLUSION: We conclude that weight has no effect on aieee marks or 12 th marks etc. as correlation coefficient is near about zero but in aieee marks have a great effect on 12 th marks as coefficient of correlation is more. Correlation coefficient formula: PRECAUTIONS: 1. Variables should be chosen properly. 2. It may not be the exact result so it should be properly decided before hand on what variables are to be correlated. www.mcdtu.wordpress.com 39
OBJECTIVE 9: Chi square test INPUTS: File: group1.sav PROCEDURE FOLLOWED: Independent: COMMANDS: 1. Analyze 2. Nonparametric test 3. Legacy dialogs 4. Chi square OUTPUT: Chi-Square Test Frequencies Gender Observed N Expected N Residual 1 9 7.8 1.2 2 17 18.2-1.2 Total 26 www.mcdtu.wordpress.com 40
Test Statistics Gender Chi-Square.264 a df 1 Asymp. Sig..608 a. 0 cells (0.0%) have expected frequencies less than 5. The minimum expected cell frequency is 7.8. Dependent: COMMANDS: 1. Analyze 2. Descriptive statistics 3. Cross tabs OUTPUT: Crosstabs Case Processing Summary www.mcdtu.wordpress.com 41
Cases Valid Missing Total N Percent N Percent N Percent Gender * Computer 22 84.6% 4 15.4% 26 100.0% Gender * Computer Crosstabulation Computer Total no yes Count 5 4 9 Expected Count 3.3 5.7 9.0 female % within Gender 55.6% 44.4% 100.0% % within Computer 62.5% 28.6% 40.9% Gender % of Total 22.7% 18.2% 40.9% Count 3 10 13 Expected Count 4.7 8.3 13.0 Male % within Gender 23.1% 76.9% 100.0% % within Computer 37.5% 71.4% 59.1% % of Total 13.6% 45.5% 59.1% Count 8 14 22 Expected Count 8.0 14.0 22.0 Total % within Gender 36.4% 63.6% 100.0% % within Computer 100.0% 100.0% 100.0% % of Total 36.4% 63.6% 100.0% Chi-Square Tests Value df Asymp. Sig. (2-sided) Exact Sig. (2-sided) Exact Sig. (1-sided) www.mcdtu.wordpress.com 42
Pearson Chi-Square 2.424 a 1.119 Continuity Correction b 1.224 1.269 Likelihood Ratio 2.431 1.119 Fisher's Exact Test.187.135 Linear-by-Linear Association 2.314 1.128 N of Valid Cases 22 a. 2 cells (50.0%) have expected count less than 5. The minimum expected count is 3.27. b. Computed only for a 2x2 table CONCLUSION: Chi square formula: Chi-square is a statistical test commonly used to compare observed data with data we would expect to obtain according to a specific hypothesis. PRECAUTIONS: 1. Variables should be chosen properly. 2. It may not show proper results so what we have to observe should be decided before hand. www.mcdtu.wordpress.com 43
OBJECTIVE 10: T test INPUTS: Files: group1.sav PROCEDURE FOLLOWED: A. One way: COMMANDS: 1. Analyze 2. Compare means 3. One sample t test OUTPUT: (i) T-Test(Test value = 50) One-Sample Statistics N Mean Std. Deviation Std. Error Mean Weight 26 58.42 9.884 1.938 One-Sample Test Test Value = 50 T df Sig. (2-tailed) Mean Difference 95% Confidence Interval of the Difference Lower Upper Weight 4.345 25.000 8.423 4.43 12.42 www.mcdtu.wordpress.com 44
(ii) T-Test (Test value = 70) One-Sample Statistics N Mean Std. Deviation Std. Error Mean Weight 26 58.42 9.884 1.938 One-Sample Test Test Value = 70 T df Sig. (2-tailed) Mean Difference 95% Confidence Interval of the Difference Lower Upper Weight -5.972 25.000-11.577-15.57-7.58 B. Paired: COMMANDS: 1. Analyze 2. Compare means 3. Paired-samples mean test OUTPUT: T-Test www.mcdtu.wordpress.com 45
Paired Samples Statistics Mean N Std. Deviation Std. Error Mean Pair 1 12th class marks 91.54 26 8.519 1.671 AIEEE marks 72.38 26 16.604 3.256 Paired Samples Correlations N Correlation Sig. Pair 1 12th class marks & AIEEE marks 26.360.071 Paired Samples Test Paired Differences t df Sig. (2-tailed) Mean Std. Deviation Std. Error Mean 95% Confidence Interval of the Difference Lower Upper 12th class marks - AIEEE Pair 1 marks 19.154 15.701 3.079 12.812 25.496 6.220 25.000 CONCLUSION: T test formula: We concluded that as we increase the test value, mean difference decreases. It means that more approximately we estimate better result we get. PRECAUTIONS: 1. Variables should be chosen properly. www.mcdtu.wordpress.com 46
2. It may not show proper results so what we have to observe should be decided before hand. www.mcdtu.wordpress.com 47
OBJECTIVE 11: ANOVA test INPUTS: File: group1.sav, group12.sav PROCEDURE FOLLOWED: A. One way: COMMANDS: 1. Analyze 2. Compare means 3. One way ANOVA OUTPUT: A. One way ANOVA Sum of Squares df Mean Square F Sig. Between Groups 709.120 1 709.120 2.603.120 1st sem marks Within Groups 6265.840 23 272.428 Total 6974.960 24 2nd sem marks Between Groups 290.281 1 290.281 1.407.248 Within Groups 4744.359 23 206.276 www.mcdtu.wordpress.com 48
Total 5034.640 24 B. Two way COMMANDS: 1. Analyze 2. General legal model 3. Univariate OUTPUT: Univariate Analysis of Variance Between-Subjects Factors N 24 1 35 1 43 1 53 1 55 1 1st sem marks 56 1 60 1 64 1 65 1 67 1 68 1 69 1 www.mcdtu.wordpress.com 49
74 2 75 1 78 2 80 1 82 1 83 2 84 1 85 1 86 1 87 1 94 1 33 1 47 1 54 1 56 1 62 1 65 1 66 2 68 1 70 1 2nd sem marks 71 4 74 2 76 1 79 1 82 1 84 1 85 1 86 2 88 1 95 1 98 1 Dependent Variable: 12th class marks Tests of Between-Subjects Effects Source Type III Sum of Squares df Mean Square F Sig. Intercept Hypothesis 200016.532 1... www.mcdtu.wordpress.com 50
@1stsemmarks @2ndsemmarks @1stsemmarks * @2ndsemmarks Error... a Hypothesis 110.000 6... Error... a Hypothesis 133.000 3... Error... a Hypothesis.000 0... Error... a a. Cannot compute the appropriate error term using Satterthwaite's method. Expected Mean Squares a,b Source Variance Component Var(@2ndsemm Var(@1stsemmar Var(Error) Quadratic Term arks) ks * @2ndsemmarks) Intercept 1.250 1.000 1.000 Intercept, @1stsemmarks @1stsemmarks.000 1.000 1.000 @1stsemmarks @2ndsemmarks 1.000 1.000 1.000 @1stsemmarks * @2ndsemmarks.000.000.000 Error.000.000 1.000 a. For each source, the expected mean square equals the sum of the coefficients in the cells times the variance components, plus a quadratic term involving effects in the Quadratic Term cell. b. Expected Mean Squares are based on the Type III Sums of Squares. CONCLUSION: Anova formula: www.mcdtu.wordpress.com 51
ANOVA is used to compare the means of three or more groups to determine whether they differ 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 the F-test, which is based on the assumption that the populations for all samples share a common, but unknown, standard deviation. We recognized, in practice, that samples often have different standard deviations. PRECAUTIONS: 1. Variables should be chosen properly. 2. It may not show proper results so what we have to observe should be decided before hand. www.mcdtu.wordpress.com 52