IENG-385 Statistical Methods for Engineers SPSS (Statistical package for social science) LAB # 1 (An Introduction to SPSS)
The basics of managing data files Opening SPSS: Start → All Programs → SPSS Inc→ PASW Statistics 18 → PASW Statistics 18 Opening SPSS: Start → All Programs → SPSS Inc→ PASW Statistics 18 → PASW Statistics 18
Opening SPSS The default window will have the data editor The default window will have the data editor There are two sheets in the window: There are two sheets in the window: 1. Data view2. Variable view 1. Data view2. Variable view
SPSS windows The Four Windows : 1. Data editor 2. Output viewer 3. Syntax editor 4. Script window
Data Editor Data Editor: Data Editor: Spreadsheet-like system for defining, entering, editing, and displaying data. Extension of the saved file will be “sav.”
Output Viewer Output Viewer Output Viewer Displays output and errors. Extension of the saved file will be “spv.”
Data view window The Data View window The Data View window This sheet is visible when you first open the Data Editor and this sheet contains the data This sheet is visible when you first open the Data Editor and this sheet contains the data Click on the tab labeled Variable View Click on the tab labeled Variable View Click
Variable view window This sheet contains information about the data set that is stored with the dataset This sheet contains information about the data set that is stored with the dataset Name Name –The first character of the variable name must be alphabetic –Variable names must be unique, and have to be less than 64 characters. –Spaces are NOT allowed.
Variable view window: Type Type Type –Click on the ‘type’ box. The two basic types of variables that you will use are numeric and string. This column enables you to specify the type of variable.
Variable view window: With Width Width –Width allows you to determine the number of characters SPSS will allow to be entered for the variable
Variable view window: Decimals Decimals Decimals –Number of decimals –It has to be less than or equal to 16
Variable view window: Label Label Label –You can specify the details of the variable –You can write characters with spaces up to 256 characters
Variable view window: Values Values Values –This is used to suggest which numbers represent which categories when the variable represents a category
Defining the value labels Click the cell in the values column as shown below Click the cell in the values column as shown below For the value, and the label, you can put up to 60 characters. For the value, and the label, you can put up to 60 characters. After defining the values click add and then click OK. After defining the values click add and then click OK. Click
Example 1 How would you put the following information into SPSS? How would you put the following information into SPSS? Value = 1 represents Male and Value = 2 represents Female
Example 1: solution sample Click
Example 1: solution sample Click
Saving the data To save the data file you created simply click ‘file’ and click ‘save as.’ You can save the file in different forms by clicking “Save as type.” To save the data file you created simply click ‘file’ and click ‘save as.’ You can save the file in different forms by clicking “Save as type.”
Sorting the data Go Data Menu then select Sort Cases, Double Click ‘Name of the students.’ Then click ok. Go Data Menu then select Sort Cases, Double Click ‘Name of the students.’ Then click ok. Click
The basic analysis The basic analysis of SPSS that will be introduced in this class Frequencies Frequencies –This analysis produces frequency tables showing frequency counts and percentages of the values of individual variables. Descriptive Descriptive –This analysis shows the maximum, minimum, mean, and standard deviation of the variables Linear regression analysis Linear regression analysis –Linear Regression estimates the coefficients of the linear equation
The diameter of a ball bearing was measured by 50 inspectors. The results are shown in the below table. Draw histogram for diameter of the ball bearing by using SPSS. The diameter of a ball bearing was measured by 50 inspectors. The results are shown in the below table. Draw histogram for diameter of the ball bearing by using SPSS. Observation Diameter Observation Diameter Enter the sample data
Example Observation Diameter Observation Diameter
How to use draw a Histogram for this experiment? Go to ‘Analyze,’ ‘Descriptive statistics,’ then click ‘Frequencies’
How to use draw a Histogram for this experiment? Choose the name of the variable (diameter) that you create and put it in the variable box. Then click charts and then select Histogram and then click continue. Click
Result
TASK TASK 1 : Find Mean, Skewness, Variance for these data? TASK 1 : Find Mean, Skewness, Variance for these data? Consider that: Skewness and kurtosis are statistics that describe the shape and symmetry of the distribution. These statistics are displayed with their standard errors
Task 1: Answer Answer Answer –Go to analyze, Descriptive statistics and click ‘Descriptive’ then choose the name of the variable (diameter) that you create and put it in the variable box then click options. In the new opened window tick the mean, variance and skewness then click continue.
Click
Result of Task
Opening the sample data Open ‘Employee data.sav’ from the SPSS – –Go to “File,” “Open,” and Click Data
Opening the sample data Go to Program Files in C,” “SPSSInc,” “SPSS16’’, ‘’English’’and “Samples” folder. Open “Employee Data.sav” file
Frequencies Click ‘Analyze,’ ‘Descriptive statistics,’ then click ‘Frequencies’
Frequencies Click gender and put it into the variable box. Click ‘Charts.’ Then click ‘Bar charts’ and click ‘Continue.’ Click
Frequencies Finally Click OK in the Frequencies box. Click
Regression Analysis Click ‘Analyze,’ ‘Regression,’ then click ‘Linear’ from the main menu.
Regression Analysis For example let’s analyze the model Put ‘Beginning Salary’ as Dependent and ‘Educational Level’ as Independent. Click
Regression Analysis Clicking OK gives the result
Plotting the regression Click ‘Graphs,’ ‘Legacy Dialogs,’ and ‘Scatter/Dot’ from the main menu.
Plotting the regression Drag ‘Current Salary’ into the vertical axis box and ‘Beginning Salary’ in the horizontal axis box. Click
If you select ‘’Curve Estimation’’ instead of linear regression then you will have fitting line Plotting the regression line
Practice Find out whether or not the previous experience of workers has any affect on their beginning salary? Find out whether or not the previous experience of workers has any affect on their beginning salary? –Take the variable “salbegin,” and “prevexp” as dependent and independent variables respectively. Plot the regression line for the above analysis using the “scatter plot” menu. Plot the regression line for the above analysis using the “scatter plot” menu.
Answer Click
Thanks for your attention For further Questions: