Thanks Kalevi,
Its sorted now

On Tuesday, April 27, 2021 at 2:10:22 PM UTC+1 [email protected] wrote:

> evalf is a function. You have to give the precision as an argument:
>
> >>> Prob.evalf(4)
> 0.7333
> >>> Prob.evalf(10)
> 0.7333134908
>
> Kalevi Suominen
>
> On Monday, April 26, 2021 at 7:56:31 PM UTC+3 [email protected] wrote:
>
>> Hi everyone,
>> I am trying to compute the normal distribution of a function. So I need 
>> to integrate from 'a' to 'b' and get a decimal answer that would be the 
>> probability. When I integrate I get erf; how do I convert to decimal?[image: 
>> Formula.png]
>>
>> This is my code:
>> import sympy as syms
>> from sympy import exp,sqrt,pi
>> a=195
>> b=205
>> x= syms.symbols('x')
>> u=202
>> rho=4
>> f=syms.exp((-(x-u)**2)/(2*rho**2))/(rho*syms.sqrt(2*syms.pi)) 
>> Prob= syms.integrate(f,(x,a,b))
>> Prob.evalf
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"sympy" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sympy/336958a1-5b22-439b-9f66-f89a226b4e89n%40googlegroups.com.

Reply via email to