understanding the relationship between two binary variables I want to answer the following question: what is the relationship between binary variable A and binary variable B?
In my case variable A is a marker for the presence of the flu, and variable B is a marker for the presence of another pathogen. Usually I would ask "what is the correlation?" but I know that a (Pearson) correlation is not appropriate for binary variables.
I understand there are statistical techniques such as the odds ratio and posterior probability for looking at the relationship between two binary variables. However I don't know how to compare these two techniques and when it's better to use one over the other (or some third technique I don't know about). To put it simply, it seems like any of these techniques would answer my question, and I don't understand why there are multiple such techniques, or how to choose from among them.
Can someone please explain the difference between these techniques and when to use one?
 A: Here is a very brief primer for 2x2 contingency tables.
First, it is necessary to think about the way the data can be presented. One approach is to fill in a 2x2 contingency table where the columns indicate flu or not and the rows indicate 2nd pathogen or not.  The other approach is to say present percentages for two groups: the percentage of people with the pathogen for those with the flu, $p_f$ and the percentage of people with the pathogen for those without the flu, $p_w$.
Second, you can now think of two different research questions. (1) ¿Is there any relationship between the flu and the pathogen? (2) ¿Are the percentages $p_f$ and $p_w$ the same or not? The first can be answered using a chi-squared test of independence, the second can be answered using a two-sample proportions hypothesis test. It turns out, these are actually the same thing mathematically, though the formulas for them can appear very different.
Third, the hypothesis test is not the same thing as an assessment of practical significance.  To do this, one can report the $\phi$-coefficient (which is nothing more than the correlation of the ones and zeros for each variable) or another measure of effect size such as Cramer's $V$. These are attempts to measure the strength of the relationship between the variables (much like a correlation, but for dichotomous variables).
Alternatively, the odds ratio (OR) is yet another way to understand the practical importance of the comparison.  For example, if the probability of having the pathogen with the flu is 60% and the probability of having the pathogen without the flu is 50%, the OR would be 0.6/0.5 = 1.2. This means, those with the flu have the pathogen 20% more than those without. But, this must be interpreted with caution, as 6% and 5% occurrence would result in the same OR.
Lastly, it is possible to run a logistic regression where the only predictor in the model is the dichotomous variable. Say, you wish to predict presence of the pathogen from having the flu or not.  The model would use the dichotomous variable flu (0/1) as the only predictor. This is a modeling approach comparable to the hypothesis testing approach indicated above.
Happy to elaborate on any of these issues in comments or via a revised answer.
