http://learn.cemetech.net/index.php?title=TI-BASIC:Randnorm&feed=atom&action=historyTI-BASIC:Randnorm - Revision history2024-03-28T20:49:17ZRevision history for this page on the wikiMediaWiki 1.34.0http://learn.cemetech.net/index.php?title=TI-BASIC:Randnorm&diff=681&oldid=prevMaintenance script: Initial automated import2016-02-24T18:13:17Z<p>Initial automated import</p>
<p><b>New page</b></p><div>{{Template:TI-BASIC:Command<br />
|picture=RANDNORM.GIF<br />
|summary=Generates a random normally-distributed number with specified mean and standard deviation.<br />
|syntax=randNorm(''µ'',''σ'',[''n''])<br />
|location=Press:<br />
# MATH to access the [[TI-BASIC:Math|Math]] menu.<br />
# LEFT to access the PRB submenu.<br />
# 6 to select randNorm(, or use arrows.<br />
|compatibility=TI-83/84/+/SE<br />
|size=2 bytes<br />
}}<br />
<br />
randNorm(''µ'',''σ'') generates a normally-distributed pseudorandom number with [[TI-BASIC:Mean|Mean]] ''µ'' and [[TI-BASIC:Stddev|standard deviation]] ''σ''. The result returned will most probably be within the range ''µ''±3''σ''. randNorm(''µ'',''σ'',''n'') generates a list of ''n'' normally-distributed pseudorandom numbers with mean ''µ'' and standard deviation ''σ''.<br />
<br />
''seed''→rand affects the output of randNorm(.<br />
<br />
0→rand<br />
0<br />
randNorm(0,1)<br />
-1.585709623<br />
randNorm(0,1,3)<br />
{-1.330473604 1.05074514 -.0368606663}<br />
<br />
Although a theoretical normally distributed variable could take on any real value, numbers on a calculator have a limited precision, which leads to a maximum range of approximately ''µ''±7.02''σ'' for values of randNorm(.<br />
<br />
= Optimization =<br />
<br />
When the mean is 0 and the standard deviation 1, [[TI-BASIC:Invnorm|InvNorm(]]rand) and invNorm(rand(N)) save space over randNorm(0,1) and randNorm(0,1,N) respectively.<br />
<br />
= Formulas =<br />
<br />
The value of randNorm( for a given seed can be expressed in terms of [[TI-BASIC:Rand|Rand]]:<br />
<br />
<br />
randNorm(µ,σ)=µ-σinvNorm(rand<br />
<br />
<br />
This is identical to the output of randNorm( in the sense that for the same seed, both expressions will generate the same random numbers.<br />
<br />
The following formula can be used to get a target interval where A and B are two real intervals.<br />
<br />
<br />
µ=(A+B)/2<br />
σ=(-A+B)/6<br />
<br />
<br />
= Related Commands =<br />
<br />
* [[TI-BASIC:Rand|Rand]]<br />
* [[TI-BASIC:Randint|RandInt(]]<br />
* [[TI-BASIC:Randbin|RandBin(]]<br />
* [[TI-BASIC:Randm|RandM(]]<br />
* [[TI-BASIC:Randintnorep|randIntNoRep(]][[Category:TI-BASIC]]<br />
[[Category:TIBD]]</div>Maintenance script