Pressure and Volume

Take the keg out of the freezer and back into the cooler. Magically, let's fill it half full of beer. Our keg now has the same number of CO2 molecules but in half the space. The number of molecules remains the same, the speed remains the same, but they are hitting less wall (more often) so there is more force on each part of the wall and the pressure increases.