Difference between revisions of "Pascal Command"
From GeoGebra Manual
m |
m (changed CAS syntax description) |
||
Line 1: | Line 1: | ||
<noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|cas=true|probability}} | <noinclude>{{Manual Page|version=5.0}}</noinclude> {{command|cas=true|probability}} | ||
;Pascal[ <Number of Successes>, <Probability of Success> ] | ;Pascal[ <Number of Successes>, <Probability of Success> ] | ||
− | : Returns a bar graph of a [ | + | : Returns a bar graph of a [[w:Negative binomial distribution|Pascal distribution]]. |
:''Parameters:'' | :''Parameters:'' | ||
::''Number of Successes'': number of independent Bernoulli trials that must be successful | ::''Number of Successes'': number of independent Bernoulli trials that must be successful | ||
Line 16: | Line 16: | ||
: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. | ||
− | + | :{{note|This command also works in the [[File:Menu view cas.svg|link=|16px]] [[CAS View]].}} | |
− | + | :{{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 ''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]].}} | |
− | |||
− | |||
− | : | ||
− | |||
− | |||
− | :{{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 ''0.12''.}} |
Revision as of 08:55, 1 October 2015
- Pascal[ <Number of Successes>, <Probability of Success> ]
- Returns a bar graph of a Pascal distribution.
- Parameters:
- Number of Successes: number of independent Bernoulli trials that must be successful
- Probability of Success: probability of success in one trial
- Pascal[ <Number of Successes>, <Probability of Success>, <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[ <Number of Successes>, <Probability of Success>, <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 CAS View.
- Example: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}, the variable value is v = 2 and "Cumulative" = false.
Pascal[ n, p, v, false]
yields 0.12 in the Algebra View and 25/216 in the CAS View.