def factorielle(n): fac = ... for i in range(..., ...): fac = fac*i return out def coefficient(n, k): return ...//...
def arrangement(n, k): out = 1 for i in range(n, n-k, -1): out = out*i return out def factorielle(n): return arrangement(n, n) def coefficient(n, k): return arrangement(n, k)//(factorielle(k))
def factorielle(n): fac = 1 for i in range (1, n + 1): ... return fac def probabilite(n, p, k): return ... def maximum(liste): reponse = 0 i = 0 while i < len(liste): if ... reponse = i i = i + 1 return reponse proba = [probabilite(7, 0.5, k) for k in range(8)] print(proba) print(maximum(proba))
\color{white}x_i | x_1 | x_2 | ... | x_n |
---|---|---|---|---|
\color{white}\text{P}(\text{X}=x_i) | p_1 | p_2 | ... | p_n |
\color{white}x_i | x_1 | x_2 | ... | x_n |
---|---|---|---|---|
\color{white}\text{P}(\text{X}=x_i) | p_1 | p_2 | ... | p_n |
def bienayme_tchebychev(E, V, a): borne_inf = ... borne_sup = ... proba = ... print("La probabilité que X ne soit pas comprise entre", borne_inf, " et ", borne_sup, "est inférieure ou égale à ", proba)
from random import* from math import* def UneSimulation(n): Pile = 0 for i in ...: if random() ...: Pile = Pile + 1 return ...
def NSimulation(N, n): i = 0 Valeurs = [] for i in range(...): ... return(Valeurs) def moyenne(L): m = 0 l = len(L) for i in range(...) : m = m + ... m = ... return(...)
def EcartType(L): m = moyenne(...) l = len(L) V = 0 s = 0 for i in range(l): V = V + ... V = V/l s = ... return(s)
def ecart(N,n, coef) : prop = 0 L = ... ecartmax = coef * sqrt(...) / sqrt(...) for j in range(...) : if abs(... - 0.6) <= ... : prop = ... prop = ... return(...) print(ecart(1000,1000, 1)) print(ecart(1000,1000, 2)) print(ecart(1000,1000, 3))
Nos manuels sont collaboratifs, n'hésitez pas à nous en faire part.
Oups, une coquille
j'ai une idée !