Again, I'm doing my best to research all of the necessary background in statistics to help me but I'm getting the run-around - principally, because my stats vocabulary is stretched when diving deeper into topics.

I guess it is easier to just state what I'm attempting to do...

Let's say I have completed a survey of vehicle speeds (population, n=25000). I think that my histogram looks like a normal distribution. So, I calculate the following function for a normal distribution with my mean and standard deviation plugged in.

$$f(x) = \dfrac{1}{\sigma \sqrt{2\pi}} e^{-\dfrac{(x-\mu)^2}{2 \sigma^2}}$$

Firstly, (I think) this gives me the "density of probability" for any speed - of which I'm not quite sure what that means. I understand that the area under the curve of this equation will sum to 1, but I'm just not clear on what the density of probability actually represents in real world terms. A "probability" - yes, no problem. But a density of probability? No - not got it yet.

From my survey, I know how many observations there actually were in the bin that covers, say 30-32 mph. What I'd like to do is to calculate how many observations there would be expected to be for that same bin using the pdf equation above.

I understand that z-scores could be involved and that I may be able to subtract the area to the left of 30 from the area to the left of 32 which would give me the "area" of bin 30-32 (would I then multiply this area by the population size?). But I'm not clear on the relationship between "my" normal distribution (mean=28.04, std dev=6.7) and a standard normal distribution (mean=0, std dev=1) with respect to z-scores - or are z-scores even needed for what I'm attempting?

Any guidance/pointers welcome.


Let's forget about the Normal distribution in particular for a moment and consider an arbitrary continuous random variable $X$ of probability density $f_X(x)$. What this means is that $P(a\le X\le b)=\int_a^bf_X(x)dx$, and in particular $f_X(x)=\lim_{h\to0}P(x\le X\le x+h)$, so for very small $dx$ we have the approximation $P(x\le X\le x+dx)\approx f_X(x) dx$. If you allow "infinitesimal" $dx$, this becomes exact.

We can apply the ideas above to the case where $X$ is Normally distributed with $f_X(x)=f(x)$ for all $x$, on your definition of $f$. The substitution $z=\frac{x-\mu}{\sigma}$ tells$$P(a\le X\le b)=\int_a^b\frac{1}{\sigma\sqrt{2\pi}}\exp-\frac{(x-\mu)^2}{2\sigma^2}dx=\int_{\frac{a-\mu}{\sigma}}^{\frac{b-\mu}{\sigma}}\frac{1}{\sqrt{2\pi}}\exp-\frac{z^2}{2}dz.$$The $z$-score of $X$ is $Z=\frac{X-\mu}{\sigma}$, so $a\le X\le b$ iff $\frac{a-\mu}{\sigma}\le Z\le\frac{b-\mu}{\sigma}$. So regardless of the values of $\mu,\,\sigma$, arbitrary $c,\,d\in\Bbb R$ with $c<d$ satisfy$$P(c\le Z\le d)=\int_c^d\frac{1}{\sqrt{2\pi}}\exp-\frac{z^2}{2}dz.$$The case with $c=-\infty$ is often denoted $\Phi(d)$, and is expressible in terms of the error function as $\frac12\left[1+\operatorname{erf}\frac{d}{\sqrt{2}}\right]$. The more general integral is$$\frac12\left[1+\operatorname{erf}\frac{d}{\sqrt{2}}\right]-\frac12\left[1+\operatorname{erf}\frac{c}{\sqrt{2}}\right]=\frac12\left[\operatorname{erf}\frac{d}{\sqrt{2}}-\operatorname{erf}\frac{c}{\sqrt{2}}\right].$$

| cite | improve this answer | |
  • $\begingroup$ Thank you so much for taking the time to post that - I appreciate the effort in typing all those mathjax equations in. It helps a little but, unfortunately, I am not able to parse the answer in a fashion to get me where I want to be. I'm afraid the breadcrumbs are spaced too far apart! I will, however, research the error function more as referenced and hyperlinked in your kind response. $\endgroup$ – CapnAhab Feb 2 at 15:20

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.