SPSS16 0
SPSS16 0
SPSS16 0
16.0
Thun Kosal
2011
Page
SPSS16.0........................................................................................................................................1
Data View ................................................................................................................................3
Variable View ..........................................................................................................................3
Design Variable........................................................................................................................7
Frequencies Analysis....................................................................................................................8
Histogram ..........................................................................................................................23
Crosstabs Analysis .....................................................................................................................25
Test of hypothesis .......................................................................................................................29
One Sample test for mean .......................................................................................................30
Independent Sample test .........................................................................................................32
Dependent Sample test ............................................................................................................34
Table: The Normal Distribution ...............................................................................................40
SPSS 16.0
Start
SPSS Inc
SPSS 16.0
SPSS 16.0
Cancel
SPSS 16.0
Variable View
1. Name:
Variable Name
2. Type:
Variable
SPSS 16.0
3. Width: Cell
Variable
4. Decimals:
SPSS 16.0
5. Label:
Text Variable Name
Data View
Missing
a. No missing values:
SPSS 16.0
b. Discrete missing values:
SPSS 16.0
Quantitative ()
a.
Qualitative ()
b.
Qualitative ()
c.
1. ?
Male
(Nominal)
Female
2. ?
Less than 30
(Ordinal)
30-40
3. ?
High School
BA
4. Salary ?
40-50
(Ordinal)
MA
Tiger Beer
Bayon Beer
PhD
(Scale)
5.
?
ABC Stout
Anchor Beer
More than 50
(Nominal)
Angkor Beer
Others
variable
Variable Nominal
Data View
SPSS 16.0
Population
*
*
...
*
*
*
*
*
*
*
Sample Population
Cars
? (
Origin Label: Country of origin)
Step 1: Cars
File
Open
Data
Cars
SPSS 16.0
C:\Program Files\SPSSInc\SPSS16\Samples\Cars.sav
SPSS 16.0
Step 2: Analysis
Analyze
10
Descriptive Statistics
Frequencies
SPSS 16.0
11
SPSS 16.0
Valid= (405 )
Missing=
(1
)
Percent=Frequency/Total
Valid Percent=Frequency/(TotalMissing)
Cumulative Percent= ( )
Output
American 62.50%
European 18.00%
Japanese 19.50%
American
12
62.50%
Interactive
Pie
Simple
SPSS 16.0
13
SPSS 16.0
3D-Effect
Pies Tab:
14
SPSS 16.0
OK
15
SPSS 16.0
chart
select
Properties Window (Ctrl+T)
16
pie chart
Right click
SPSS 16.0
European 73 18%
Janpanese 79 19.5%
Graphs
Legacy Dialogs
Interactive
Bar
17
SPSS 16.0
18
SPSS 16.0
19
SPSS 16.0
Population
*
*
*
*
*
*
*
*
*
*
Sample
SEmean=
SEmean Error
Population
Sample
University
Salary
Step1: File
Open
Data
University of Florida graduate salaries.sav
20
C: Program files\SPSSInc\SPSS16\Sample
SPSS 16.0
Step2: Analysis
Analyze
Descriptive Statistics
Descriptives
21
SPSS 16.0
Click Options
Continue OK
22
SPSS 16.0
Population
*
*
*
*
*
*
*
*
*
*
Sample
SEmean=
Output
$7200
$65500
$26000 Error
$210.09
Graphs
Legacy Dialogs
Histogram
23
SPSS 16.0
24
SPSS 16.0
Variables ( )
carpet.sav
Crosstabs Row
A*
B*
Glory
?
?
Bissell
?
?
Column Total
?
?
Step1: carpet (FileOpenData..carpet.sav)
Prepared by: Thun Kosal
C*
?
?
?
Row Total
100%
100%
100%
25
SPSS 16.0
Step2:
26
1 " A *"
1 " K 2 R "
SPSS 16.0
Missing
Step3: Analyze
Descriptive Statistics
Crosstabs
27
SPSS 16.0
Cells:
Continue
28
OK Crosstabs
SPSS 16.0
1.
Test of hypothesis
H 0 : (Null hypothesis)
H1 H A : (Alternative hypothesis)
Prepared by: Thun Kosal
29
SPSS 16.0
o
H 0 : , ,
H1 : , ,
H 0 H1
1: IT
22
H 0 : 22
VS
H1 : 22
2 tailed=
VS=Versus
2: -
$270
H 0 : $270
VS
H1 : $270
H 0 : $270
VS
H1 : $270
1 tailed less=
3: Disc Disc
2%
H 0 : P 2%
VS
H1 : P 2%
H 0 : P 2%(i.e. )
VS
H1 : P 2%
1 tailed greater=
2. One Sample test for mean:
t -Statistic
30
SPSS 16.0
x 0
t
s
n
Test of hypothesis
Decision
Accept H 0 : if z t z
H 0 : 0
H1 : 0
2 tailed, VS
( t z )
2
Reject H 0 : if t z or t z
2
( t z )
2
H 0 : 0
H1 : 0
1 tailed less, VS
Accept H 0 : if t z
Reject H 0 : if t z
H 0 : 0
H1 : 0
1 tailed greater, VS
Accept H 0 : if t z
Reject H 0 : if t z
z 1.96
5% 2
z 1.64
z 1.64
10% 2
z 1.28
z 5%
2
31
SPSS 16.0
P 0 t z
2
S-plus:
t.test(data,alternative=.,conf.level=1-)
two.sided
less
greater
10t
100
x 14t , s 4t
a.
b. 5% ?
a.
H 0 : 10t
VS
H1 : 10t
H 0 : 10t i.e.
VS
H1 : 10t
b. Decision of test:
x 0 14 10
10
s
4
100
n
5% z 1.64
t 10 z 1.64
Reject H 0
10t
95%
3. Independent Sample test
32
SPSS 16.0
population
Quantitative
t -Statistic
x1 x2
s12 s22
n1 n2
Test of hypothesis
Decision
Accept H 0 : if z t z
H 0 : 1 2
H1 : 1 2
2 tailed, VS
( t z )
2
Reject H 0 : if t z or t z
2
( t z )
2
H 0 : 1 2
H1 : 1 2
1 tailed less, VS
Accept H 0 : if t z
Reject H 0 : if t z
H 0 : 1 2
H1 : 1 2
1 tailed greater, VS
Accept H 0 : if t z
Reject H 0 : if t z
S-plus:
t.test(data1,data2,alternative= .,conf.level=1-)
two.sided
less
greater
Prepared by: Thun Kosal
33
SPSS 16.0
Sample
Sample 172
x1 $3.68, s1 $0.966
o
Sample 186
x2 $4.059, s2 $0.839
a.
b. 5% ?
a.
1
2
H 0 : 1 2
VS
H1 : 1 2
b. Decision of test:
x1 x2
2
1
2
2
s
s
n1 n2
3.68 4.059
0.966
172
0.839
3.98
186
5% z 1.64
t 3.98 z 1.64
Accept H 0
95%
population
Sample
Quantitative
t -Statistic
2
1
di D
s
n 1
n : Sample size
1
D di
, di xi yi xi before , yi after
n
D
s
n
34
SPSS 16.0
Test of hypothesis
Decision
Accept H 0 : if z t z
H 0 : d 0, d 1 2
H1 : d 0
2 tailed, VS
( t z )
2
Reject H 0 : if t z or t z
2
( t z )
2
H 0 : d 0
H1 : d 0
1 tailed less, VS
Accept H 0 : if t z
Reject H 0 : if t z
H 0 : d 0
H1 : d 0
1 tailed greater, VS
Accept H 0 : if t z
Reject H 0 : if t z
S-plus:
t.test(data1,data2,alternative=.,conf.level=1-)
two.sided
less
greater
12
60,50,45,35,80,85,75,65,55,90,95,55
65,90,50,55,80,90,85,80,85,90,95,75
5% ?
xi xi 60,50, 45,35,80,85,75,65,55,90,95,55
Prepared by: Thun Kosal
35
SPSS 16.0
yi yi 65,90,50,55,80,90,85,80,85,90,95,75
di xi yi 5, 40, 5, 15,0, 5, 10, 15, 30,0,0, 20
2
H 0 : d 0
VS
H1 : d 0
Decision:
D
s
n
1
D di
n
1
5 40 5 15 0 5 10 15 30 0 0 20
12
145
12.08
12
1
di D
n 1
2
2
2
2
2
2
1
145
145
145
145
145
145
145
40
15
3
0
10
30
20
12 1
12
12
12
12
12
12
12
2
2
2
2
2
2
2
1 85 335
35
145 25 215 95
2
3
3
11 12 12
12
12 12 12 12
1 1
2
2
2
2 385 3352 235 3145 252 2152 952
11 12
1
21675 112225 2450 63075 625 46225 9025
1584
1
255300 12.69
1584
12.08
t
3.29
12.69
12
5% z 1.64
t 3.29 z 1.64
Reject H 0
36
1
z
z
2
SPSS
Variable View:
SPSS 16.0
Design View:
37
SPSS 16.0
OK Output
38
SPSS 16.0
Click PivotTranspose Rows and Columns
Output
Mean= 12.08
12.08
1
di D 12.69
n 1
Std. Deviation= s
Error 3.66486
95% Confidence Interval of the Difference:
4 20
t= 3.297
df=11, (df= n 1 )
Sig. (2-tailed)=.007
797
Prepared by: Thun Kosal
39
SPSS 16.0
Standard of Normal Distribution
Z
0.0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1.0
1.1
1.2
1.3
1.4
1.5
1.6
1.7
1.8
1.9
2.0
2.1
2.2
2.3
2.4
2.5
2.6
2.7
2.8
2.9
3.0
3.1
3.2
3.3
3.4
3.5
3.6
3.7
3.8
3.9
40
0.04
0.0160
0.0557
0.0948
0.1331
0.1700
0.2054
0.2389
0.2704
0.2996
0.3264
0.3508
0.3729
0.3925
0.4099
0.4251
0.4382
0.4495
0.4591
0.4671
0.4738
0.4793
0.4838
0.4875
0.4904
0.4927
0.4945
0.4959
0.4969
0.4977
0.4984
0.4988
0.4992
0.4994
0.4996
0.4997
0.4998
0.4999
0.4999
0.4999
0.5000
P 0 Z z
0.05
0.0199
0.0596
0.0987
0.1368
0.1736
0.2088
0.2422
0.2734
0.3023
0.3289
0.3531
0.3749
0.3944
0.4115
0.4265
0.4394
0.4505
0.4599
0.4678
0.4744
0.4798
0.4842
0.4878
0.4906
0.4929
0.4946
0.4960
0.4970
0.4978
0.4984
0.4989
0.4992
0.4994
0.4996
0.4997
0.4998
0.4999
0.4999
0.4999
0.5000
0.06
0.0239
0.0636
0.1026
0.1406
0.1772
0.2123
0.2454
0.2764
0.3051
0.3315
0.3554
0.3770
0.3962
0.4131
0.4279
0.4406
0.4515
0.4608
0.4686
0.4750
0.4803
0.4846
0.4881
0.4909
0.4931
0.4948
0.4961
0.4971
0.4979
0.4985
0.4989
0.4992
0.4994
0.4996
0.4997
0.4998
0.4999
0.4999
0.4999
0.5000
1 12 z 2
e dz
2
0.07
0.0279
0.0675
0.1064
0.1443
0.1808
0.2157
0.2486
0.2794
0.3079
0.3340
0.3577
0.3790
0.3980
0.4147
0.4292
0.4418
0.4525
0.4616
0.4693
0.4756
0.4808
0.4850
0.4884
0.4911
0.4932
0.4949
0.4962
0.4972
0.4980
0.4985
0.4989
0.4992
0.4995
0.4996
0.4997
0.4998
0.4999
0.4999
0.5000
0.5000
0.08
0.0319
0.0714
0.1103
0.1480
0.1844
0.2190
0.2518
0.2823
0.3106
0.3365
0.3599
0.3810
0.3997
0.4162
0.4306
0.4430
0.4535
0.4625
0.4700
0.4762
0.4812
0.4854
0.4887
0.4913
0.4934
0.4951
0.4963
0.4973
0.4980
0.4986
0.4990
0.4993
0.4995
0.4996
0.4998
0.4998
0.4999
0.4999
0.5000
0.5000
0.09
0.0359
0.0754
0.1141
0.1517
0.1879
0.2224
0.2549
0.2852
0.3133
0.3389
0.3621
0.3830
0.4015
0.4177
0.4319
0.4441
0.4545
0.4633
0.4706
0.4767
0.4817
0.4857
0.4890
0.4916
0.4936
0.4952
0.4964
0.4974
0.4981
0.4986
0.4990
0.4993
0.4995
0.4997
0.4998
0.4998
0.4999
0.4999
0.5000
0.5000
SPSS 16.0
Normal
S-plus programming
P 0 Z z Z Normal
function()
{
z1<-seq(0,0.09,0.01)
z2<-seq(0,3.9,0.1)
z<-seq(0,3.99,0.01)
prob<-pnorm(z)-0.5
Table<-t(array(prob,dim=c(length(z1),length(z2))))
Table<-cbind(c(z2),Table)
Table<-rbind(c(NA,z1),Table)
return(Table)
}
41