Using contingency tables for testing multiple dependencies I know that I can determine the correlation / association / dependency between two variables (X= smoker, and Y=cancer) using chi-squared with a 2x2 contingency table: 
        Y=yes   Y=no
X=yes     n11    n12
X=no      n21    n22

where 


*

*n11 is the number of times when X happened, Y also happened 

*n12 is the number of times only X happened

*n21 is the number of times only Y happened

*n22 is the number of times when X did not happen, Y also did not happen 


Then I follow the chi-squared calculation:
$$
\chi^2 = \sum\frac{(\rm observed - expected)^2}{\rm expected}
$$
But what if: instead of one outcome Y, I have more than one outcome? For example: y1=cancer, y2=irregular heartbeat, y3=High blood pressure, etc. How can I represent these in contingent table?
 A: This is actually a pretty advanced topic.  There are a couple of possible shortcuts.  If all Y variables are independent, you could simply run several chi-squared tests.  You could also collapse your Y variables into a single new Y variable with 8 levels (y1-no; y2-no; y3-no, y1-no; y2-no; y3-yes, y1-no; y2-yes; y3-no, etc.) and run a chi-squared test on the 2x8 contingency table.  Neither of these are likely to be very satisfactory, however.  
The preferred analysis is to construct a multi-way contingency table, and fit a log-linear model.  The contingency table that you present is a two-way table with counts in rows and columns.  With one X and three Y variables, you would have a four-way contingency table, where each cell holds the count of the number of times that combination of X, Y1, Y2, and Y3 values happened.  Since it is hard to visualize a four-way table, it might also be convenient to display it as a flat table:  
x-no;  y1-no;  y2-no;  y3-no:   n1111
x-no;  y1-no;  y2-no;  y3-yes:  n1112
x-no;  y1-no;  y2-yes; y3-no:   n1121
x-no;  y1-no;  y2-yes; y3-yes:  n1122
x-no;  y1-yes; y2-no;  y3-no:   n1211
x-no;  y1-yes; y2-no;  y3-yes:  n1212
x-no;  y1-yes; y2-yes; y3-no:   n1221
x-no;  y1-yes; y2-yes; y3-yes:  n1222
x-yes; y1-no;  y2-no;  y3-no:   n2111
x-yes; y1-no;  y2-no;  y3-yes:  n2112
x-yes; y1-no;  y2-yes; y3-no:   n2121
x-yes; y1-no;  y2-yes; y3-yes:  n2122
x-yes; y1-yes; y2-no;  y3-no:   n2211
x-yes; y1-yes; y2-no;  y3-yes:  n2212
x-yes; y1-yes; y2-yes; y3-no:   n2221
x-yes; y1-yes; y2-yes; y3-yes:  n2222

A log-linear model is essentially a Poisson regression model that compares models that take various combinations of the variables into account and compares their fit to the saturated model.  If you use R, there is a nice tutorial here.  
