Zero-width histogram bin?

487 Views Asked by At

I want to plot a histogram of some timing data. The timing data, represented by a continuous variable t, is binned as follows:

t=0
0<t<=1
1<t<=2
2<t<=3
3<t<=4

I have frequency data for each bin. To plot this as a histogram, I understand that I ought to use frequency density; that is, the frequency divided by the bin width. But my first bin has zero width! How can one cope with this?

1

There are 1 best solutions below

0
On BEST ANSWER

For data that are analytically derived, where some positive percentage of the data occur at a single exact value and others may be found throughout some interval(s) on the real line, a cumulative distribution function (CDF) is one way to clearly graph the data.

If this actually is a probability distribution of a random variable $X$, the CDF is given by $F(t) = P(X \leq t)$. For the situation described in the question, where only values $t \geq 0$ can occur, you would have $F(t) = 0$ for all $t < 0$, then $F(t) = P_0$ for $t = 0$, where $P_0$ is the fraction of data that fall at $t = 0$ exactly, and $F(t)$ is increasing for all $t > 0$ where the probability density at $t$ is positive, $F(t)$ constant anywhere else.

This also works for data that are not random but that act like a probability distribution, in this example a certain percentage at one exact value, a certain percentage distributed in the interval $(0,1]$, a certain percentage in the interval $(1,2]$, and so forth. If all you had available (or all you wanted to determine) was the frequencies for each of these bins and for the value $t=0$, you could interpolate a straight line segment from $(0,P_0)$ to $(1,P_0 + P_1)$ where $P_1$ was the fraction of data falling in the interval $(0,1]$.