20050501
k χ
2
Test
χ
2
Test
Command: ChiTestⅪ
Description: This command tests hypotheses concerning the proportion of samples
included in each of a number of independent groups. The
χ
2
Test command is
used in the case of dichotomous variables, which are variables that have only
two possible values (such as “yes” or “no”).
Expected Frequencies
F
ij
=
Σ
x
ij
i=1
k
×
Σ
x
ij
j=1
ΣΣ
i=1
k
j=1
x
ij
χ
2
=
ΣΣ
F
ij
i=1
k
(x
ij
– F
ij
)
2
j
=1
Command Syntax
Observed matrix
Definition of Terms
Observed matrix: name of matrix containing observed values (positive integers in
all cells)
Input Example:
ChiTest matrixa
Calculation Result Output
χ
2
: χ
2
value
p : p-value
df : degrees of freedom
Tip
• The minimum size of the matrix is 2 × 2. An error occurs if the matrix has only one row or one
column.
• The result of the expected frequency calculation is stored in the system variable named
“Expected”.
7-9-10
Tests