Some ionic compounds have water molecules inside their crystals. These are called hydrated salts. We can use the mass of the hydrated salt, and the mass of the anhydrous salt (after "cooking" all of the water out of it) to find the formula of the hydrated salt:
Hydrated Barium Chloride
We put this theory into practice, trying to find the formula of hydrated barium chloride.