You are viewing a single comment's thread. Return to all comments →
Python 3
from statistics import NormalDist
m,s=map(int,input().split())
x=float(input())
a,b=map(int,input().split())
z1=(x-m)/s print(NormalDist().cdf(z1))
z2=(a-m)/s z3=(b-m)/s print(NormalDist().cdf(z3)-NormalDist().cdf(z2))
Seems like cookies are disabled on this browser, please enable them to open this website
Day 5: Normal Distribution I
You are viewing a single comment's thread. Return to all comments →
Python 3
from statistics import NormalDist
m,s=map(int,input().split())
x=float(input())
a,b=map(int,input().split())
z1=(x-m)/s print(NormalDist().cdf(z1))
z2=(a-m)/s z3=(b-m)/s print(NormalDist().cdf(z3)-NormalDist().cdf(z2))