Thanks to the comments from Chris Kuklewicz and Ingo, I came up with the following that collects the statistics I want in my example:
resultToWeightList :: Result -> [(Double,Int)]
resultToWeightList r = [ (read s, n) | (s,n) <- labels r]
weightListMuSigma :: [(Double,Int)] -> (Double,Double)
weightListMuSigma wlst = (mu,sigma)
where
(weightSum,weightSqrSum,entryCount) = foldl addEntry (0,0,0) wlst
addEntry (s,s2,c) (v,w) = (s + (v * w'), s2 + (v**2 * w'), c + w)
where w' = fromIntegral w
entryCount' = fromIntegral entryCount
mu = weightSum / entryCount'
var = weightSqrSum / entryCount' - mu**2
sigma = sqrt var
quietCheckResult :: Testable prop => prop -> IO Result
quietCheckResult p = quickCheckWithResult args p
where args = stdArgs { chatty = False }
test :: IO ()
test = do { r <- quietCheckResult $ forAll (choose (1,2)) test'
; let wlst = resultToWeightList r
; let (mu,sigma) = weightListMuSigma wlst
; putStrLn $ "Average: " ++ show mu
; putStrLn $ "Standard Deviation: " ++ show sigma
}
where
test' x = collect err (err < 0.1)
where err = abs $ heron x - maclaurin x