SPSS Lab Session 3

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 10

SPSS Lab Session 3

Chi-Square test of Independence


The Chi-Square Test of Independence also known as test of association. It determines whether there is an
association between categorical variables (i.e., whether the variables are independent or related). It is a
nonparametric test.
This test utilizes a contingency table to analyze the data. A contingency table (also known as a cross-
tabulation, crosstab, or two-way table) is an arrangement in which data is classified according to two
categorical variables. The categories for one variable appear in the rows, and the categories for the other
variable appear in columns. Each variable must have two or more categories. Each cell reflects the total
count of cases for a specific pair of categories.

Uses
The Chi-Square Test of Independence is commonly used to test the Statistical independence or
association between two categorical variables.
The Chi-Square Test of Independence can only compare categorical variables. It cannot make
comparisons between continuous variables or between categorical and continuous variables. Additionally,
the Chi-Square Test of Independence only assesses associations between categorical variables, and can
not provide any inferences about causation.
Data Requirements
Your data must meet the following requirements:
1. Two categorical variables.
2. Two or more categories (groups) for each variable.
3. Independence of observations.
 There is no relationship between the subjects in each group.
 The categorical variables are not "paired" in any way (e.g. pre-test/post-test
observations).
4. Relatively large sample size.
 No redundant data
 Expected frequencies should be at least 5 for the majority (80%) of the cells.

In SPSS, the Chi-Square Test of Independence is an option within the Crosstabs procedure. Recall that
the Crosstabs procedure creates a contingency table or two-way table, which summarizes the distribution
of two categorical variables.

To create a crosstab and perform a chi-square test of independence, click Analyze > Descriptive
Statistics > Crosstabs.
A Row(s): One or more variables to use in the rows of the crosstab(s). You must enter at least

one Row variable.

B Column(s): One or more variables to use in the columns of the crosstab(s). You must enter

at least one Column variable.

Also note that if you specify one row variable and two or more column variables, SPSS will print
crosstabs for each pairing of the row variable with the column variables. The same is true if you
have one column variable and two or more row variables, or if you have multiple row and
column variables. A chi-square test will be produced for each table. Additionally, if you include
a layer variable, chi-square tests will be run for each pair of row and column variables within
each level of the layer variable.
C Layer: An optional "stratification" variable. If you have turned on the chi-square test results

and have specified a layer variable, SPSS will subset the data with respect to the categories of the
layer variable, then run chi-square tests between the row and column variables. (This
is not equivalent to testing for a three-way association, or testing for an association between the
row and column variable after controlling for the layer variable.)

D Statistics: Opens the Crosstabs: Statistics window, which contains fifteen different

inferential statistics for comparing categorical variables.

To run the Chi-Square Test of Independence, make sure that the Chi-square box is checked.

E Cells: Opens the Crosstabs: Cell Display window, which controls which output is displayed

in each cell of the crosstab. (Note: in a crosstab, the cells are the inner sections of the table. They
show the number of observations for a given combination of the row and column categories.)
There are three options in this window that are useful (but optional) when performing a Chi-
Square Test of Independence:

1 Observed: The actual number of observations for a given cell. This option is enabled by

default.

2 Expected: The expected number of observations for that cell (see the test statistic formula).

3 Unstandardized Residuals: The "residual" value, computed as observed minus expected.

F Format: Opens the Crosstabs: Table Format window, which specifies how the rows of the

table are sorted.


One-Way ANOVA
One-Way ANOVA ("analysis of variance") compares the means of two or more independent groups in
order to determine whether there is statistical evidence that the associated population means are
significantly different. One-Way ANOVA is a parametric test.
This test is also known as:

 One-Factor ANOVA
 One-Way Analysis of Variance
 Between Subjects ANOVA
The variables used in this test are known as:

 Dependent variable
 Independent variable (also known as the grouping variable, or factor)
o This variable divides cases into two or more mutually exclusive levels, or groups

