Skip to content

Instantly share code, notes, and snippets.

@dotsonjb14
Created March 9, 2015 17:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dotsonjb14/efa9ddaa26eeba89d405 to your computer and use it in GitHub Desktop.
Save dotsonjb14/efa9ddaa26eeba89d405 to your computer and use it in GitHub Desktop.
getProb
let getProb nums =
let p = List.fold (fun acc n -> (1.0 - n) * acc) 1.0 nums in (1.0 - p) * 100.0
getProb [0.5; 0.5] |> Dump
getProb [0.05; 0.05; 0.05; 0.07; 0.07] |> Dump
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment