BINOMDIST

BINOMDIST(number_s, trials, probability_s, cumulative)[source]

Calculates the binomial distribution probability mass (PMF) or cumulative distribution (CDF).

BINOMDIST evaluates either the probability mass function (PMF) or the cumulative distribution function (CDF) of the binomial distribution for the given input(s).

Parameters:
  • number_s (Operand | int | float) – The number of successes in the trials.

  • trials (Operand | int | float) – The number of independent trials.

  • probability_s (Operand | int | float) – The probability of success on each trial (must be between 0 and 1).

  • cumulative (Operand | bool) –

    Boolean flag to determine calculation type:

    • False / 0: PMF

    • True / 1: CDF

Return type:

Formula

Returns:

A formula object evaluating to the binomial distribution value(s).

  • Returns DECIMAL if all inputs are scalar

  • Returns DECIMAL_ARRAY if any input is an array

Raises:
  • ValueError – If number_s, trials, or probability_s are not numeric types

  • ValueError – If cumulative is not boolean-compatible

Examples

Probability mass function (PMF):

BINOMDIST(3, 10, 0.5, False)
# Returns the probability of exactly 3 successes in 10 trials

Cumulative distribution function (CDF):

BINOMDIST(3, 10, 0.5, True)
# Returns the probability of at most 3 successes in 10 trials

Array inputs:

BINOMDIST(my_table["successes"], 10, 0.5, True)
# Returns an array of CDF values for each row

``x`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

``arg_2`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

``arg_3`` — accepted types

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

``cumulative`` — accepted types

  • BOOLEAN

  • BOOLEAN_ARRAY

  • DECIMAL

  • DECIMAL_ARRAY

  • INTEGER

  • INTEGER_ARRAY

Return types

  • DECIMAL

  • DECIMAL_ARRAY