This question is about the elements in Group 2 of the Periodic Table (the alkaline earth metals).
Magnesium, calcium, and strontium all react in a similar way with dilute acids. Explain why in terms of their electronic structure.
A student investigates the reaction of these three elements with dilute hydrochloric acid.

The table shows some of the student's observations and reaction times:
| Group 2 element | Time for element to react completely (s) | Observations |
|---|---|---|
| Magnesium | 120 | Steady bubbling of gas, metal slowly dissolves. |
| Calcium | 45 | Vigorous fizzing, test tube becomes warm, metal dissolves quickly. |
| Strontium | 15 | Very rapid, violent fizzing, test tube becomes hot, metal disappears rapidly. |
All three elements produce the same gas when they react with dilute hydrochloric acid. Name this gas.
Describe how you would test for this gas and state the positive result.
Barium (Ba\text{Ba}Ba) is another Group 2 element. It is located below strontium (Sr\text{Sr}Sr) in the periodic table.
Predict the observations and the reaction time when a similar sample of barium reacts with dilute hydrochloric acid. Include a word or balanced symbol equation for this reaction.