PROBABILITY AND SOLID GEOMETRY CHECKS

Checking a uniform interval probability from two cumulative values

Get the probability that a uniform variable falls between two values by subtracting the cumulative probability at the lower value from the one at the upper value.

Cumulative probability measures everything up to a point

The cumulative distribution function at x gives the probability that the variable is at most x. It accumulates from the left end of the support. To find the probability that the variable lies between two values, you take the accumulated probability up to the upper value and remove the part that lies below the lower one. That is a subtraction, F(upper) minus F(lower). This page applies it to a continuous uniform model on the interval from 2 to 10, using the Continuous Uniform Distribution Calculator to read the cumulative values.

Reading the two cumulative values

For a uniform model on [a, b], the cumulative probability is (x minus a) over (b minus a) inside the support, zero below a and one above b. With a = 2 and b = 10, the support has length 8. At x = 4 the cumulative probability is 2 over 8, or 0.25. At x = 7 it is 5 over 8, or 0.625. The calculator returns those two values. Subtracting gives 0.625 minus 0.25, which is 0.375, the probability that the variable falls between 4 and 7. The interval has length 3 and the full support has length 8, and 3 over 8 equals 0.375.

The shortcut through length

For a uniform model, the subtraction always reduces to the interval length divided by the support length. That is why a uniform variable is described as equally likely anywhere in its range. The Basic calculator with 3 divided by 8 returns 0.375, matching the cumulative difference. The shortcut is convenient, but it works only for a uniform model and only when both endpoints lie inside the support. When one endpoint is outside, clip it to the support first. The cumulative approach handles clipping automatically, since the function is zero below the support and one above. For the model on 2 to 10, the probability of exceeding 7 is 1 minus 0.625, or 0.375, which equals the length 3 from 7 to 10 divided by 8. The probability of falling below 4 is 0.25, and the three pieces below 4, between 4 and 7, and above 7 add up to 0.25 plus 0.375 plus 0.375, which is 1.

Density is not probability

The calculator also reports the density, 1 over (b minus a), which is 0.125 for this model. It is the same at every interior point. A density gives probability per unit length, so the probability of an interval is density times length: 0.125 times 3 equals 0.375. Reading 0.125 as the probability of the interval is a common error. The density can also exceed 1 when the support is short. A uniform model on an interval of length 0.5 has density 2, and no probability is above 1. Probabilities always come from areas under the density.

A second example: a model on 0 to 60

Consider, as an illustration, a variable uniform over 0 to 60, such as an arrival time within an hour. The probability of falling between 15 and 40 is F(40) minus F(15). The calculator gives F(40) = 0.666667 and F(15) = 0.25, so the interval probability is 0.416667, which is 25 over 60. The density is 1 over 60, about 0.016667. The probability of arriving after minute 45 is 1 minus F(45), which is 0.25. The same subtraction logic covers the upper tail, because F equals 1 at the top of the support.

Endpoints do not matter in a continuous model

For a continuous variable, the probability of exactly one value is zero. Therefore P(4 < X < 7), P(4 ≤ X ≤ 7) and the mixed versions are all 0.375. This differs from discrete models, where including or excluding an endpoint changes the probability. For a discrete count you must be careful whether "between" is inclusive. For a continuous uniform model the cumulative difference works with no adjustment, which is one reason cumulative functions are used for interval probabilities.

Values outside the support

Entering a value below the lower bound gives a cumulative probability of 0. For a model on 2 to 10, x = 1 gives 0. Entering a value above the upper bound gives 1. At x = 12 the calculator returns a cumulative probability of 1 and a density of 0. These boundary behaviors let you handle intervals that stick out of the support. The probability between 1 and 4 is F(4) minus F(1), which is 0.25 minus 0, or 0.25, the same as the probability between 2 and 4. Always check that your interval of interest overlaps the support.

Parameters and common slips

The inputs are the lower bound a, the upper bound b and the evaluation point x. A frequent slip is to enter the interval length as b, for example b = 8 instead of 10, which describes a model on 2 to 8 instead of 2 to 10. Another is to subtract in the wrong order and get a negative probability. A negative result is a sign that the lower and upper values were swapped. If b is not greater than a, the model is not defined. Check that the cumulative probability at the upper value is at least as large as at the lower one. Percent values are another trap: the calculator returns probabilities between 0 and 1, so 0.375 corresponds to 37.5 percent, and multiplying by 100 is a presentation step you do afterward. Keep the bounds in the same unit as the evaluation points, for example all in minutes, and avoid mixing minutes with seconds in one calculation.

What the model assumes

The calculation is for a supplied continuous uniform model, in which every equal-length subinterval of the support has the same probability. It does not decide whether a real variable is uniform, and it does not estimate bounds from data. Many real quantities are not uniform at all. The check shows how a cumulative difference isolates an interval, and the arithmetic generalizes to other distributions by using their own cumulative functions. For a normal, exponential or binomial model, the same subtraction F(upper) minus F(lower) gives the interval probability, with the caveat for discrete models that the lower end must be stepped down by one unit when the lower value itself is to be included. The uniform case is the simplest place to learn the pattern, because the cumulative function is a straight line and every value can be checked by hand.

Reproduce the checks

Lower cumulative value

Open the Continuous Uniform Distribution Calculator and enter:

Lower bound
2
Upper bound
10
Threshold
4

Expected output:

Cumulative probability

0.25

Probability density

0.125

The lower boundary is two units into the support.

Upper cumulative value

Open the Continuous Uniform Distribution Calculator and enter:

Lower bound
2
Upper bound
10
Threshold
7

Expected output:

Cumulative probability

0.625

Probability density

0.125

Subtract the lower cumulative value from this one.

Interval fraction

Open the Basic calculator and enter:

First number
3
Operation
divide
Second number
8

Expected output:

Result

0.375

The uniform interval probability matches its relative length.

References and implementation scope

The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.

Sources

Related tasks