Property | Value |
---|---|
Hex Value | $BB0B |
Categories |
|
Localizations |
|
randBin(
Overview
Generates and displays a random real number from a specified Binomial distribution.
Availability: Token available everywhere.
Syntax
randBin(numtrials,prob[,numsimulations])
Arguments
Name | Type | Optional |
---|---|---|
numtrials | ||
prob | ||
numsimulations | Yes |
Location
math, PRB
, 7:randBin(
Description
randBin(n,p) generates a pseudorandom integer between 0 and n inclusive according to the binomial distribution B(n,p) - that is, n trials of an event with probability of success p are performed, and the number of successes is returned. randBin(n,p,simulations) performs the above calculation simulations times, and returns a list of the results. The expected (average) result is n*p.
n should be an integer greater than or equal to 1, while p should be a real number between 0 and 1 inclusive.
seed→rand affects the output of randBin(
0→rand
0
randBin(5,1/2
2
randBin(5,1/2,10
{3 3 2 4 3 2 2 2 4 3}
Formulas
The value of randBin( for a given seed can be expressed in terms of rand:
randBin(N,P)=sum(P>rand(N
This is identical to the output of randBin( in the sense that for the same seed, both expressions will generate the same random numbers.
Error Conditions
- ERR:DOMAIN is triggered if the probability is not on the interval from 0 to 1.
Related Commands
Source: parts of this page were written by the following TI|BD contributors: DarkerLine, GoVegan, MrTanookiMario, nap386, Timothy Foster, Xeda Elnara.
History
Calculator | OS Version | Description |
---|---|---|
TI-83 | 0.01013 | Added |