# Classical probability density

The classical probability density is the probability density function that represents the likelihood of finding a particle in the vicinity of a certain location subject to a potential energy in a classical mechanical system. These probability densities are helpful in gaining insight into the correspondence principle and making connections between the quantum system under study and the classical limit.

## Mathematical background

Consider the example of a simple harmonic oscillator initially at rest with amplitude A. Suppose that this system was placed inside a light-tight container such that one could only view it using a camera which can only take a snapshot of what's happening inside. Each snapshot has some probability of seeing the oscillator at any possible position x along its trajectory. The classical probability density encapsulates which positions are more likely, which are less likely, the average position of the system, and so on. To derive this function, consider the fact that the positions where the oscillator is most likely to be found are those positions at which the oscillator spends most of its time. Indeed, the probability of being at a given x-value is proportional to the time spent in the vicinity of that x-value. If the oscillator spends an infinitesimal amount of time dt in the vicinity dx of a given x-value, then the probability P(x) dx of being in that vicinity will be
    $P(x)\,dx\propto dt.$
Since the force acting on the oscillator is conservative and the motion occurs over a finite domain, the motion will be cyclic with some period which will be denoted T. Since the probability of the oscillator being at any possible position between the minimum possible x-value and the maximum possible x-value must sum to 1, the normalization
    $\int _{x_{\rm {min}}}^{x_{\rm {max}}}P(x)\,dx=1=N\int _{t_{i}}^{t_{f}}dt$
is used, where N is the normalization constant. Since the oscillating mass covers this range of positions in half its period (a full period goes from −A to +A then back to −A) the integral over t is equal to T/2, which sets N to be 2/T.
Using the chain rule, dt can be put in terms of the height at which the mass is lingering by noting that dt = dx/(dx/dt), so our probability density becomes
    $P(x)\,dx={\frac {2}{T}}\,{\frac {dx}{dx/dt}}={\frac {2}{T}}\,{\frac {dx}{v(x)}},$
where v(x) is the speed of the oscillator as a function of its position. (Note that because speed is a scalar, v(x) is the same for both half periods.) At this point, all that is needed is to provide a function v(x) to obtain P(x). For systems subject to conservative forces, this is done by relating speed to energy. Since kinetic energy K is 1⁄2mv$^2$ and the total energy E = K + U, where U(x) is the potential energy of the system, the speed can be written as
    $v(x)={\sqrt {\frac {2K}{m}}}={\sqrt {{\frac {2}{m}}[E-U(x)]}}.$
Plugging this into our expression for P(x) yields
    $P(x)={\frac {1}{T}}{\sqrt {\frac {2m}{E-U(x)}}}.$
Though our starting example was the harmonic oscillator, all the math up to this point has been completely general for a particle subject to a conservative force. This formula can be generalized for any one-dimensional physical system by plugging in the corresponding potential energy function. Once this is done, P(x) is readily obtained for any allowed energy E.

## Examples
### Simple harmonic oscillator

Starting with the example used in the derivation above, the simple harmonic oscillator has the potential energy function
    $U(x)={\frac {1}{2}}kx^{2}={\frac {1}{2}}m\omega ^{2}x^{2},$
where k is the spring constant of the oscillator and ω = 2π/T is the natural angular frequency of the oscillator. The total energy of the oscillator is given by evaluating U(x) at the turning points x = ±A. Plugging this into the expression for P(x) yields
    $P(x)={\frac {1}{\pi }}{\frac {1}{\sqrt {A^{2}-x^{2}}}}.$
This function has two vertical asymptotes at the turning points, which makes physical sense since the turning points are where the oscillator is at rest, and thus will be most likely found in the vicinity of those x values. Note that even though the probability density function tends toward infinity, the probability is still finite due to the area under the curve, and not the curve itself, representing probability.

### Bouncing ball

For the lossless bouncing ball, the potential energy and total energy are
    $U(z)=mgz,$
    $E=mgh,$
where h is the maximum height reached by the ball. Plugging these into P(z) yields
    $P(z)={\frac {1}{2{\sqrt {h}}}}{\frac {1}{\sqrt {h-z}}},$
where the relation $T={\sqrt {8h/g}}$ was used to simplify the factors out front. The domain of this function is $z\in [0,h]$ (the ball does not fall through the floor at z = 0), so the distribution is not symmetric as in the case of the simple harmonic oscillator. Again, there is a vertical asymptote at the turning point z = h.

## Momentum-space distribution

In addition to looking at probability distributions in position space, it is also helpful to characterize a system based on its momentum. Following a similar argument as above, the result is
    $P(p)={\frac {2}{T}}{\frac {1}{|F(x)|}},$
where F(x) = −dU/dx is the force acting on the particle as a function of position. In practice, this function must be put in terms of the momentum p by change of variables.

### Simple harmonic oscillator

Taking the example of the simple harmonic oscillator above, the potential energy and force can be written as
    $U(x)={\frac {1}{2}}kx^{2},$
    $|F(x)|=|-kx|={\sqrt {2kU(x)}}={\sqrt {{\frac {k}{m}}(2mE-p^{2})}}.$
Identifying (2mE)$^{1/2}$ = p$_0$ as the maximum momentum of the system, this simplifies to
    $P(p)={\frac {1}{\pi }}{\frac {1}{\sqrt {p_{0}^{2}-p^{2}}}}.$
Note that this has the same functional form as the position-space probability distribution. This is specific to the problem of the simple harmonic oscillator and arises due to the symmetry between x and p in the equations of motion.

### Bouncing ball

The example of the bouncing ball is more straightforward, since in this case the force is a constant,
    $F(x)=mg,$
resulting in the probability density function
    $P(p)={\frac {1}{m{\sqrt {8gh}}}}={\frac {1}{2p_{0}}}{\text{ for }}|p|<p_{0},$
where p$_0$ = m(2gh)$^{1/2}$ is the maximum momentum of the ball. In this system, all momenta are equally probable.