Is temperature correctly defined in this animation? I saw this animation site for gas laws. I have some problems with it.
When I set the number of particles as 7 keeping nothing constant, the temperature was $341\;K$ and pressure $0.9$ atm. When I reduced it to 5, the temperature reading was $385\;K$ and pressure $0.5$ atm, when 3 it was $289\; K$ with pressure $0.3$ atm and when 1 it was $20\;K$ and pressure $0$ atm.
I know that most of us wil not get same result but give it a try if you doubt my observation.
I would like to know why is the temperature changing with such randomness while pressure is having a regular change (as expected) ? Is there a physical reason for that ?
 A: Temperature and pressure are ultimately statistical properties of a large number of particles.  Asking for the temperature - or pressure - of a single atom is meaningless.
In the case of an ideal gas, it turns out that temperature can be related to the average kinetic energy of the gas molecules via the equipartition theorem, which yields ${KE}_{av} = \frac{3}{2}kT$ where $k$ is the Boltzmann constant.  Inverting this relation gives $T = \frac{2}{3k} KE_{av}$.  This is how the simulation you mention defines temperature.
When you insert particles into the simulation, they are created with an energy which corresponds to the temperature displayed at the top of the screen.  When they collide with one another, they randomly exchange energy, and so very quickly all of the particles have randomized energies while keeping the same average. When you subtract particles from the simulation, it simply deletes a particle which is already present.  If the number of particles is large, then deleting one or two particles doesn't affect the average very much, but if the number of particles is small, deleting one particle could have a large effect on the average (and therefore the displayed temperature).
Similarly, the pressure (via the ideal gas law) is $P = \frac{NkT}{V}$.  From the volume of the box, the temperature, and the number of particles, the pressure can be calculated.  Since this depends on the total particle kinetic energy ($\propto NT$), it will suffer the same issues when the number of particles is small; even though the total pressure will always decrease when removing particles from the simulation, the amount by which it decreases will be random for the same reason as above.
