Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # -*- coding: utf-8 -*-
- """
- Created on Thu Feb 17 21:09:59 2011
- @author: Kronos
- """
- import scipy.integrate
- import math
- def myfunc(x):
- return((1/(2*math.pi))*(math.e**((-.5)*(x**2))))
- test = scipy.integrate.quad(myfunc, -1, 1)
- print test
- test = test[0]
- new = (1-test)
- print new
- final = (new/2)
- print final
- shouldb = 0.841345-0.158655
- print shouldb
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement