As the title suggests i have attempted comparing the variance of the position of particles of a sample of matter with the sample's temperature.
Now firstly we need to clarify the basics:
method for averaging a continuous function:
$$ M\{f\}(a,b)=\frac{1}{b-a} \int_{a}^{b} f(x) \, dx $$method for computing the variance of a continuous function:
we have $$\tag{*} \sigma^2=\sum_{i=1}^N \frac{(x_i - \bar{x})^2}{N} = (\sum_{i=1}^N \frac{x_i^2}{N}) - \bar{x}^2 $$
Now notice that $$(\sum_{i=1}^N \frac{x_i^2}{N}) $$
is the same as the average of the function $f^2(x)$ (assuming $\forall x_i\Rightarrow x_i \in R_f$) so with a bit of substitution and simplification we will have:
$$\sigma^2\{f\}(a,b)=M\{f^2\}(a,b) - (M\{f\}(a,b))^2$$
Okay!Now that we have our tools;we can continue to compute the desired variance. Notice the "variance" of the function of position of a moving particle gives us a scalar that indicates that how much the particle -sort of-"wobbles".
now if we have a sample consisting of 500 water molecules and we have the function of position of each particle with respect to time-and assume they are all moving in a simple harmonic manner (i.e $x(t) = A\cos{\omega t}$)-we can theoretically compute the total energy of the system:
$$Q = \sum{K} = \frac{1}{2}m_{molecule}\sum_{i=1}^N(\frac{dx_i}{dt})^2 = m_{total}cT = cT\sum m_{molecule}$$ note that the total heat energy of a system can be computed like so:$$Q = mc\Delta T = mc(T_1-T_0)=mc(T_2-0) = mcT_2$$(because the heat energy of a system is zero at zero kelvin) and let's define the "variance" of a system as follows:
$$\sigma^2[S]_{0}^{t}= \frac{1}{N}\sum_{i=1}^N \sigma^2\{x_i(t)\}(0,t)$$where $x_i(t)$ is the equation of motion of the i-th particle.
now if plot the variance of a system against its temperature using a code I wrote you can see it here.
now it takes about ten minutes to completely render and do all of the needed computations - my code is inefficient and my computer slow:( - and the final plot (the $y$ axis is variance of the system and the x axis is the temperature of the system) and the computed image is like follows:
now if we had more continuous data i suspect it would strangely resemble this figure here.(And I have ran it several times and it was not an accident.)
Now my question is if this connection really exists and if so why? Please note that I am currently in high school and please try not to get things too complicated.