Why does free + active + inactive + speculative + wired not equal total RAM?
After spending some time looking into this and a SO question coming out of it, I think I've nailed this down.

Before I get started, I want to point out the philosophical debate that Apple must have had when they tried to answer the question What is used memory? If you look at the activity monitor on in OSX Pre-Yosemite (you can see this in my question I link and below) you'll see that Used Memory is made up of four parts; App Memory, File Cache, Wired Memory, and Compressed Memory. Now, if you look at the activity monitor below, from OSX Yosemite, you'll see that File Cache is missing. Not sure why there was a change between OS's, but there is one none-the-less. Since you're using a pre-Yosemite OS in the question, I'll defer to the former definition.

Let's get back to business, calculating the total memory, more specifically Used Memory since Free memory is given to us using vm_stat.

In order to calculate this, we need to map the four parts of Used Memory to the different stats given to us from vm_stat. A few of these are pretty easy.

Activity Monitor to vm_stat Mappings


File Cache:   -> File-backed pages
Wired Memory: -> Pages wired down
Compressed:   -> Pages occupied by compressor
App Memory:   -> Pages Active + Pages Speculative


Figuring out App Memory is the tricky one, and to be honest, I don't quite understand why speculative memory is apart of it, but the math is inarguable.



Inarguable Math (goes with OSX Pre-Yosemtie Activity Monitor)

                  vm_stat       Activity Monitor
------------------------------------------------
Free Mem.         9.97 GB       9.85 GB
Pages Active      2.38 GB       xxx
Pages Speculative 0.57 GB       xxx
App Mem.          xxx           2.95                       
Cached Files      1.24 GB       1.22 GB
Wired Mem.        1.43 GB       1.41 GB
Compressed        0.57 GB       0.58 GB
------------------------------------------------
Total Mem.       16.16 GB       16.01 GB
                 (keep in mind rounding error)




Activity Monitor OSX Pre-Yosemite





Activity Monitor OSX Yosemite