<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ARandbin</id>
	<title>TI-BASIC:Randbin - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://learn.cemetech.net/index.php?action=history&amp;feed=atom&amp;title=TI-BASIC%3ARandbin"/>
	<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Randbin&amp;action=history"/>
	<updated>2026-04-17T18:54:10Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.3</generator>
	<entry>
		<id>http://learn.cemetech.net/index.php?title=TI-BASIC:Randbin&amp;diff=585&amp;oldid=prev</id>
		<title>Maintenance script: Initial automated import</title>
		<link rel="alternate" type="text/html" href="http://learn.cemetech.net/index.php?title=TI-BASIC:Randbin&amp;diff=585&amp;oldid=prev"/>
		<updated>2016-02-24T18:08:36Z</updated>

		<summary type="html">&lt;p&gt;Initial automated import&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;{{Template:TI-BASIC:Command&lt;br /&gt;
|picture=RANDBIN.GIF&lt;br /&gt;
|summary=Generates a random number with the binomial distribution.&lt;br /&gt;
|syntax=randBin(&amp;#039;&amp;#039;n&amp;#039;&amp;#039;,&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;# simulations&amp;#039;&amp;#039;)&lt;br /&gt;
|location=Press:&lt;br /&gt;
# MATH to access the [[TI-BASIC:Math|Math]] menu.&lt;br /&gt;
# LEFT to access the PRB submenu.&lt;br /&gt;
# 7 to select randBin(, or use arrows.&lt;br /&gt;
|compatibility=TI-83/84/+/SE&lt;br /&gt;
|size=2 bytes&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
randBin(&amp;#039;&amp;#039;n&amp;#039;&amp;#039;,&amp;#039;&amp;#039;p&amp;#039;&amp;#039;) generates a pseudorandom integer between 0 and &amp;#039;&amp;#039;n&amp;#039;&amp;#039; inclusive according to the binomial distribution B(&amp;#039;&amp;#039;n&amp;#039;&amp;#039;,&amp;#039;&amp;#039;p&amp;#039;&amp;#039;) - that is, &amp;#039;&amp;#039;n&amp;#039;&amp;#039; trials of an event with probability of success &amp;#039;&amp;#039;p&amp;#039;&amp;#039; are performed, and the number of successes is returned. randBin(&amp;#039;&amp;#039;n&amp;#039;&amp;#039;,&amp;#039;&amp;#039;p&amp;#039;&amp;#039;,&amp;#039;&amp;#039;simulations&amp;#039;&amp;#039;) performs the above calculation &amp;#039;&amp;#039;simulations&amp;#039;&amp;#039; times, and returns a list of the results. The expected (average) result is &amp;#039;&amp;#039;n&amp;#039;&amp;#039;*&amp;#039;&amp;#039;p&amp;#039;&amp;#039;.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;n&amp;#039;&amp;#039; should be an integer greater than or equal to 1, while &amp;#039;&amp;#039;p&amp;#039;&amp;#039; should be a real number between 0 and 1 inclusive.&lt;br /&gt;
&lt;br /&gt;
&amp;#039;&amp;#039;seed&amp;#039;&amp;#039;→rand affects the output of randBin(&lt;br /&gt;
&lt;br /&gt;
 0→rand&lt;br /&gt;
      0&lt;br /&gt;
 randBin(5,1/2&lt;br /&gt;
      2&lt;br /&gt;
 randBin(5,1/2,10&lt;br /&gt;
      {3 3 2 4 3 2 2 2 4 3}&lt;br /&gt;
&lt;br /&gt;
= Formulas =&lt;br /&gt;
&lt;br /&gt;
The value of randBin( for a given seed can be expressed in terms of [[TI-BASIC:Rand|Rand]]:&lt;br /&gt;
&lt;br /&gt;
 randBin(N,P)=sum(P&amp;gt;rand(N&lt;br /&gt;
&lt;br /&gt;
This is identical to the output of randBin( in the sense that for the same seed, both expressions will generate the same random numbers.&lt;br /&gt;
&lt;br /&gt;
= Error Conditions =&lt;br /&gt;
&lt;br /&gt;
* &amp;#039;&amp;#039;&amp;#039;[[TI-BASIC:Errors#domain|ERR:DOMAIN]]&amp;#039;&amp;#039;&amp;#039; is triggered if the probability is not on the interval from 0 to 1.&lt;br /&gt;
&lt;br /&gt;
= Related Commands =&lt;br /&gt;
&lt;br /&gt;
* [[TI-BASIC:Rand|Rand]]&lt;br /&gt;
* [[TI-BASIC:Randint|RandInt(]]&lt;br /&gt;
* [[TI-BASIC:Randnorm|RandNorm(]]&lt;br /&gt;
* [[TI-BASIC:Randm|RandM(]]&lt;br /&gt;
* [[TI-BASIC:Randintnorep|randIntNoRep(]][[Category:TI-BASIC]]&lt;br /&gt;
[[Category:TIBD]]&lt;/div&gt;</summary>
		<author><name>Maintenance script</name></author>
	</entry>
</feed>