Skip to main content

Pearson’s Chi-Squared Test and the American National Election Study (2012): Gender and Views on Same-Sex Marriage

By: The Odum Institute Published: 2015 | Product: SAGE Research Methods Datasets
Methods: Chi-square test
Data Type: Survey
+- LessMore information
Search form
Not Found

This dataset example introduces readers to the Pearson’s chi-squared test for independence (χ2). This technique allows researchers to test whether or not two categorical variables are associated with each other. This example uses a subset of data from the 2012 American National Election Study (ANES). It presents a test of the relationship between gender and support for same-sex marriage. Results from an analysis like this could have implications for how citizens might respond to policy changes in this sensitive area.

This example introduces readers to the basic theory and assumptions underlying this technique, the type of questions this technique can be used to answer, and how to produce and report results. The sample dataset has been cleaned and organized to make this example easier to follow. ...

Looks like you do not have access to this content.

To view more content or download guides and data files, please log in or subscribe below.

Looks like you do not have access to this content.

About This Dataset
Data Source Citation

The American National Election Studies (ANES; The ANES 2012 Time Series Study [dataset]. Stanford University and the University of Michigan [producers].

Full title of originating dataset

American National Election Studies (ANES) 2012 Time Series Study

Data author(s) and affiliations

American National Election Studies (Stanford University, University of Michigan)

Data Universe

U.S. eligible voters

Funding sources/suppliers

These materials are based on work supported by the National Science Foundation under grants SES-0937727 and SES-0937715, Stanford University, and the University of Michigan.

Any opinions, findings and conclusions or recommendations expressed in these materials are those of the author(s) and do not necessarily reflect the views of the funding organizations.

Sample/sampling procedures

The ANES 2012 Time Series is a dual-mode survey (face-to-face and Internet) with two independent samples. Cases selected for the face-to-face sample could not be interviewed on the Internet, and cases selected for the Internet survey could not be interviewed in person. The Internet sample was drawn from panel members of GfK Knowledge Networks. The Face-to-face sample used an address-based, stratified, multi-stage cluster sample in 125 census tracts. The face-to-face sample also featured oversamples of blacks and Hispanics.


Original dataset includes 3 weight variables:


for face-to-face sample analysis alone


for Internet sample analysis alone


for combined sample


Data collection dates

09-2012 to 01-2013

Time frame of analysis

2012 to 2013

Unit of analysis


Location covered by data

United States

Links to SRM content
List of variables


Party Identification


Views on Gay Marriage


Views on Abortion


Importance of Religion