Buscar

Exercicios Distribuicao Exponencial

Prévia do material em texto

27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 1/7
DISTRIBUIÇÃO EXPONENCIAL NO PYTHON
EXERCÍCIO DISTRIBUIÇÃO EXPONENCIAL
RESOLUÇÃO LETRA A - EXERCICIO 1 -
DISTRIBUIÇÃO EXPONENCIAL
In [6]: from scipy.stats import expon
alpha = 1000
x = 1000
result = expon.cdf(x, scale=alpha)
resultPerc = result * 100
resultPerc
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 2/7
63.212055882855765
RESOLUÇÃO LETRA B - EXERCICIO 1 -
DISTRIBUIÇÃO EXPONENCIAL
0.4065696597405991
0.6988057880877978
1.105375447828397
110.5375447828397
RESOLUÇÃO LETRA C - EXERCICIO 1 -
DISTRIBUIÇÃO EXPONENCIAL
42.74149319487267
EXERCICIO 2
Out[6]:
In [5]: from scipy.stats import expon
alpha = 1000
x_900 = 900
x_1200 = 1200
x = x_1200 - x_900
prob_900 = expon.sf(x_900, scale=alpha)
print(prob_900)
prob_1200 = expon.cdf(x_1200, scale=alpha)
print(prob_1200)
prob_final = prob_900 + prob_1200
print(prob_final)
probFinalPerc = prob_final * 100
print(probFinalPerc)
In [10]: from scipy.stats import expon
alpha = 1000
x = 850
result = expon.sf(x, scale=alpha)
resultPerc = result * 100
resultPerc
Out[10]:
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 3/7
EXPLANAÇÃO DO EXERCICIO 2
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 4/7
RESOLUÇÃO LETRA A DO EXERCICIO 2
0.6321205588285577
63.212055882855765
RESOLUÇÃO LETRA B DO EXERCICIO 2
In [112… from scipy.stats import expon
alpha = 1/5 #inverso da media
x = 5 #media
result = expon.cdf(x, scale=x)
print(result)
resultPerc = result * 100
resultPerc
Out[112]:
In [120… from scipy.stats import expon
alpha = 1/5 #inverso da media
x = 5
x1 = 4 #min
x2 = 6 #max
result1 = expon.cdf(x1, scale=x)
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 5/7
0.5506710358827784
0.6988057880877978
14.813475220501937
EXERCÍCIO 3 - DISTRIBUIÇÃO EXPONENCIAL
EXPLANAÇÃO EXERCICIO 3 - DISTRIBUIÇÃO
EXPONENCIAL
print(result1)
result2 = expon.cdf(x2, scale=x)
print(result2)
result = result2 - result1
resultPerc = result * 100
resultPerc
Out[120]:
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 6/7
RESOLUÇÃO LETRA A - EXERCICIO 3
39.346934028736655
RESOLUÇÃO LETRA B - EXERCICIO 3
In [7]: from scipy.stats import expon
media = 2
alpha = 1/2
x = 1
result = expon.cdf(x, alpha)
resultPerc = result * 100
resultPerc
Out[7]:
In [8]: from scipy.stats import expon
media = 2
alpha = 1/2
x = 1
27/05/2023, 12:06 Exercicios Distribuicao Exponencial
localhost:8888/nbconvert/html/PUC/ESTATISTICA/PROBABILIDADE/Exercicios Distribuicao Exponencial.ipynb?download=false 7/7
60.653065971263345
0.950212931632136
95.0212931632136
result = expon.sf(x, alpha)
resultPerc = result * 100
resultPerc
Out[8]:
In [ ]: ##PROVA
In [9]: from scipy.stats import expon
media = 3
alpha = 1/3
x = 1
result = expon.cdf(x, scale=alpha)
print(result)
resultPerc = result * 100
resultPerc
Out[9]:

Continue navegando