# Centre of gravity of a glass

our physics teacher showed us an experiment, she took two plastic glasses but one had a little plastic pong and the other was empty. she filled both with water and kept them on a plane surface. then she slowly tipped them and I thought the first to topple would be the one glass that is empty because the other glass has more weight downwards (because of the pong) so hasn't its centre of gravity fallen? I was wrong ofcourse the first one to fall was the one with the pong.I tried to ask her evn but she explained it in a very vague manner. I dont understand it now it even makes the double decker thing ambiguous according to this then the double decker has more weight on the bottom so it should also topple over, hope you're getting what im trying to say

$$x_{CM}=\frac{\sum (m\cdot x)}{\sum m}$$
For example, set your original point at the bottom of the glass. Then let's say the CM of you glass and water is $$10\text{cm}$$ (above the bottom of glass) and the CM of pong is $$20\text{cm}$$ and the mass of glass and water is $$100\text{g}$$ and the mass of pong is $$5\text{g}$$.
Then the CM of whole system is $$\frac{10 \cdot 100 + 20 \cdot 5}{100 + 5} = 10.48 \text{cm} > 10 \text{cm}$$