# HG changeset patch
# User Brian Neal <bgneal@gmail.com>
# Date 1357784389 21600
# Node ID 66a5e7f7c10f039f671387098245a965d6332c83
# Parent  cfb7f28678c7ec572052215ec2da2ef2df2897ee
Added a check to see if we were calculating the probabilities correctly.

diff -r cfb7f28678c7 -r 66a5e7f7c10f ch5ex6.py
--- a/ch5ex6.py	Wed Jan 09 20:11:53 2013 -0600
+++ b/ch5ex6.py	Wed Jan 09 20:19:49 2013 -0600
@@ -127,6 +127,8 @@
     vals.sort(key=lambda t: t[0])
     x, y = zip(*vals)
 
+    assert abs(sum(y) - 1.0) < 1e-6
+
     pyplot.clf()
     pyplot.xscale('log')
     pyplot.yscale('log')