17
$\begingroup$

I am trying to understand why the same data can be normally distributed if expressed in one way, but not normally distributed if expressed in another way.

I have a variable that is "time taken to walk 10 meters" (in seconds). This data is not normally distributed (Shapiro-Wilk: W = 0.632, df = 108, Sig. <0.001, +see "histogram 1" below).

I expressed this same variable as "speed" (in meters per second). I computed it by dividing 10 meters by the time taken to complete the distance, (ex. 14 sec to complete 10 meters becomes 10/14 = 0.71 m/s).

When I now check "speed" for normality, it is very much normally distributed (Shapiro-Wilk: W = 0.984, df = 108, Sig. = 0.234, +see "histogram 2" below).

Am I doing something wrong, or is there a logical explanation for this? While adding the tags, stackexchange mentioned "inverse Gaussian distribution" - is this what is happening here?

Histogram 1 Histogram 2

$\endgroup$
  • 11
    $\begingroup$ Re the title: Speeds (being non-negative) can't actually be Gaussian. They might sometimes be approximately Gaussian. Elapsed times like this are typically skew. $\endgroup$ – Glen_b -Reinstate Monica Jan 22 at 3:10
  • 3
    $\begingroup$ Whenever you are transforming data then the density distribution will change. You might get this more intuitively when you transform a uniform distributed variable. Say $X$ is uniform distributed between $0$ and $1$, then what is the distribution of $X^2$? For example, how often are you gonna expect $X^2>0.5$, will it be just as much as $X>0.5$? $\endgroup$ – Sextus Empiricus Jan 22 at 8:46
  • 2
    $\begingroup$ Another exercise. Draw two parallel lines. One with coordinates 0 to 100. Another with coordinates 0 to 1.2. For some evenly spaced points on that second line, say the points $0.1, 0.2, .... 1.1, 1.2$ draw points on the first line according to the transformation $10/x$. Do you recover evenly distributed points after that transformation? $\endgroup$ – Sextus Empiricus Jan 22 at 8:52
  • 8
    $\begingroup$ Normal distributions only stay normal under linear transformations. $\endgroup$ – Nick Cox Jan 22 at 11:50
  • 3
    $\begingroup$ Although some cultures want to see significance test results, the graphs show all that is important. Speed is slightly left or negatively skewed; time is strongly right or positively skewed. Although it may seem contradictory, I would not describe speed as normally distributed, but I would be happy to use it in regression or analysis of variance. A normal quantile plot (other names include normal probability plot, normal scores plot, probit plot) is the best graph to assess departure from normality. $\endgroup$ – Nick Cox Jan 22 at 11:53
33
$\begingroup$

The image below illustrates intuitively why the transformed variable has a different distribution:

I have drawn two parallel lines.

  • On the lowest line I have plotted evenly spaced points at $0.1, 0.2, ..., 1.1, 1.2$ which represent the velocity $v$.
  • On the upper line I have draw points according to the formula $t=0.1/v$ (note I reversed the axis it has 1.2 on the left and 0 on the right)

I have drawn lines connecting the different points. You can see that the evenly spaced points $v$ are not transforming into evenly spaced points $t$ but instead the points are more dense in the low values than in the high values.

This squeezing will happen also to the density distribution. The distribution of times $t$ will not be just the same as the distribution of $v$ with a transformed location. Instead you also get a factor that is based on how much the space gets stretched out or squeezed in.

  • For instance: The region $0.1 < v < 0.2$ gets spread out over a region $0.5 < t <1$ which is a region with a larger size. So the same probability to fall into a specific region gets spread out over a region with larger size.

  • Another example: The region $0.4 < v < 0.5$ gets squeezed into a region $0.2 < t <0.25$ which is a region with a smaller size. So the same probability to fall into a specific region gets compressed into a region with smaller size.

    In the image below these two corresponding regions $0.4 < v < 0.5$ and $0.2 < t <0.25$ and the area under the density curves are colored, the two different colored areas have the same area size.

So as the distribution for the times $g(t)$ you do not just take the distribution of the velocity $f(v)$ where you transform the variable $v=0.1/t$ (which actually already make the distribution look different than the normal curve, see the green curve in the image), but you also take into account the spreading/compressing of the probability mass over larger/smaller regions.

intuitive explanation

note: I have taken $t=0.1/v$ instead of $t = 100/v$ because this makes the two scales the same and makes the comparison of the two densities equivalent (when you squeeze an image then this will influence the density).


See more about transformations:

https://en.wikipedia.org/wiki/Random_variable#Functions_of_random_variables

The inverse of a normal distributed variable is more generally:

$$t = a/v \quad \text{with} \quad f_V(v) = \frac{1}{\sqrt{2 \pi \sigma^2}} e^{-\frac{1}{2}\frac{(v-\mu)^2}{\sigma^2}}$$

then

$$g_T(t) = \frac{1}{\sqrt{2 \pi \sigma^2}} \frac{a}{t^2} e^{-\frac{1}{2}\frac{(a/t-\mu)^2}{\sigma^2}}$$

you can find more about it by looking for the search term 'reciprocal normal distribution' https://math.stackexchange.com/search?q=reciprocal+normal+distribution

It is not the same as 'inverse Gaussian distribution', which relates to the waiting time in relation to Brownian motion with drift (which can be described by a Gaussian curve).

$\endgroup$
4
$\begingroup$

Yes, this is an instance of inverse Gaussian. It has been observed that there is an inverse relationship between the cumulant generating function of the time to cover a unit distance and the cumulant generating function of the distance covered in a unit time. Because the distance covered in a unit time (in this case, walking speed) is approximately normal, then the time to cover a unit distance (which is roughly the first-hitting time of 1-dimensional Brownian particle) is by definition approximately inverse Gaussian.

$\endgroup$
  • 8
    $\begingroup$ Just so as not to confuse other readers, it would be good to clarify that you are refering to the inverse of a Gaussian random variable, not to the distribution known as the "inverse Gaussian distribution" en.wikipedia.org/wiki/Inverse_Gaussian_distribution $\endgroup$ – Gordon Smyth Jan 22 at 0:49
  • 9
    $\begingroup$ I am sorry to say this answer is not correct. The inverse Gaussian distribution is not the distribution of the inverse of a Gaussian variable, despite the name; it is its own distribution, see en.wikipedia.org/wiki/Inverse_Gaussian_distribution. $\endgroup$ – jbowman Jan 22 at 0:49
  • $\begingroup$ ok, inverse of a Gaussian random variable, that makes perfect sense - does the distribution followed by this "inverse of a Gaussian random variable" have a name (aka, does Histogram 1 follow a distribution that has a name)? $\endgroup$ – Tib Jan 22 at 1:08
  • $\begingroup$ @jbowman - The article you referenced gives what was stated here as an example of the inverse Gaussian (it uses Brownian motion, but the idea is the same). This is not simply the inverse of a Gaussian distribution; the difference is the change in what is fixed in each. $\endgroup$ – Todd Burus Jan 22 at 1:11
  • 8
    $\begingroup$ "when speed is Gaussian ..., the related time to cover a fixed distance is inverse Gaussian" - this statement is not correct. The OP was explicitly referring to the "inverse Gaussian distribution" in the question, and it is simply not the case that the inverse of a Gaussian variate has an inverse Gaussian distribution. Note for one thing that the inverse of a Gaussian variate can take on negative values ($1/-2 = -1/2$) but an inverse Gaussian variate can only take on positive values. $\endgroup$ – jbowman Jan 22 at 1:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.