introduction to spsszeus.cs.pacificu.edu/lanec/cs130f15/lectures/08spssintro.pdf · –basic...
TRANSCRIPT
![Page 1: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/1.jpg)
Introduction to SPSS
Fall 2015
Fall 2015 CS130 - Regression Analysis 1
![Page 2: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/2.jpg)
Intro to SPSS
• SPSS is a statistical analysis program that allows:
– Data management
– Graphs and tables
– Statistical analyses
– You will need: some basic statistics
• We will discuss these
• SPSS is more specialized than Excel
• Provide data in a more precise way
Fall 2015 CS130 - Intro to SPSS 2
![Page 3: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/3.jpg)
SPSS
• Goals for this section of the course include:
– Becoming familiar with Statistical Packages
– Creating new Datasets
– Importing & exporting Datasets
– Manipulating data in a Dataset
– Basic analysis of data (mainly descriptive statistics)
– An overview of SPSS's advanced features
– Examining the Help utility within SPSS
Note: This is not a statistics course such as Math 207. We will only concentrate on basic statistical concepts.
Fall 2015 CS130 - Intro to SPSS 3
![Page 4: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/4.jpg)
Open SPSS
• Unicode – represents characters from all* languages well
• Locale encoding – use information on you computer to determine which characters to support (in this Lab: English and European languages)
Fall 2015 CS130 - Intro to SPSS 4
![Page 5: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/5.jpg)
For compatibility reasons, use Locale.
Fall 2015 CS130 - Intro to SPSS 5
![Page 6: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/6.jpg)
Open SPSS
Fall 2015 CS130 - Intro to SPSS 6
Under “New Files” heading,Select “New Dataset” and click OK.
![Page 7: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/7.jpg)
Create a Simple Dataset
• SPSS looks somewhat like Excel BUT there are several important differences
• Select the Data View tab
Fall 2015 CS130 - Intro to SPSS 7
![Page 8: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/8.jpg)
Excel versus SPSS Differences
• Column data pertains to a particular variable
List several examples of what a variable might be
• Row data is considered a case, an observation, or an individual
List several examples of an observations
• A cell contains a value for a particular variable that is part of a part of a particular observation
Fall 2015 CS130 - Intro to SPSS 8
![Page 9: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/9.jpg)
SPSS Views
• Data View – displays the actual values of the data set
• Variable View – contains the descriptions of each variable’s attributes in the data file
List at least three attributes of a variable from the Variable View
Fall 2015 CS130 - Intro to SPSS 9
![Page 10: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/10.jpg)
Dataset Questions
• Using the SPSS Tutorial, SPSS Help, or Web define each of the following terms and give a real life example of each. SPSS contains the following data types (under Measure in variable view):
– Categorical/Qualitative Variables
• Nominal
• Ordinal
– Quantitative Variables
• Scale
Fall 2015 CS130 - Intro to SPSS 10
![Page 11: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/11.jpg)
Qualitative vs. Quantitative
• Qualitative: classify individuals into categories
• Quantitative: tell how much or how many of something there is
• Which are qualitative and which are quantitative?
– Person’s Age
– Person’s Gender
– Mileage (in miles per gallon) of a car
– Color of a car
Fall 2015 CS130 - Intro to SPSS 11
![Page 12: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/12.jpg)
Qualitative: Ordinal vs. Nominal
• Ordinal variables:
– One whose categories have a natural ordering
– Example: grades
• Nominal variables:
– One whose categories have no natural ordering
– Example: state of residence
Fall 2015 CS130 - Intro to SPSS 12
![Page 13: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/13.jpg)
Quantitative
• Discrete variables: Variables whose possible values can be listed
– Example: number of children
• Continuous variables: Variables that can take any value in an interval
– Example: height of a person
Fall 2015 CS130 - Intro to SPSS 13
Both have the measure: scale
![Page 14: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/14.jpg)
Dataset Questions
• Using the SPSS, SPSS Tutorial, and SPSS Help:
– What are the types available in the Variable View?
Fall 2015 CS130 - Intro to SPSS 14
![Page 15: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/15.jpg)
Dog Dataset Example
Fall 2015 CS130 - Intro to SPSS 15
Breed Age Weight
Collie 2 23.2
Collie 3 35.7
Setter 5 45.4
Shepard 1 65.9
Setter 2 72.2
![Page 16: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/16.jpg)
SPSS
• We can build the Dog data sheet together
– Variable View
– Enter Data (see next slide)
Fall 2015 CS130 - Intro to SPSS 16
Name Type Measure
Breed
Age
Weight
![Page 17: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/17.jpg)
SPSS
• Save the data that you just created
• What is the file extension?
• How do you open the file again?
• Notice the output window. What is its purpose?
Fall 2015 CS130 - Intro to SPSS 17
![Page 18: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/18.jpg)
Candy Dataset Example
Fall 2015 CS130 - Intro to SPSS 18
Brand Name ServingPerPkg OzPerPkg Calories TotalFatInGrams SatFatInGrams
M&M/Mars
Snickers
Peanut
Butter
1.0 2.00 310 20.0 7.0
HersheyCookies
'n Mint1.0 1.55 230 12.0 6.0
Hershey
Cadbury
Dairy
Milk
3.5 5.00 220 12.0 8.0
M&M/Mars Snickers 3.0 3.70 170 8.0 3.0
CharmsSugar
Daddy1.0 1.70 200 2.5 2.5
![Page 19: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/19.jpg)
More Dataset Questions
• For the given dataset, what is the type and measure for the data for each of the variables? Why?
– Brand
– Name
– ServingPerPkg
– OzPerPkg
– Calories
– TotalFatInGrams
– SatFatInGrams
Fall 2015 CS130 - Intro to SPSS 19
![Page 20: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/20.jpg)
Problem 8.1
Create the dataset Candy8.1 in SPSS from the Candy data given to you on the previous slide
• Create the variables using the Variable View. Make sure that each variable has the correct Type and Measure.
• Set the decimals column as follows: Brand: 0, Name: 0, ServingPerPkg: 1, OzPerPkg: 2, Calories: 0, TotalFatInGrams: 1, and SatFatInGrams: 1.
Fall 2015 CS130 - Intro to SPSS 20
Setup the Variableinformation
Input the data by hand
![Page 21: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/21.jpg)
Problem 8.1 (continued)
• In the Values column, create the Value Labels for Brand where: value is 1 and Label is "M&M/Mars“. Add labels for 2 = "Hershey", and 3 = "Charms".
• Change to Data View and enter the candy data.
– When you enter the Brand, select View Value Labels from the View menu or toolbar to select M&M, Hershey, or Charms
– You will need to go back to Variable View and edit some of the settings. Do so as necessary.
Fall 2015 CS130 - Intro to SPSS 21
![Page 22: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/22.jpg)
Types of Data Analysis
• When doing data analysis, we are interested in two types of summaries:
– Statistical Summaries (e.g. descriptive, hypothesis testing)
– Visual Summaries (e.g. tables, graphs)
Fall 2015 CS130 - Intro to SPSS 22
![Page 23: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/23.jpg)
Areas of Statistics
• Descriptive Statistics
– describe and summarize data
• Inferential Statistics
– Infer from samples
– e.g. smokers smoking a pack of cigarettes per day have higher cholesterol
– Hypothesis testing
Fall 2015 CS130 - Intro to SPSS 23
![Page 24: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/24.jpg)
Descriptive Statistics
• We are concerned, among other things, the following:
– Mean:
– Median:
– Mode:
Fall 2015 CS130 - Intro to SPSS 24
![Page 25: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/25.jpg)
Mean vs. Median
• Mean is influenced by extreme values unlike the median
• Example: Five families live in an apartment building. Their incomes in dollars are: 25,000, 31,000, 34,000, 44,000, and 56,000. The first family won the $1,000,000 in the lottery. What are the mean and the median?
Fall 2015 CS130 - Intro to SPSS 25
![Page 26: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/26.jpg)
Problem 8.1 Continued
• We want to determine each of the following for Total Fat giving our answer to 1 decimal place:
– Minimum:
– Maximum:
– Mean:
– Standard Deviation:
Fall 2015 CS130 - Intro to SPSS 26
![Page 27: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/27.jpg)
Problem 8.1 Continued
• Select Analyze | Descriptive Statistics | Descriptives
• Move variable TotalFatInGrams to the right hand column
• Click Options button to select the descriptive statistics that will be calculated and displayed, then click OK
Fall 2015 CS130 - Intro to SPSS 27
![Page 28: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/28.jpg)
Problem 8.1 Continued
What if we wanted to determine the mode?
• Select Analyze | Descriptive Statistics | Frequencies
• Move variable TotalFatInGrams to the right hand column
• Click Statistics button to select the descriptive statistics that will be calculated and displayed.
Fall 2015 CS130 - Intro to SPSS 28
![Page 29: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/29.jpg)
Problem 8.1 Continued
More detailed descriptive statistics are available via the Explore option
• Select Analyze | Descriptive Statistics | Explore
• Move TotalFatInGrams to the Dependent List, click on Statistics radio button, then OK.
Fall 2015 CS130 - Intro to SPSS 29
![Page 30: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/30.jpg)
Problem 8.2
A paint manufacturer tested two experimental brands of paint over a period of months to determine how long they would last without fading. Here are the results:
Brand A Brand B Report on the following
10 25 -Mean
20 35 -Median
60 40 -Mode
40 45 -Std Deviation
50 35 -Minimum
30 30 -Maximum
Fall 2015 CS130 - Intro to SPSS 30
What are the variables?What are the observations?
![Page 31: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/31.jpg)
Solution - Method 1
One way has two variable columns where the first is BrandA and the second is BrandB. Enter the above data and find the asked for information. Save this file as BrandMethod1.sav.
What are the type and measure values for:
BrandA _________________ and BrandB _________________
Fall 2015 CS130 - Intro to SPSS 31
![Page 32: Introduction to SPSSzeus.cs.pacificu.edu/lanec/cs130f15/Lectures/08SPSSIntro.pdf · –Basic analysis of data (mainly descriptive statistics) –An overview of SPSS's advanced features](https://reader034.vdocuments.us/reader034/viewer/2022050414/5f8aa94568a8af0a02291cee/html5/thumbnails/32.jpg)
Solution – Method 2
The second way has two columns where the first column is a variable called Brand and the second column is called Fading. Create value labels where 1="BrandA" and 2="BrandB". Enter the information and find the asked for information. Save this file as BrandMethod2.sav.
What are the type and measure values for Brand _________________ and Fading _________________
What do the descriptive statistics tell us about the paint with regard to fading?
Fall 2015 CS130 - Intro to SPSS 32