Average and standard deviation

Reference: Griffiths, David J. (2005), Introduction to Quantum Mechanics, 2nd Edition; Pearson Education – Problems 1.1 – 1.2.

Having reached the end of the problems in Griffiths’s book, I’ll rewind and return to chapter 1 to fill in the gaps that I left in my rush to get into the meat of quantum mechanics.

Probability is at the heart of quantum mechanics, so it’s a good idea to be sure we understand some of the basic concepts. Variables in quantum mechanics come in both discrete and continuous forms, so we’ll do a quick review of the average, variance and standard deviation in these cases.

In the discrete case, the average of a set of values is just the sum of all the values divided by the number of values. To make this precise, suppose that value {j} occurs {N\left(j\right)} times; then the average of {j} is

\displaystyle  \left\langle j\right\rangle \equiv\frac{\sum_{j}jN\left(j\right)}{\sum_{j}N\left(j\right)} \ \ \ \ \ (1)

The average (also called the mean) is distinct from the median value, which is the value the divides the set into two equal subsets, with one subset containing values less than the median and the other containing values greater than the median. (Obviously this works exactly only if we have an even number of values, but you get the idea.)

Having calculated the average, we can then calculate the deviation {\Delta j} from that average for each value {j}. It turns out that the square of the deviation is more useful, so we have

\displaystyle  \left(\Delta j\right)^{2}=\left(j-\left\langle j\right\rangle \right)^{2} \ \ \ \ \ (2)

The variance is the mean of these squares:

\displaystyle   \sigma^{2} \displaystyle  = \displaystyle  \left\langle \left(\Delta j\right)^{2}\right\rangle \ \ \ \ \ (3)
\displaystyle  \displaystyle  = \displaystyle  \left\langle j^{2}-2j\left\langle j\right\rangle +\left\langle j\right\rangle ^{2}\right\rangle \ \ \ \ \ (4)
\displaystyle  \displaystyle  = \displaystyle  \left\langle j^{2}\right\rangle -\left\langle j\right\rangle ^{2} \ \ \ \ \ (5)

and the standard deviation is the (positive) square root of the variance:

\displaystyle  \sigma=\sqrt{\left\langle \left(\Delta j\right)^{2}\right\rangle }=\sqrt{\left\langle j^{2}\right\rangle -\left\langle j\right\rangle ^{2}} \ \ \ \ \ (6)

The probability of a value {j} being chosen at random from the set is

\displaystyle  P\left(j\right)=\frac{N\left(j\right)}{\sum_{j}N\left(j\right)} \ \ \ \ \ (7)

Example 1 Suppose we have a group of people with ages as follows:

age {j} {N\left(j\right)}
14 1
15 1
16 3
22 2
24 2
25 5

For this set, we have

\displaystyle   \left\langle j\right\rangle \displaystyle  = \displaystyle  \frac{294}{14}=21\ \ \ \ \ (8)
\displaystyle  \left\langle j\right\rangle ^{2} \displaystyle  = \displaystyle  441\ \ \ \ \ (9)
\displaystyle  \left\langle j^{2}\right\rangle \displaystyle  = \displaystyle  \frac{6434}{14}=459.57 \ \ \ \ \ (10)

The median age is between 22 and 24 (say, 23) since there are 7 people with ages greater than 23 and 7 with ages less than 23.

We can now add a column for {\Delta j}:

age {j} {N\left(j\right)} {\Delta j}
14 1 {-7}
15 1 {-6}
16 3 {-5}
22 2 1
24 2 3
25 5 4

Therefore

\displaystyle   \sigma^{2}=\left\langle \left(\Delta j\right)^{2}\right\rangle \displaystyle  = \displaystyle  \frac{260}{14}=18.57\ \ \ \ \ (11)
\displaystyle  \sigma \displaystyle  = \displaystyle  4.31 \ \ \ \ \ (12)

We can check equation 5

\displaystyle   \sigma^{2} \displaystyle  = \displaystyle  \left\langle j^{2}\right\rangle -\left\langle j\right\rangle ^{2}\ \ \ \ \ (13)
\displaystyle  \displaystyle  = \displaystyle  459.57-441=18.57 \ \ \ \ \ (14)

For continuous distributions, we need to use integrals instead of sums to calculate the various averages. To calculate the average of a function {f\left(x\right)}, we need the probability density {\rho\left(x\right)dx} which gives the probability that the value of {x} lies in the interval {\left(x,x+dx\right)}. Given this, we then have

\displaystyle  \left\langle f\left(x\right)\right\rangle =\int_{-\infty}^{\infty}f\left(x\right)\rho\left(x\right)dx \ \ \ \ \ (15)

Some special cases of this formula are used to calculate the average and variance:

\displaystyle   \left\langle x\right\rangle \displaystyle  = \displaystyle  \int_{-\infty}^{\infty}x\rho\left(x\right)dx\ \ \ \ \ (16)
\displaystyle  \left\langle x^{2}\right\rangle \displaystyle  = \displaystyle  \int_{-\infty}^{\infty}x^{2}\rho\left(x\right)dx \ \ \ \ \ (17)

A probability density must be normalized so that if {f\left(x\right)=1}:

\displaystyle  \int_{-\infty}^{\infty}\rho\left(x\right)dx=1 \ \ \ \ \ (18)

