from matplotlib.numerix import *
from numarray import *
from pylab import plot, subplot, legend, axis, xlabel, ylabel, text, show
Error.setMode(all=None, overflow='warn', underflow='ignore', dividebyzero='warn', invalid='warn')
import LinearAlgebra as la

subplot(211)
y = arange(-5,5,0.01)
p = (1.0/sqrt(4*pi))*(e**(-(y**2)/4))
plot(y,p)
xlabel(r'$y$')
ylabel(r'$p(y)$')
axis([-5,5,-0.2,1.0])

subplot(212)
y = 1.6
x = arange(-5,5,0.01)
p = (1.0/sqrt(pi))*(e**(-((x-y/2)**2)))
plot(x,p)
xlabel(r'$x_1$')
ylabel(r'$p(x_1 \ given \ y=1.6)$')
axis([-5,5,-0.2,1.0])

show()