Uses
The One-Way ANOVA is often used to analyze data from the following types of studies:
 Field studies
 Experiments
 Quasi-experiments

The One-Way ANOVA is commonly used to test the following:

 Statistical differences among the means of two or more groups


 Statistical differences among the means of two or more interventions
 Statistical differences among the means of two or more change scores
Data Requirements
Your data must meet the following requirements:
1. Dependent variable that is continuous (i.e., interval or ratio level)
2. Independent variable that is categorical (i.e., two or more groups)
3. Cases that have values on both the dependent and independent variables
4. Independent samples/groups (i.e., independence of observations)
1. There is no relationship between the subjects in each sample. This means that:
1. subjects in the first group cannot also be in the second group
2. no subject in either group can influence subjects in the other group
3. no group can influence the other group
5. Random sample of data from the population
6. Normal distribution (approximately) of the dependent variable for each group (i.e., for each level
of the factor)
1. Non-normal population distributions, especially those that are thick-tailed or heavily
skewed, considerably reduce the power of the test
2. Among moderate or large samples, a violation of normality may yield fairly
accurate p values
7. Homogeneity of variances (i.e., variances approximately equal across groups)
1. When this assumption is violated and the sample sizes differ among groups, the p value
for the overall F test is not trustworthy. These conditions warrant using alternative
statistics that do not assume equal variances among populations, such as the Browne-
Forsythe or Welch statistics (available via Options in the One-Way ANOVA dialog box).
2. When this assumption is violated, regardless of whether the group sample sizes are fairly
equal, the results may not be trustworthy for post hoc tests. When variances are unequal,
post hoc tests that do not assume equal variances should be used (e.g., Dunnett’s C).
8. No outliers

To run a One-Way ANOVA in SPSS, click Analyze > Compare Means > One-Way ANOVA.

The One-Way ANOVA window opens, where you will specify the variables to be used in the
analysis. All of the variables in your dataset appear in the list on the left side. Move variables to
the right by selecting them in the list and clicking the blue arrow buttons. You can move a
variable(s) to either of two areas: Dependent List or Factor.
A Dependent List: The dependent variable(s). This is the variable whose means will be

compared between the samples (groups). You may run multiple means
comparisons simultaneously by selecting more than one dependent variable.

B Factor: The independent variable. The categories (or groups) of the independent variable

will define which samples will be compared. The independent variable must have at least two
categories (groups), but usually has three or more groups when used in a One-Way ANOVA.

C Contrasts: (Optional) Specify contrasts, or planned comparisons, to be conducted after the

overall ANOVA test.


When the initial F test indicates that significant differences exist between group means, contrasts
are useful for determining which specific means are significantly different when you have
specific hypotheses that you wish to test. Contrasts are decided before analyzing the data (i.e., a
priori). Contrasts break down the variance into component parts. They may involve using
weights, non-orthogonal comparisons, standard contrasts, and polynomial contrasts (trend
analysis).

Many online and print resources detail the distinctions among these options and will help users
select appropriate contrasts. For more information about contrasts, you can open the IBM SPSS
help manual from within SPSS by clicking the "Help" button at the bottom of the One-Way
ANOVA dialog window.

D Post Hoc: (Optional) Request post hoc (also known as multiple comparisons) tests. Specific

post hoc tests can be selected by checking the associated boxes.


When the initial F test indicates that significant differences exist between group means, post hoc
tests are useful for determining which specific means are significantly different when you do not
have specific hypotheses that you wish to test. Post hoc tests compare each pair of means (like t-
tests), but unlike t-tests, they correct the significance estimate to account for the multiple
comparisons.

E Options: Clicking Options will produce a window where you can specify

which Statistics to include in the output (Descriptive, Fixed and random effects, Homogeneity of
variance test, Brown-Forsythe, Welch), whether to include a Means plot, and how the analysis
will address Missing Values (i.e., Exclude cases analysis by analysis or Exclude cases
listwise). Click Continue when you are finished making specifications.
9.

Click OK to run the One-Way ANOVA.

You might also like