How do you get the nid from an entity id? I've got a field collection attached to a node. Given the entity ID of a given instance of that collection, how do I obtain the nid to which it's associated?

When using entity_load, the nid for some reason is a protected property, so I can't access it. I must be missing something.

Update: using node_load on this entity ID returns false.
It's important to understand that if all you have is the id of any entity, then there is no way to load a specific entity with that id. Since entity_id's are not unique across entity-types, it is necessary to know both the entity type, and the entity id.

See Developers need an $entity->entity_type property for a discussion on changing this for D7, as well as info about how this will be likely be handled in D8.

On the other hand, as pointed out in a different answer, if you already know that the entity id is a node id, then you can call an entity specific load function like node_load($nid). Since most entities will have such a load function to support named arguments, such a "shortcut" function will be almost universally available.

Examples: node_load(), taxonomy_term_load(), commerce_product_load().