As I understand, the matching dpi and size qualifiers for the device are based not on actual screen properties (physical dpi and size), but instead on what was predefined by
Take a look at this page : Wikipedia : List of displays by pixel density
AFAIK, most of the time, dpi and ppi are the same, and it next generalized to HDPI/MDPI/LDPI ( see Android screen ranges ).
There are just a very little number of exceptions.