Difference between revisions of "Pascal 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 )
(correct definition of Pascal Distribution)
 
(12 intermediate revisions by 4 users not shown)
Line 1: Line 1:
<noinclude>{{Manual Page|version=4.2}}</noinclude>
+
<noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|cas=true|probability}}
{{command|cas=true|probability}}
+
;Pascal( <n>, &lt;p> )
;Pascal[ <Number of Successes r>, <Probability of Success p> ]
+
: Returns a bar graph of a [[w:Negative binomial distribution|Pascal distribution]].
: Returns a bar graph of a [http://mathworld.wolfram.com/NegativeBinomialDistribution.html Pascal distribution].
+
 
:''Parameters:''
+
The Pascal distribution models the number of failures before the ''n''th success in repeated mutually independent Bernoulli trials, each with probability of success ''p''.
::''Number of Successes'': number of independent Bernoulli trials that must be successful
+
 
::''Probability of Success'': probability of success in one trial 
+
;Pascal( <n>, &lt;p>, <Boolean Cumulative> )
;Pascal[ <Number of Successes>, <Probability of Success>, <Boolean Cumulative> ]
+
:Returns a bar graph of a Pascal distribution when ''Cumulative'' = false.  
:Returns a bar graph of a Pascal distribution when ''Cumulative'' = false.
+
:Returns a graph of a cumulative Pascal distribution when ''Cumulative'' = true.
:Returns a bar graph of a cumulative Pascal distribution when ''Cumulative'' = true.
 
 
:First two parameters are same as above.
 
:First two parameters are same as above.
;Pascal[ <Number of Successes>, <Probability of Success>, <Variable Value v>, <Boolean Cumulative> ]
+
 
:Let X be a Pascal random variable.
+
;Pascal( <n>, &lt;p>, <Variable Value>, <Boolean Cumulative> )
:Returns P( X = ''v'') when ''Cumulative'' = false.
+
:Let X be a Pascal random variable and ''v'' the variable value.
 +
:Returns P( X = ''v'') when ''Cumulative'' = false.  
 
:Returns P( X ≤ ''v'') when ''Cumulative'' = true.
 
:Returns P( X ≤ ''v'') when ''Cumulative'' = true.
 
:First two parameters are same as above.
 
:First two parameters are same as above.
==CAS Syntax==
+
:{{note|This command also works in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]].}}
;Pascal[ <Number of Successes>, <Probability of Success>, <Variable Value v>, <Boolean Cumulative> ]
+
:{{example|1=<div>If the number of independent Bernoulli trials that must be successful is n = 1, the probability of success in one trial is p = <math>\frac{1}{6}</math>, then the probability of 2 failures before the success is given by</div> <code><nowiki> Pascal(1, 1/6, 2, false)</nowiki></code> which yields ''0.12'' in the [[File:Menu view algebra.svg|link=|16px]] [[Algebra View]] and ''25/216'' in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]].}}
:Let X be a Pascal random variable.
 
:Returns P( X = ''v'') when ''Cumulative'' = false. 
 
:Returns P( X ≤ ''v'') when ''Cumulative'' = true.
 
:{{example|1=<div> The number of independent Bernoulli trials that must be successful is n = 1, the probability of success in one trial is p = <math>\frac{1}{6}</math>, the variable value is v = 2 and "Cumulative" = false. </div> <code><nowiki> Pascal[ n, p, v, false]</nowiki></code> yields ''<math>\frac{25}{216}</math>''}}
 

Latest revision as of 18:20, 27 March 2018


Pascal( <n>, <p> )
Returns a bar graph of a Pascal distribution.

The Pascal distribution models the number of failures before the nth success in repeated mutually independent Bernoulli trials, each with probability of success p.

Pascal( <n>, <p>, <Boolean Cumulative> )
Returns a bar graph of a Pascal distribution when Cumulative = false.
Returns a graph of a cumulative Pascal distribution when Cumulative = true.
First two parameters are same as above.
Pascal( <n>, <p>, <Variable Value>, <Boolean Cumulative> )
Let X be a Pascal random variable and v the variable value.
Returns P( X = v) when Cumulative = false.
Returns P( X ≤ v) when Cumulative = true.
First two parameters are same as above.
Note: This command also works in the Menu view cas.svg CAS View.
Example:
If the number of independent Bernoulli trials that must be successful is n = 1, the probability of success in one trial is p = \frac{1}{6}, then the probability of 2 failures before the success is given by
Pascal(1, 1/6, 2, false) which yields 0.12 in the Menu view algebra.svg Algebra View and 25/216 in the Menu view cas.svg CAS View.
© 2024 International GeoGebra Institute