# Is there any statistical reason for diagonal lines in scatterplot on a log scale? [duplicate]

I'm perplexed by some vertical lines that show up in these scatter plots on a log scale. Population is on the y-axis and the proportion of the neighborhood with the attribute mentioned in the panel label on the x-axis. Is this just an artifact of the transformation? (I thought perhaps this was due to digit preference or something like that, but I can't think how this might be possible in this dataset from census data.)

## marked as duplicate by whuber♦Oct 1 '13 at 19:32

• Very closely related: stats.stackexchange.com/questions/25068. – whuber Sep 27 '13 at 14:34
• @whuber the related link in your comment looks like more or a duplicate than the "strange pattern" link that is identified as the duplicate – Abe Oct 2 '13 at 14:23

I see that the lines are always at $\log( y ) = a - <log( x )$, e.g. in the lower left panel, proportion of $10^{-4}$ corresponds to population of $10^4$. I think that the population was used when calculating the value.

For example, maybe the census did not record "what is the proportion of Chinese in the neighborhood", but rather "how many Chinese are living in the neighborhood". The answers were $1, 2, 3,\ldots$ etc. And automatically, given population size of $N$, the corresponding values will be $\frac{1}{N}$, $\frac{2}{N},\ldots$ etc. These will correspond to the first lower-left diagonal line, second lower left diagonal line and so forth.

• Yes, that makes perfect sense. My head and the wall it's been banging against thank you! Now how do I resolve my moral obligation for accepting an answer :s – Tom Sep 27 '13 at 14:06
• Also, should these variables be modeled with Poisson regression instead of simple linear regression since the numerator and denominator in creating the proportion were discrete? – Tom Sep 27 '13 at 14:09
• I would ask this as a separate question to draw more attention, I think! – January Sep 27 '13 at 14:17

It's due to integer effects with low counts for the class membership.

Consider the "Not Filipino" graph at the lower left. Note how the lower left line goes through the point (-3,3). That point would correspond to 1 observation of a Not Filipino out of $10^3$ people in the neighborhood. Note also that for the Chinese graph, the line goes through the same (-3,3), and likewise for the Disabled graph. The lines also go through the (-4,4) point - one observation out of $10^4$ people. If you consider where one observation out of 3,500 people would lie (at (-3.54,3.54)), you can see how the line gets generated.

The next line to the right goes through points that appear to be about 0.3 x-units larger than the first line; this is the line corresponding to two observations of Not Filipinos, or Chinese, or Disabled (log10(2) = 0.3). Since you can't observe between 1 and 2 Not Filipinos, you have a gap between the two lines.

These things happen, I've seen similar myself.