A convex lens will take light entering it and bend it toward the principal axis. Thus the name "converging" lens.
A concave lens will take light entering it and bend it away from the principal axis. Thus the name "diverging" lens.
Remember, the principal axis is an imaginary line passing through the center of the lens.
If you place an imaginary line through the center of the balloon this would be your "principal axis".
Next imagine the sound wave's wavefront as a sheet of paper approaching this balloon along the principal axis. The sheet of paper (wave front) is perpendicluar to the principal axis but sliding along the axis toward the balloon. It will encounter the balloon first where the principal axis enter the balloon.
If the balloon is filled with carbon dioxide the wave front that enters the balloon will slow down since sound waves travel slower in denser gases. This will allow the parts of the wave front still outside the balloon to get ahead of those that are inside so that once they do enter the balloon they will be further ahead of the wave front that entered earlier. This will make the wave front go from a flat sheet of paper to one that is more cup shaped bringing more of the wave front closer (converge) to the principal axis than they would be otherwise.
If the balloon is filled with hydrogen, a less dense gas. the part entering the balloon will travel faster and form like a bubble on the sheet of paper that is trying to get ahead of the original wave front and expand away (diverge) from the principal axis.
In a balloon which is spherical in shape, the number of molecules of gas filled are more in the central portion as compared to the edges.
Carbon Dioxide has a higher density than air whereas Hydrogen has lower desity than air.
Light refraction/bending is inwards when moving from lighter to the denser medium and outwards when moving from denser to the lighter medium.
In case of Carbon Dioxide, which is denser than air, the balloon has heavier/dencer medium in the center as compared to the edges and hence it behaves like a convex lense.
In case of Hydrogen, which is lighter than air, it is just the opposite. The balloon has lighter medium in the center as compared to the edges and hence the baloon behaves like a concave lense.
The cause of this is almost identical with the action of the convex lens on sound waves.The light waves are converged to a focus just as sound waves or with a convex lens.
Now exactly the opposite results can be obtained by a repetition of the experiment only with hydrogen gas. Instead of the light waves being converged to a focus, the hydrogen gas diffuses them in exactly the same way as sound waves are diffused in passing through of concave lens. This refraction of light is due to a change in velocity and has been caused by that part of the light waves that passes through the balloon. light waves travels through air faster than through carbon dioxide gas but slower than through hydrogen gas.
hope this helpsss...