To start with, some assumptions must be made to simplify the problem. Firstly the N molecules are assumed to have no size, be identical and not interact with each other. The second assumption is that the molecules move randomly and collide elastically with the container which is a cube of side length L.
When a particle collides with the container in the x direction, it rebound in the opposite direction at the same speed meaning the change in momentum is 2mvx. The momentum change of n particles is therefore 2nmvx.
The force exerted on the wall F=Impulse/Time so next we need to find the number of particles colliding with the wall per second. To do this, consider that all particles less than v metres from the wall will collide before one second. This means that any particle in the volume vxL2 will collide. However, only half the particles will be travelling towards the wall so a factor of 1/2 is needed. The number of particles in this volume is vxL2/2*N/L3=vxN/2L. This means F=2mvx+vxN/2L=mNvx2/L. As all directions are equivalent, v2=vx2+vy2+vz2=3vx2 so F=mNv2/3L.
The pressure is therefore P=F/L2=mNv2/3L3=mNv2/3V. This means that PV=Nmv2/3. Also, PV=NkBT so NkBT=Nmv2/3 so kBT=mv2/3. The average speed can now be found in terms of temperature and mass only: v=sqrt(3kBT/m).