PROB function

PROB(Values, Probabilities, Start?, End?) PROB(Values; Probabilities; Start?; End?)

Values

{ Number }

An array of possible values, where the corresponding probabilities are given as the probabilities parameter. This array must have the same size as the probabilities parameter.

Probabilities

{ Number }

The probabilities associated with the corresponding elements of the values array (ranging from 0, exclusive, to 1, inclusive). This array must have the same size as the values parameter. The sum of all elements of this array must be 1.

Start

Number or { Number } (optional)

The start value of the interval whose probabilities are summed. If omitted, it is assumed to be 0.

End

Number or { Number } (optional)

The end value of the interval whose probabilities are summed. If omitted, it is assumed to be equal to the start parameter.

Returns

Number or { Number }

The probability that a sample value is inside a given interval.

Returns the probability that a value is inside a given interval. It does this by finding all values which are inside the given interval and returning the sum of their probabilities.

Examples

PROB({ 3, 4, 5, 6 }, { 0.2, 0.4, 0.3, 0.1 }, 4, 6)PROB({ 3; 4; 5; 6 }; { 0,2; 0,4; 0,3; 0,1 }; 4; 6)

Returns 0.8, the sum of the probabilities for 4, 5 and 6. Calculation: 0.2 * 0 + 0.4 * 1 + 0.3 * 1 + 0.1 * 1 = 0.80,2 * 0 + 0,4 * 1 + 0,3 * 1 + 0,1 * 1 = 0,8.

PROB({ 2.2, 5, 1 }, { 0.5, 0.3, 0.2 }, 0, 3)PROB({ 2,2; 5; 1 }; { 0,5; 0,3; 0,2 }; 0; 3)

Returns 0.7, the sum of the probabilities for 1 and 2.2. Calculation: 0.5 * 1 + 0.3 * 0 + 0.2 * 1 = 0.70,5 * 1 + 0,3 * 0 + 0,2 * 1 = 0,7.

PROB({ 3, 4, 5, 6 }, { 0.2, 0.4, 0.3, 0.1 }, 4)PROB({ 3; 4; 5; 6 }; { 0,2; 0,4; 0,3; 0,1 }; 4)

Returns 0.4, the probability for 4: Calculation: 0.2 * 0 + 0.4 * 1 + 0.3 * 0 + 0.1 * 0 = 0.40,2 * 0 + 0,4 * 1 + 0,3 * 0 + 0,1 * 0 = 0,4.