FR/Documentation/Calc: fonction PROBABILITE

From Apache OpenOffice Wiki
< FR‎ | Documentation
Revision as of 12:54, 25 September 2008 by Sgauti (talk | contribs) (New page: __NOTOC__ == PROBABILITE == Renvoie un résultat à partir d'une liste de probabilités. === Syntaxe : === <tt>'''PROBABILITE(valeurs; probabilités; début; fin)'''</tt> : <tt>'''valeu...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search


PROBABILITE

Renvoie un résultat à partir d'une liste de probabilités.

Syntaxe :

PROBABILITE(valeurs; probabilités; début; fin)

valeurs est une plage ou une matrice de nombres (par forcément ordonnés).
probabilités est une plage ou une matrice de nombre de la même taille que valeurs, indiquant la probabilité correspondante (>0 and <=1) que chaque valeur dans valeurs advienne. Les nombres dans probabilités doit correspondre à la somme 1 exactement.
PROBABILITE trouve toutes les valeurs qui sont entre début et fin inclusif et renvoie la somme de leurs probabilités correspondantes.
fin peut être omis, dans ce cas PROBABILITE renvoie la probabilité correspondant à début (ou 0 if start is not present in values).


Advanced topic: PROB evaluates the values and probabilities parameters as array formulas - see the examples.

Example:

PROB({3; 4; 5; 6}; {0.2; 0.4; 0.3; 0.1}; 4; 6)

returns 0.8, the sum of the probabilities for 4, 5 and 6.

PROB({2.2; 5; 1}; {0.5; 0.3; 0.2}; 0; 3)

returns 0.7, the sum of the probabilities for 1 and 2.2.

PROB({3; 4; 5; 6}; {0.2; 0.4; 0.3; 0.1}; 4)

returns 0.4, the probability for 4.


Evaluation as an array formula:

PROB(A1:A2*2; B1:B2; 2)

where cells A1, A2 contain 1, 4 and cells B1, B2 contain 0.3, 0.7, returns 0.3. PROB forces evaluation of values as an array formula, so that A1:A2*2 yields the array {2 | 8}. Thus PROB({2 | 8}; B1:B2; 2) is actually evaluated to give the result.

PROB(A1:A2; B1:B2/100; 4)

where cells A1, A2 contain 1, 4 and cells B1, B2 contain 30, 70, returns 0.7. PROB forces evaluation of probabilities as an array formula, so that B1:B2/100 yields the array {0.3 | 0.7}. Cells B1 and B2 effectively contain percentages here.

See also:

Statistical functions

Using Arrays

Functions listed alphabetically, Functions listed by category

Issues:

  • If start is given as a range (eg D4:D5) and the formula entered in scalar (non-array) mode then the top left value of the range appears to be evaluated, rather than the intersection of the range and the formula cell row/colum. This is a minor issue which is recorded in issue 88967.
Personal tools