Can a categorical variable be divided by a numerical variable? I am reading P.R. Rosenbaum, Model-based direct adjustment, Journal of the American Statistical Association, 1987 (82), pp. 387-394. However, there is one equation, which I can't understand.
$$
d = \frac{1}{N}\{\sum_{s=1}^{S}\sum_{i=1}^{N_s}\frac{z_{si}r_{si}}{\hat{e}_s} - \sum_{s=1}^{S}\sum_{i=1}^{N_s}\frac{(1-z_{si})r_{si}}{1-\hat{e}_s}\},
$$
where $d$ represents the difference, $\hat{e}_s$ is the probability, $z_{si}$ is the indicator function and $r_{si}$ is a binary response such as yes/no. My question is that How can a binary categorical variable $r_{si}$ be divided by a continuous variable $\hat{e}_s$? For example, how can a categorical variable (sex) male = 1 & female = 0 be divided by 0.23? 
It does not make any sense to me at all.  many thanks in advance.
 A: I can't access the article, so I'm guessing, but the answer to your general question is that yes a binary categorical variable can be divided by a continuous variable. I'm assuming the binary variable takes the form 0/1. It will then be setting the distance to 0 when the response is 0 (no), otherwise it reduces to $\frac{z_{si}}{\hat{e_{s}}}$ (and $\frac{1-z_{si}}{1-\hat{e_{s}}}$). So you can only get a distance other than 0 when the response is 1 (yes).
Thanks to Andy W for the TeX link. :)
A: Without reading the paper in detail, I'd assume it is using the common convention of coding a binary variable as 0/1 (e.g. 0=No, 1=Yes ; or 0=Incorrect, 1=Correct).
A: One way of thinking of this, when the variable is coded 0/1, is thinking of it as a logical variable rather than numerical.  In the equation you are worried about, we don't just have a binary variable divided by something else - it is part of a bigger expression with various other products.  Including the binary variable means "include this set of products and divisions if the binary variable is 1; make it zero otherwise so this particular term doesn't add to my overall result".  
