Water contains two parts hydrogen and one part oxygen (two H and one O = H2O)
Because of this, the amount of hydrogen and oxygen produced during electrolysis of water is in a 2:1 ratio.
In electrolysis process, hydrogen goes to one test tube and oxygen goes to another. Because Water contains 2 part hydrogen, the amount collected in one tube is double of amount collected in other one.