prob
Probability that a value falls in a range, given a discrete distribution.
Syntax
Section titled “Syntax”v = prob(x_range, prob_range)v = prob(x_range, prob_range, low_limit)v = prob(x_range, prob_range, low_limit, upper_limit)Description
Section titled “Description”Sums prob_range(i) over all i for which x_range(i) falls in [low_limit, upper_limit]. With only low_limit, returns P(X = low_limit). The prob_range values must sum to 1.
Example
Section titled “Example”prob([1 2 3 4], [0.1 0.2 0.4 0.3], 2, 3) % 0.6See also
Section titled “See also”frequency— Frequency distribution (counts in bins).