How to perform Fisher’s Exact Test in SPSS?

How to perform Fisher’s Exact Test in SPSS?

The process of performing Fisher’s Exact Test within SPSS (Statistical Package for the Social Sciences) is a straightforward, yet crucial, task for analysts dealing with small sample sizes in contingency tables. To initiate the test, you navigate through the Analyze dropdown menu, specifically selecting the option dedicated to non-parametric tests or, more commonly for this procedure, the Crosstabs functionality found under Descriptive Statistics. This path allows for the detailed configuration required for 2×2 table analysis. Once the appropriate variables are specified and the exact test option—which includes Fisher’s Exact Test—is selected, the software executes the analysis. The comprehensive statistical results, including the exact probability calculations, are then presented clearly in the output viewer, providing the necessary evidence to determine the association between the variables of interest.


The Fisher’s Exact Test is used to determine whether or not there is a significant association between two categorical variables.

It is typically utilized as a superior alternative to the standard Chi-square test when one or more of the expected cell counts in a 2×2 contingency table falls below the critical threshold of 5.

This comprehensive tutorial explains the procedural steps and theoretical considerations necessary to correctly perform Fisher’s Exact Test in SPSS.

Theoretical Foundation of Fisher’s Exact Test

The Fisher’s Exact Test is a powerful statistical tool specifically designed to determine whether a significant association exists between two distinct categorical variables. This methodology differs fundamentally from approximation tests, as it calculates the precise probability of observing the given set of data, assuming that the marginal totals (row and column totals) are fixed. Developed by Ronald Fisher, this approach provides an exact measure of significance, which is especially vital when dealing with limited datasets or situations where the standard asymptotic assumptions of other tests cannot be reliably met.

Unlike tests that rely on calculating expected frequencies and then comparing them to observed frequencies, Fisher’s method considers all possible 2×2 tables that could be formed with the existing fixed marginal totals. It then sums the probabilities of those tables that are equally or less likely than the observed data, yielding the exact p-value. This rigorous probabilistic approach ensures reliability, particularly in fields like medical research, biological studies, and social sciences where precise association measurements in small cohorts are critical for drawing valid conclusions.

Understanding the null hypothesis associated with this test is key to its proper application. The null hypothesis ($H_0$) states explicitly that the classification of the row variable is statistically independent of the classification of the column variable. Consequently, rejecting the null hypothesis implies that there is a statistically significant association between the two categorical variables being investigated. Because the test is non-parametric and relies on fixed margins, it provides a robust alternative when analyzing nominal data in constrained research settings.

Why Choose Fisher’s Over Chi-Square?

The choice between Fisher’s Exact Test and the standard Chi-square test for independence is perhaps the most critical decision point when analyzing 2×2 contingency tables. While the Chi-square test is widely used, it relies heavily on the assumption that the expected cell counts are sufficiently large to approximate the distribution accurately. A common and strict rule of thumb dictates that the Chi-square approximation is unreliable and potentially misleading if one or more expected cell frequencies are less than 5. When this criterion is violated, the calculated Chi-square statistic often becomes inflated, leading to inaccurate p-value estimation and potentially erroneous conclusions regarding variable association.

This statistical limitation is precisely where Fisher’s Exact Test proves its value and becomes indispensable. It serves as the definitive alternative in situations characterized by small sample sizes or highly skewed data distribution, which inherently results in low expected cell counts. Because Fisher’s method directly calculates the exact probability based on the hypergeometric distribution without relying on asymptotic assumptions, it remains valid and reliable even when the minimum expected frequency condition is severely breached. Therefore, whenever analysts encounter sparse data in a 2×2 table within SPSS, selecting the exact method is a professional requirement for maintaining statistical integrity and precision.

Furthermore, contemporary statistical software, including SPSS, has significantly improved the computational efficiency of implementing the Exact Test. This advancement eliminates the historical difficulty of manually calculating the complex hypergeometric distribution probabilities. Analysts can configure the program to automatically check for small cell counts and provide the exact test results alongside the standard Chi-square output, ensuring that the most statistically appropriate statistic is utilized for formal interpretation, regardless of the underlying data sparsity issues.

Practical Example: Association Between Gender and Party Preference

To fully grasp the application of Fisher’s Exact Test in SPSS, we will examine a typical scenario in social science research. Suppose a research team at a university wishes to investigate whether a statistically significant relationship exists between a student’s self-reported gender and their stated political party preference. The initial hypothesis suggests that these two categorical variables might be associated within the specific campus population being studied.

