Cumulative distribution function of the uniform distribution
This functionality does not run in MATLAB.
stats::uniformCDF(a
, b
)
stats::uniformCDF(a, b)
returns a procedure
representing the cumulative distribution function
of the uniform distribution on the interval [a, b].
The procedure f := stats::uniformCDF(a, b)
can
be called in the form f(x)
with an arithmetical
expression x
. The return value of f(x)
is
either a floatingpoint number or a symbolic expression:
If x < a can
be decided, then f(x)
returns 0.
If x > b can
be decided, then f(x)
returns the value 1.
If a ≤ x and x ≤ b can
be decided, then f(x)
returns the value (x
 a)/(b  a)
.
If x is a real floatingpoint number and both a and b can be converted to real floatingpoint numbers, then these values are returned as floatingpoint numbers. Otherwise, symbolic expressions are returned.
The function f
reacts to properties of identifiers
set via assume
.
If x is
a symbolic expression with the property x ≤ a,
or x ≥ b,
or a ≤ x and x ≤ b,
then the corresponding values are returned.
f(x)
returns the symbolic call stats::uniformCDF(a,
b)(x)
if it cannot be decided whether x lies
in the interval [a, b].
Numerical values for a
and b
are
only accepted if they are real and a ≤ b.
The function is sensitive to the environment variable DIGITS
which
determines the numerical working precision.
We evaluate the cumulative distribution function on the interval [ 3, 2 π] at various points:
f := stats::uniformCDF(3, 2*PI): f(infinity), f(3), f(0.5), f(2/3), f(3.0), f(PI), f(infinity)
delete f:
If x
is a symbolic object without properties,
then it cannot be decided whether a ≤ x ≤ b holds.
A symbolic function call is returned:
f := stats::uniformCDF(a, b): f(x)
With suitable properties, it can be decided whether a ≤ x ≤ b holds. An explicit expression is returned:
assume(x < a): f(x)
Note that assume(x < a)
attached properties
both to a
and x
. With the next
call, we overwrite the property attached to x.
However, the property attached to a has
to be 'unassumed' as well to avoid
inconsistent assumptions x < a and x > b:
unassume(a): assume(x > b): f(x)
assume(a <= x <= b): f(x)
assume(b > a): f(a + (b  a)/3)
unassume(x): unassume(a): unassume(b): delete f:
We use symbolic arguments:
f := stats::uniformCDF(a, b): f(3), f(3.0)
When numerical values are assigned to a and b,
the function f
starts to produce numerical values:
a := 0: b := PI: f(3), f(3.0)
delete f, a, b:

arithmetical expressions representing real values; a ≤ b is assumed. 