Difference between revisions of "RandomBinomial Command"

From GeoGebra Manual
Jump to: navigation, search
m (Text replace - "<div class="box info"> 48px|left This page is part of the official manual for print and pdf. For structural reasons normal users can't edit this page. If you found any errors on this page please contact )
Line 1: Line 1:
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
<noinclude>{{Manual Page|version=4.2}}</noinclude>
 
{{command|cas=true|probability}}
 
{{command|cas=true|probability}}
;RandomBinomial[ <Number n of Trials>, <Probability p> ]
+
;RandomBinomial[ <Number of Trials>, <Probability> ]
 
:Generates a random number from a binomial distribution with ''n'' trials and probability ''p''.
 
:Generates a random number from a binomial distribution with ''n'' trials and probability ''p''.
 
:{{example| 1=<div><code><nowiki>RandomBinomial[3, 0.1]</nowiki></code> gives ''j ∈ {0, 1, 2, 3}'', where the probability of getting ''j'' is the probability of an event with probability ''0.1'' occuring ''j'' times in three tries.</div>}}
 
:{{example| 1=<div><code><nowiki>RandomBinomial[3, 0.1]</nowiki></code> gives ''j ∈ {0, 1, 2, 3}'', where the probability of getting ''j'' is the probability of an event with probability ''0.1'' occuring ''j'' times in three tries.</div>}}
 
==CAS Syntax==
 
==CAS Syntax==
;RandomBinomial[ <Number n of Trials>, <Probability p> ]
+
;RandomBinomial[ <Number of Trials>, <Probability> ]
 
:Generates a random number from a binomial distribution with ''n'' trials and probability ''p''.
 
:Generates a random number from a binomial distribution with ''n'' trials and probability ''p''.
 
:{{example| 1=<div><code><nowiki>RandomBinomial[3, 0.1]</nowiki></code> gives ''j ∈ {0, 1, 2, 3}'', where the probability of getting ''j'' is the probability of an event with probability ''0.1'' occuring ''j'' times in three tries.</div>}}
 
:{{example| 1=<div><code><nowiki>RandomBinomial[3, 0.1]</nowiki></code> gives ''j ∈ {0, 1, 2, 3}'', where the probability of getting ''j'' is the probability of an event with probability ''0.1'' occuring ''j'' times in three tries.</div>}}
 +
 
{{Note|1= See also [[SetSeed Command|SetSeed command]], [[RandomBetween Command|RandomBetween command]], [[RandomElement Command|RandomElement command]], [[RandomNormal Command|RandomNormal command]], [[RandomPoisson Command|RandomPoisson command]], [[RandomUniform Command|RandomUniform command]].}}
 
{{Note|1= See also [[SetSeed Command|SetSeed command]], [[RandomBetween Command|RandomBetween command]], [[RandomElement Command|RandomElement command]], [[RandomNormal Command|RandomNormal command]], [[RandomPoisson Command|RandomPoisson command]], [[RandomUniform Command|RandomUniform command]].}}

Revision as of 14:17, 15 July 2013



RandomBinomial[ <Number of Trials>, <Probability> ]
Generates a random number from a binomial distribution with n trials and probability p.
Example:
RandomBinomial[3, 0.1] gives j ∈ {0, 1, 2, 3}, where the probability of getting j is the probability of an event with probability 0.1 occuring j times in three tries.

CAS Syntax

RandomBinomial[ <Number of Trials>, <Probability> ]
Generates a random number from a binomial distribution with n trials and probability p.
Example:
RandomBinomial[3, 0.1] gives j ∈ {0, 1, 2, 3}, where the probability of getting j is the probability of an event with probability 0.1 occuring j times in three tries.


© 2024 International GeoGebra Institute