Actually, it can be different. For example, a Hobgoblin is CR 1/2, and has 1 HD. However, it's ECL +1. Another example is the Nixie. They are CR 1 and have 1 HD, but are ECL +3.
Challenge Rating and Hit Dice alone aren't always a good representation of overall power. There are many other...