Awesome! You are doing a good job of Chemistry as well as Maths! Because water is made up of \(2 \, \mathrm{amu}\) of Hydrogen and \(16 \, \mathrm{amu}\) of Oxygen, the ratio is \(2:16 = 1:8\).
Do you recall our discussion in the previous module, where we said that if you take \(9 \, \mathrm{gm}\) of water, you will get \(1 \, \mathrm{gm}\) of Hydrogen and \(8 \, \mathrm{gm}\) of Oxygen? We had said that this is because water is made up of Hydrogen and Oxygen in the ratio \(1:8\)?

You can now see why the ratio is \(1:8\). It is because water is made up of \(2\) H atoms and \(1\) O atom. If you use the mass of these atoms, the ratio is \(1:8\), as you yourself just calculated!