diff --git a/rank-product.cabal b/rank-product.cabal
--- a/rank-product.cabal
+++ b/rank-product.cabal
@@ -1,5 +1,5 @@
 name:                rank-product
-version:             0.1.0.1
+version:             0.1.0.2
 synopsis:            Find the rank product of a data set.
 description:         Find the rank product of a data set and get the p-value from a permutation test.
 homepage:            http://github.com/GregorySchwartz/rank-product#readme
diff --git a/src/Statistics/RankProduct.hs b/src/Statistics/RankProduct.hs
--- a/src/Statistics/RankProduct.hs
+++ b/src/Statistics/RankProduct.hs
@@ -71,7 +71,7 @@
 -- p-value.
 rankProductPermutation :: Permutations
                        -> [Entity]
-                       -> IO [(PValue, RankProductEntity)]
+                       -> IO [(RankProductEntity, PValue)]
 rankProductPermutation (Permutations permutations) entities = do
     let ranked  = fmap RankEntity
                 . transpose
@@ -101,4 +101,4 @@
     let pVals =
             fmap (\e -> PValue $ (fromIntegral e) / (fromIntegral permutations)) exp
 
-    return . zip pVals $ obs
+    return . zip obs $ pVals
