4
$\begingroup$

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.

$\endgroup$
2
  • $\begingroup$ Although the question has already been answered mathematics-wise, I think a philosophical answer would appear to be more relevant in this case. I agree with the question author - in reliance to the reality, such division makes no sense. In general, a binary categorical variable represents an answer to the question "Does it exist?" Whereas a continuous variable represents an answer to the question "What it's measure is in comparison to...". Those are different fundamental concepts. $\endgroup$ Commented Jan 29, 2012 at 21:09
  • 1
    $\begingroup$ Your comment, Maxim, perceptively suggests that the difficulty here is due to confusing an outcome with a random variable. An answer to a question (the outcome) is not the same thing as the number used to code that answer (the random variable). That's precisely why the random variable is created: so that one can do arithmetic with it! One might then wonder about the apparent arbitrariness of the random variable: what happens when a different encoding is used (such as male=1, female=-1). The answer is that the formula for $d$ may change but the statistical inference will not. $\endgroup$
    – whuber
    Commented Jan 30, 2012 at 15:56

3 Answers 3

4
$\begingroup$

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. :)

$\endgroup$
1
2
$\begingroup$

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).

$\endgroup$
3
  • $\begingroup$ Onestop, thanks for answering my question but 0/1 or no/yes does not change the characteristic of the variable. The variable $r_{si}$ is still a binary "categorical" variable. Am I right? Thus, how can a binary categorical variable be divided by a numerical number? $\endgroup$
    – Tu.2
    Commented Jan 29, 2012 at 17:48
  • $\begingroup$ You can divide 0 or 1 by a numerical number, can't you? $\endgroup$
    – onestop
    Commented Jan 29, 2012 at 17:59
  • $\begingroup$ Yes from a mathematical point of view I understand it. But I still can't image. Such as (female = 1)/ 0.3 = 3.3333. What does 3.333 mean for sex variable? $\endgroup$
    – Tu.2
    Commented Jan 29, 2012 at 18:09
2
$\begingroup$

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".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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