It is often possible to change a hydrate into an anhydrous compound by heating it to drive off the water (dehydration).
A 49.38 gram sample of a hydrate of BaI2 was heated thoroughly in a porcelain crucible, until its weight remained constant. After heating, 45.22 grams of the anhydrous compound remained. What is the formula of the hydrate?