# Documentation/Calc Functions/B

Jump to navigation
Jump to search

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

B

## Category:

Statistical Analysis

## Summary:

Returns the probability of a trial result using the binomial distribution.

## Syntax:

B(**Trials**; **SP**; **T1** [; **T2**])

## Returns:

Returns a real number which is the probability of a trial and hence it is between 0(inclusive) and 1(inclusive).

## Arguments:

**Trials** is the number of independent trials.

**SP** is the probability of success on each trial.

**T1** defines the lower limit for the number of trials.

**T2** defines the upper limit for the number of trials.

**T1**and**T2**lies between 0 and the independent number of trials for the function,i.e. [0,**Trials**].- If
**Trials**are a non-integer value, then the function truncates it to an integer. - If
**Trials**,**T1**or**T2**are less than zero, then the function returns an error value. - If
**T1**is greater than**T2**, then the function returns an error value. - If
**T2**greater than (**Trials**+ 1), then the function returns an error value. - If
**SP**is greater than 1 or less than 0, then the function returns an error value.

## Additional details:

For more details on Binomial distribution, visit **Wikipedia**.

## Examples:

Formula | Description | Returns |
---|---|---|

=B(10;1/6;2) | The function calculates the probability that a 6 will come up exactly twice in 10 throws of a single dice, assuming that the probability of a 6 (or any other number) coming up on a single throw is 1/6. | 0.290710049201722 |

=B(10;1/6;3) | The function calculates the probability that a 6 will come up exactly thrice in 10 throws of a single dice, assuming that the probability of a 6 (or any other number) coming up on a single throw is 1/6. | 0.155045359574252 |

=B(10;1/6;2;3) | The function calculates the sum of the probability that a 6 will come up exactly 2 times and 3 times, separately, in 10 throws of a single dice, assuming that the probability of a 6 (or any other number) coming up on a single throw is 1/6. | 0.445755408775974 |

=B(10;1/6;2;10) | The function calculates the sum of the probability that a 6 will come up exactly 2 times, 3 times, 4 times,...and 10 times, separately, in 10 throws of a single dice, assuming that the probability of a 6 (or any other number) coming up on a single throw is 1/6. | 0.515483251330463 |

=B(10;1/6;2;11) | There is no case possible when 11 times 6 appears for 10 throws hence the function returns an error value. | Err:502 |

## Related LibreOffice functions:

## ODF standard:

None

## Equivalent Excel functions:

None