The researchers executed a controlled, small-scale random poll, surveying a total of 25 students across the campus community. The fundamental objective of this preliminary study is to determine if gender influences whether a student identifies primarily as a Democrat or a Republican. Given the constraints of the limited sample size (N=25), utilizing Fisher’s Exact Test is the most statistically sound approach to analyze the collected frequency data, especially since the sample size increases the likelihood of encountering low expected cell counts, which would otherwise invalidate the standard Chi-square test.

The resulting raw data from the 25 surveyed students is systematically summarized in the 2×2 contingency table presented below. This table aggregates the observed frequencies based on the two dimensions: Gender (Female/Male) and Political Party Preference (Democrat/Republican). Our subsequent step-by-step analysis in SPSS will utilize this frequency data to calculate the exact probability and test the rigorous null hypothesis of statistical independence between the two measured variables.

 DemocratRepublican
Female84
Male49

Step 1: Preparing and Entering Data in SPSS

The initial and perhaps most crucial stage in any statistical analysis using SPSS involves correctly structuring and inputting the raw data. For a contingency table analysis like Fisher’s Exact Test, the data must be entered in a case-by-case format, where each individual row represents a single observation or participant. This mandates the definition of specific variables corresponding to the factors being measured—in this case, ID, Party Preference, and Gender—and the assignment of appropriate coded values to each of the 25 participants.

Specifically, analysts must define three variables within the SPSS Variable View. The variables should be structured as follows: First, a unique identifier variable (ID). Second, Party Preference, which should be coded numerically (e.g., 1 for Democrat, 2 for Republican). Third, Gender, also numerically coded (e.g., 1 for Female, 2 for Male). It is imperative that appropriate value labels are assigned within the Variable View to ensure that the statistical output is easily readable and fully comprehensible upon generation.

Once the variables are precisely defined and labeled, the data entry proceeds meticulously in the Data View. Each row captures the specific combination of party and gender for one of the 25 surveyed students, resulting in 25 separate entries. Proper data input is foundational, as any errors in numerical coding or transcription will propagate throughout the subsequent statistical calculations, inevitably leading to unreliable test results and flawed inference. This detailed, structured input format is absolutely essential for SPSS to correctly aggregate individual frequencies when constructing the required crosstabulation table later in the procedure.

The visual representation below illustrates how the raw data should be meticulously entered into the SPSS data editor, ensuring that each observation corresponds to one row and details the individual’s ID, political party preference, and gender classification.

Step 2: Executing the Crosstabs Procedure

With the data correctly entered and structured, the next phase involves initiating the statistical procedure within SPSS. The Fisher’s Exact Test is accessed through the Crosstabs dialog box, which is the specialized primary tool for generating contingency tables and executing associated tests of independence. To begin this procedure, navigate the top menu bar by clicking on the Analyze tab, then hovering the cursor over Descriptive Statistics, and finally selecting Crosstabs from the subsequent menu.

The Crosstabs dialog box requires the analyst to carefully assign the independent and dependent variables to the row and column slots. For our specific example, drag the variable representing Gender into the box labeled Rows, and place the variable Party into the box designated Columns. This crucial arrangement defines the structural dimensions of our 2×2 contingency table. Establishing the correct orientation is necessary for clarity, although the calculated output of Fisher’s Exact Test itself is symmetrical regardless of which variable is assigned to the rows or columns. However, maintaining a clear structure greatly aids in subsequent output interpretation and report generation.

It is essential, before proceeding to the final execution, to click the button labeled Statistics located within the Crosstabs dialog box. Although our primary statistical focus is the Exact Test, the traditional Chi-square test is often calculated simultaneously for methodological comparison and completeness. Ensure that the checkbox situated next to Chi-square is checked within the Statistics submenu. After verifying this selection, click Continue to return to the main Crosstabs window, thus preparing the analysis for the essential next step of specifying the exact calculation method.

Step 3: Configuring the Exact Test Parameters

The unique operational functionality of SPSS that facilitates the calculation of the exact probability is located within the dedicated “Exact” submenu of the Crosstabs procedure. Analysts must click the button labeled Exact to proceed. This action opens a new specific dialog box where the parameters for the non-parametric calculation are precisely configured. By default, SPSS often selects the Asymptotic-only result; however, for reliable analysis of small samples, the Exact option must be manually checked and selected.

Within the Exact Test dialog, the analyst must confirm that the radio button next to Exact is decisively checked. This imperative action instructs SPSS to dedicate computational resources to performing the demanding combinatorial calculations required for the precise probability derived from Fisher’s Exact Test. It should be noted that this dialog allows for setting time limits for computationally intensive exact calculations, but for a straightforward 2×2 table with a total sample size of only 25, the calculation will be virtually instantaneous. After confirming the necessary selection, click Continue to exit the Exact Test options and return to the primary Crosstabs window.

