Prévia do material em texto
27/05/2023, 12:02 Exercicios Distriuicao Binomial localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distriuicao Binomial.ipynb?download=false 1/4 COMO UTILIZAR DISTRIBUIÇÃO BINOMIAL EM PYTHON EXERCICIO 1 EXPLANAÇÃO DO EXERCICIO 1 27/05/2023, 12:02 Exercicios Distriuicao Binomial localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distriuicao Binomial.ipynb?download=false 2/4 27/05/2023, 12:02 Exercicios Distriuicao Binomial localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distriuicao Binomial.ipynb?download=false 3/4 27/05/2023, 12:02 Exercicios Distriuicao Binomial localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distriuicao Binomial.ipynb?download=false 4/4 RESOLUÇÃO LETRA A - EXERCÍCIO 1 - EM PYTHON 9.87915949743324 RESOLUÇÃO LETRA B - EXERCÍCIO 1 - EM PYTHON 98.04317380028455 RESOLUÇÃO LETRA C - EXERCÍCIO 1 - EM PYTHON 1.956826199715453 0.8097630289919996 In [5]: from scipy.stats import binom # P(X = x) -> P(X = 2) x = 2 n = 12 p = 0.05 result = binom.pmf(x, n, p) resultPerc = result * 100 resultPerc Out[5]: In [6]: from scipy.stats import binom # P(X <= x) -> P(X <= 2) x = 2 n = 12 p = 0.05 result = binom.cdf(x, n, p) resultPerc = result * 100 resultPerc Out[6]: In [8]: from scipy.stats import binom #P(X > x) -> P(X > 2) x = 2 n = 12 p = 0.05 result = binom.sf(x, n, p) resultPerc = result * 100 resultPerc Out[8]: In [9]: from scipy.stats import binom # P(X = x) -> P(X > 12) x = 12 n = 14 p = 0.6 result = binom.sf(x, n, p) resultPerc = result * 100 resultPerc Out[9]: In [ ]: