It's more convoluted. I can't find a 3.0 SRD online that isn't blocked by my employer's firewall. Here's the text from the 3.5 SRD. I
think it was similar, if not the same.
Quote:
ADVANCED MONSTER CHALLENGE RATING
When adding class levels to a creature with 1 or less HD, you advance the creature like a character. Otherwise, use the following guidelines.
ADDING CLASS LEVELS
If you are advancing a monster by adding player character class levels, decide if the class levels directly improve the monster’s existing capabilities.
When adding class levels to a creature, you should give it typical ability scores appropriate for that class. Most creatures are built using the standard array of ability scores: 11, 11, 11, 10, 10, 10, adjusted by racial modifiers. If you give a creature a PC class use the elite array of ability scores before racial adjustments: 15, 14, 13, 12, 10, 8. Creatures with NPC classes use the nonelite array of 13, 12, 11, 10, 9, 8. T
Associated Class Levels
Class levels that increase a monster’s existing strengths are known as associated class levels. Each associated class level a monster has increases its CR by 1.
Barbarian, fighter, paladin, and ranger are associated classes for a creature that relies on its fighting ability.
Rogue and ranger are associated classes for a creature that relies on stealth to surprise its foes, or on skill use to give itself an advantage.
A spellcasting class is an associated class for a creature that already has the ability to cast spells as a character of the class in question, since the monster’s levels in the spellcasting class stack with its innate spellcasting ability.
Nonassociated Class Levels
If you add a class level that doesn’t directly play to a creature’s strength the class level is considered nonassociated, and things get a little more complicated. Adding a nonassociated class level to a monster increases its CR by 1/2 per level until one of its nonassociated class levels equals its original Hit Dice. At that point, each additional level of the same class or a similar one is considered associated and increases the monster’s CR by 1.
Levels in NPC classes are always treated as nonassociated.
Source LinkYou can also add extra racial Hit Dice. The link has the ratios based on creature type to determine how many HD are needed to increase the CR.
To figure out the racial modifiers for ability scores (since 3.0 didn't have "as characters" section in the MM, I believe): If the ability score is even, subtract 10; if it's odd subtract 11. This becomes your racial modifier. For example, if a creature has an 18 Str and 8 Wis, its racial mods will be +8 Str and -2 Wis. However, Int can never go below 3.
Fun abuse that I like: give a troll druid levels; they're non-associated, so you get to add a crap ton in relation to the racial HD. The abuse wild shape - bears are pretty standard, and of course there's always dinos. The high Str and Con mod of the troll makes the animal's physical stats really nice, even if you end up using the lower numbers on the elite array.