Fisher's exact test in SPSS

With both the required statistics (including Chi-square) and the exact method comprehensively configured, the analysis is ready for execution. Analysts should quickly review the main Crosstabs dialog one last time to ensure that the correct variables remain assigned to the rows and columns as intended. Finally, click OK. SPSS will immediately execute the entire procedure, generating the crosstabulation table and the associated statistical output, which now includes the critical precise p-value derived specifically from Fisher’s Exact Test.

Step 4: Interpreting the Statistical Output

Once the analysis is complete, the SPSS Output Viewer opens, presenting a sequence of tables detailing the results of the procedure. A systematic and critical interpretation of these generated tables is essential for drawing accurate, evidence-based conclusions about the potential association between gender and political party preference in the sample.

Output of Fisher's Exact Test in SPSS

The initial table typically displayed is the Case Processing Summary. This table provides crucial verification of the data integrity used in the subsequent analysis. For our particular example, this summary confirms that zero cases were excluded due to missing data, thus indicating that all 25 surveyed students were successfully included in the statistical calculation. This table is important for verifying the true sample size (N) and ensuring complete data utilization before moving on to the core statistical results.

The second table presented displays the Crosstabulation of the total number of individuals categorized by gender and political party preference. This table visually represents the raw frequencies utilized in the calculation, confirming the individual cell counts (8, 4, 4, 9) and clearly showing the marginal totals (Row, Column, and Grand Total). It serves as a necessary visual confirmation that the input data was aggregated and processed correctly according to the initial table layout specified in Step 2.

The third, and most critical, table is the Chi-Square Test summary. This section provides multiple derived statistics, including results for Pearson Chi-square, Continuity Correction (Yates’), Likelihood Ratio, and, most importantly, the Fisher’s Exact Test results. The SPSS output explicitly provides two key p-value statistics derived from the exact calculation:

  • Two-sided p-value: .115
  • One-sided p-value: .081

The two-sided p-value, 0.115, is conventionally used because the null hypothesis of the test—that gender and political party preference are independent—does not specify or assume the directionality of the potential association.

Conclusion and Interpretation of Findings

The ultimate goal of this statistical analysis was to determine if the observed association between gender and political party preference within this specific sample is statistically significant. The established null hypothesis ($H_0$) asserts that these two categorical variables are entirely independent; conversely, the alternative hypothesis ($H_a$) suggests that the variables are dependent, indicating a relationship between a student’s gender and their political affiliation.

Drawing conclusions based on the precise output generated by SPSS, we focus on the two-sided p-value obtained from Fisher’s Exact Test, which is 0.115. The fundamental rule governing statistical inference dictates that we can only reject the null hypothesis if the calculated p-value is less than or equal to the pre-determined significance level ($alpha = 0.05$).

Given that the calculated p-value of 0.115 is clearly greater than the required significance level of 0.05, we are compelled to fail to reject the null hypothesis ($H_0$). This failure to reject $H_0$ formally concludes that, based on this specific sample of 25 students, the researchers do not possess sufficient statistical evidence to definitively state that there is a significant association or dependency between a student’s gender and their political party preference. It remains crucial for the analyst to note that failing to reject the null hypothesis does not constitute proof of independence; rather, it strongly suggests that the observed pattern of differences is likely attributable to random sampling variability, particularly given the constraints of the small sample size.

Cite this article

stats writer (2025). How to perform Fisher’s Exact Test in SPSS?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-to-perform-fishers-exact-test-in-spss/

stats writer. "How to perform Fisher’s Exact Test in SPSS?." PSYCHOLOGICAL SCALES, 26 Dec. 2025, https://scales.arabpsychology.com/stats/how-to-perform-fishers-exact-test-in-spss/.

stats writer. "How to perform Fisher’s Exact Test in SPSS?." PSYCHOLOGICAL SCALES, 2025. https://scales.arabpsychology.com/stats/how-to-perform-fishers-exact-test-in-spss/.

stats writer (2025) 'How to perform Fisher’s Exact Test in SPSS?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-to-perform-fishers-exact-test-in-spss/.

[1] stats writer, "How to perform Fisher’s Exact Test in SPSS?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, December, 2025.

stats writer. How to perform Fisher’s Exact Test in SPSS?. PSYCHOLOGICAL SCALES. 2025;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top