Creating a ranger in 5e the feature says "Its hit point maximum equals its normal maximum..." If I have a panther, for example, does that mean it would have 13 hp (the health in the stat block) or 24 hp (the maximum on 3d8 hit dice)?
Jeremy Crawford answered a tweet on this, actually:
It means whatever max the DM sets in the given hp range. If the DM uses the average in the stat block, the max is 11.
So this means if your DM uses the average hp for creatures, then you would use average for your companion. If she rolls for creature hp, then you would use the max for your companion.
This means that it can either have 13 HP, or you can roll 3d8 for its HP, just like any monster or NPC.
Note that it is possible for it to have maximum HP of 24, but there is only a 1 in 512 chance of that happening.
You should also note that the average of 3d8 is actually 13.5, so rolling is statistically a better choice. However, with a sample size of 1, it's really just a matter of luck if you roll.