# How to interpret an “if and only if” (“iff”) statement in a summation?

I'm a programmer trying to convert the formula below into code, and I don't understand what exactly the "iff" clause on the right side of the numerator is being applied to. The fact that it references the inner double-summation's "j" iterator character makes me think that it's saying that the inner double-summation should only be added to when the iff clause is satisfied; is that right?

• Looking at that equation, only one thing is going through my head: "AAAAAAAAH" – Brevan Ellefsen May 18 at 20:42
• Never seen something like this, but that would certainly be my first guess. – zbrads2 May 18 at 20:49
• @poetasis: "The if and only if $(\iff)$ means" --- He's not asking what "iff" means, but rather its logical scope on its left side. Nathan, I think you'll have to ask whoever wrote this, because it's not clearly written, and the original author should be responsible for correctly writing this (at least the mathematical symbols part). For example, does "cig" mean "c times i time g" or is "cig" a single subscript symbol? If the latter, then one should probably not use "i" or "g" as index variables. Also, the summation range for "g" is not given. (continued) – Dave L. Renfro May 18 at 20:58
• Finally, I can't come up with any interpretation where an "iff" would appear in the middle of a summation like this. Literally, it says that the objects being summed over (at some point, either the inner summations or the summations outside the square brackets) are if and only if statements, but arithmetic addition of if and only if statements makes no sense to me. – Dave L. Renfro May 18 at 21:00
• If I'm understanding the intended meaning correctly, the proper mathematical way of writing this is to put $\ell_{\text{cjh}} \geq \ell_{\text{cig}}$ in subscript form just under the inner-most summation, such as this and here, while still keeping the subscript $h$ (presumably replace with $h=1$ or whatever is the intended initial value for $h).$ – Dave L. Renfro May 19 at 7:33

From what you say in the first and second post, it looks plausible to understand the iff as $$[l_{cjh} \ge l_{cig}]$$ , where the square brackets denote the Iverson bracket $$\left[ P \right] = \left\{ {\begin{array}{*{20}c} 1 & {P = TRUE} \\ 0 & {P = FALSE} \\ \end{array} } \right.$$

• But wouldn't that require that the square brackets take only a logical proposition as their "input"? The square brackets here are surrounding a formula, not just the greater-than-or-equal-to comparison. – Nathan Wailes May 18 at 23:05
• @NathanWailes: in fact "your" square brackets are just an upper level bracketing that do not have any relation to the Iverson's meaning : replace them with round ones (upper level) to avoid confusion, and then replace "iff $l_{cjh} \ge l_{cig}$" with "$[l_{cjh} \ge l_{cig}]$" (actual Iverson) – G Cab May 19 at 10:36
• @NathanWailes: that will multiply the $(l_{cjh} - l_{cig}+1)$ making it null if the condition is not respected. – G Cab May 19 at 10:46
• Thank you for the clarification! – Nathan Wailes May 19 at 14:42

The answer is "Yes, the iff is limiting when things should be added to the inner double-summation". I proceeded with the assumption that this was the case and was able to reproduce a result from the paper, so it seems to be right.

The paper it's from is "Measuring the Reliability of Qualitative Text Analysis Data" by Klaus Krippendorf.

And the formula is not technically correctly-written:

[@DaveL.Renfro:] Literally, it says that the objects being summed over (at some point, either the inner summations or the summations outside the square brackets) are if and only if statements.

...which does not appear to have been what the author of the paper intended.