Participer au site avec un Tip
Rechercher
 

Améliorations / Corrections

Vous avez des améliorations (ou des corrections) à proposer pour ce document : je vous remerçie par avance de m'en faire part, cela m'aide à améliorer le site.

Emplacement :

Description des améliorations :

Vous êtes un professionnel et vous avez besoin d'une formation ? Programmation Python
Les fondamentaux
Voir le programme détaillé
Module « random » Python 3.13.2

Fonction binomialvariate - module random

Signature de la fonction binomialvariate

def binomialvariate(n=1, p=0.5) 

Description

help(random.binomialvariate)

Binomial random variable.

Gives the number of successes for *n* independent trials
with the probability of success in each trial being *p*:

    sum(random() < p for i in range(n))

Returns an integer in the range:   0 <= X <= n

The mean (expected value) and variance of the random variable are:

    E[X] = n * p
    Var[x] = n * p * (1 - p)



Vous êtes un professionnel et vous avez besoin d'une formation ? Coder avec une
Intelligence Artificielle
Voir le programme détaillé