Sign up ×
Cross Validated is a question and answer site for people interested in statistics, machine learning, data analysis, data mining, and data visualization. It's 100% free, no registration required.

How should you deal with a cell value in a contingency table that is equal to zero in statistical calculations? (Note that such a value can be structural, i.e., it must be zero by definition, or random, i.e., it could have been some other value, but zero was observed.)

share|improve this question

closed as not a real question by whuber Aug 14 '12 at 12:37

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

More info is needed here, by zero do you mean missing? Why do you think you have to do something special because the value is zero? – Glen Feb 13 '11 at 14:39
I would close it as duplicate… – robin girard Feb 13 '11 at 19:04
That question asked about transformations rather than about inferential issues. – DWin Feb 13 '11 at 19:41

2 Answers 2

up vote 5 down vote accepted

A very nice discussion of structural zeros in contingency tables is provided by West, L. and Hankin, R. (2008), “Exact Tests for Two-Way Contingency Tables with Structural Zeros,” Journal of Statistical Software, 28(11), 1–19. URL

As the title implies, they implement Fisher’s exact test for two-way contingency tables in the case where some of the table entries are constrained to be zero.

share|improve this answer
Thank you – DrWho Feb 22 '11 at 12:46
Agresti and Finlay mention that generalizing Fisher's exact test also makes sense when cell counts fall below 5 in any contingency table. – Fr. Mar 13 '11 at 15:37

Zeros in tables are sometimes classified as structural, by design or by definition, or as random, i.e. a possible value that was observed. In the case of a study where no instances were observed despite being possible, the question often comes up: What is the one-sided 95% confidence interval above zero? This can be sensibly answered. It is, for instance, addressed in "If Nothing Goes Wrong, Is Everything All Right? Interpreting Zero Numerators" Hanley and Lippman-Hand. JAMA. 1983;249(13):1743-45. Their bottom line was that the upper end of the confidence interval around the observed value of zero was 3/n where n was the number of observations. This "rule of 3" has been further addressed in later analyses and to my surprise I found it even has a Wikipedia page. The best discussion I found was by Jovanovic and Levy in the American Statistician. That does not seem to be available in full-text in the searches, but can report after looking through it a second time that they modified the formula to be 3/(n+1) after sensible Bayesian considerations, which tightens up the CI a bit. There is a more recent review in International Statistical Review (2009), 77, 2, 266–275.

Addenda: After looking more closely at the last citation, above I also remember finding the extensive discussion in Agresti & Coull "The American Statistician", Vol. 52, No. 2 (May, 1998), pp. 119-126 informative. The "Agresti-Coull" intervals are incorporated into various SAS and R functions. One R function with it is binom.confint {package:binom} by Sundar Dorai-Raj.

There are several methods for dealing with situations where an accumulation of "zero" observations distort an otherwise nice, tractable distribution of say costs or health-care usage patterns. These include zero-inflated and hurdle models as described by Zeileis in "Regression Models for Count Data in R". Searching Google also demonstrates that Stata and SAS have facilities to handle such models.

After seeing the citation to Browne (and correcting the Jovanovic and Levy modification), I am adding this snippet from the even more entertaining rejoinder to Browne:

"But as the sample size becomes smaller, prior information becomes even more important since there are so few data points to “speak for themselves.” Indeed, small sample sizes provide not only the most compelling opportunity to think hard about the prior, but an obligation to do so. "More generally, we would like to take this opportunity to speak out against the mindless, uncritical use of simple formulas or rules."

And I add the citation to the Winkler, et al paper that was in dispute.

share|improve this answer
Thank you for the appreciably detailed answer with references. – DrWho Feb 14 '11 at 2:18
Jovanovic and Levy recommend 3/(n+1) -- see table 1, page 138 for confirmation. There's also a suggestion by Browne for 3/(n+1.7).… – zbicyclist May 22 '12 at 15:16
This is a nice answer. Can you improve the formatting in the 2nd to last paragraph (eg, w/ >)? The quotation marks don't match; is the whole paragraph a quote? Also, the 4th to last paragraph seems to start with a colon for some reason. – gung Dec 8 '13 at 3:44
Thks. As you suggested. I'm more familiar with the SO formatting. CV is a bit more "literary". – DWin Dec 8 '13 at 4:03
You're welcome. I believe the formatting is the same, except that CV also supports $\LaTeX$ via mathjax. Is the whole paragraph a quote, though (b/c there are unmatched quotation marks w/i)? – gung Dec 8 '13 at 4:05

Not the answer you're looking for? Browse other questions tagged or ask your own question.