Example 2 Extending Griffiths’s example 1.1. A rock is dropped off a cliff of height {h}. Neglecting air resistance, the position of the rock at time {t} (using {x=0} as the top of the cliff and {x=h} as the bottom) is

\displaystyle  x\left(t\right)=\frac{1}{2}gt^{2} \ \ \ \ \ (19)

The time taken for the rock to hit the bottom of the cliff is

\displaystyle  T=\sqrt{\frac{2h}{g}} \ \ \ \ \ (20)

Now suppose that the position of the rock is randomly sampled a large number of times during its fall. If the sampling times are truly random, the probability of a sample being taken in any time interval {dt} is constant and since the probability that a given sample occurs sometime between {t=0} and {t=T} must be 1, we have

\displaystyle  \rho\left(t\right)dt=\frac{dt}{T} \ \ \ \ \ (21)

The average location of the rock over all the samples is then

\displaystyle   \left\langle x\right\rangle \displaystyle  = \displaystyle  \int_{0}^{T}x\left(t\right)\rho\left(t\right)dt\ \ \ \ \ (22)
\displaystyle  \displaystyle  = \displaystyle  \int_{0}^{T}\left(\frac{1}{2}gt^{2}\right)\frac{dt}{T}\ \ \ \ \ (23)
\displaystyle  \displaystyle  = \displaystyle  \frac{gT^{2}}{6}\ \ \ \ \ (24)
\displaystyle  \displaystyle  = \displaystyle  \frac{h}{3} \ \ \ \ \ (25)

Also

\displaystyle   \left\langle x^{2}\right\rangle \displaystyle  = \displaystyle  \int_{0}^{T}x^{2}\left(t\right)\rho\left(t\right)dt\ \ \ \ \ (26)
\displaystyle  \displaystyle  = \displaystyle  \int_{0}^{T}\left(\frac{1}{2}gt^{2}\right)^{2}\frac{dt}{T}\ \ \ \ \ (27)
\displaystyle  \displaystyle  = \displaystyle  \frac{g^{2}}{4}\frac{T^{4}}{5}\ \ \ \ \ (28)
\displaystyle  \displaystyle  = \displaystyle  \frac{h^{2}}{5} \ \ \ \ \ (29)

The standard deviation is

\displaystyle  \sigma=\sqrt{\left\langle x^{2}\right\rangle -\left\langle x\right\rangle ^{2}}=0.2981h \ \ \ \ \ (30)

To get the probability density for position {x} instead of time, we have

\displaystyle   \frac{dt}{T} \displaystyle  = \displaystyle  \frac{dt}{dx}\frac{dx}{T}\ \ \ \ \ (31)
\displaystyle  \displaystyle  = \displaystyle  \frac{dx}{gt}\sqrt{\frac{g}{2h}}\ \ \ \ \ (32)
\displaystyle  \displaystyle  = \displaystyle  \frac{dx}{g}\sqrt{\frac{g}{2x}}\sqrt{\frac{g}{2h}}\ \ \ \ \ (33)
\displaystyle  \displaystyle  = \displaystyle  \frac{dx}{2\sqrt{hx}}\ \ \ \ \ (34)
\displaystyle  \rho\left(x\right) \displaystyle  = \displaystyle  \frac{1}{2\sqrt{hx}} \ \ \ \ \ (35)

The probability of a sample being taken when {x} is more than {\sigma} away from the average is

\displaystyle  P_{\sigma}=\int_{0}^{\left(\frac{1}{3}-0.2981\right)h}\rho\left(x\right)dx+\int_{\left(\frac{1}{3}+0.2981\right)h}^{h}\rho\left(x\right)dx=0.393 \ \ \ \ \ (36)

We could also work this out without first finding {\rho\left(x\right)} by finding the times at which {x=\left(\frac{1}{3}\pm0.2981\right)h} from 19 and then integrating {\rho\left(t\right)} over the corresponding time range.

\displaystyle   t_{1} \displaystyle  = \displaystyle  \sqrt{\frac{2\left(\frac{1}{3}-0.2981\right)h}{g}}\ \ \ \ \ (37)
\displaystyle  t_{2} \displaystyle  = \displaystyle  \sqrt{\frac{2\left(\frac{1}{3}+0.2981\right)h}{g}}\ \ \ \ \ (38)
\displaystyle  P_{\sigma} \displaystyle  = \displaystyle  \frac{1}{T}\left[\int_{0}^{t_{1}}dt+\int_{t_{2}}^{T}dt\right]\ \ \ \ \ (39)
\displaystyle  \displaystyle  = \displaystyle  \sqrt{\frac{g}{2h}}\left[\sqrt{\frac{2\left(\frac{1}{3}-0.2981\right)h}{g}}+\sqrt{\frac{2h}{g}}-\sqrt{\frac{2\left(\frac{1}{3}+0.2981\right)h}{g}}\right]\ \ \ \ \ (40)
\displaystyle  \displaystyle  = \displaystyle  0.393 \ \ \ \ \ (41)

3 thoughts on “Average and standard deviation

  1. Pingback: Gaussian distribution | Physics pages

  2. Pingback: Triangular wave function: probabilities | Physics pages

Leave a Reply

Your email address will not be published. Required fields are marked *