Well, if you're looking at the military and social numbers while you're only building one of either a ship or an improvement, then the numbers won't add up. The numbers in parentheses aren't actual production numbers, they're raw production numbers. They don't take into account racial bonuses, and they also fail to align with funding levels because unused social is filtered to military, if military is funded.
Secondly: Social numbers -always- look funny-because it's filtered to funded military, it sort of counts as always-on, if it's funded. If it's not building something, it's dark orange, almost greyed out, and the numbers are essentially irrelevant, except for the fact that it's included in the current military count. If it's lit up orange, though, then it's building something, and the numbers do matter. Military has the same lighting scheme, but shows in parentheses when it's not being used, so it's somewhat less confusing.
In general, you make the most efficient use of your resources doing either one or the other. The ideal points for doing both simultaneously are, depending on your goals, 25/75, 50/50, and 75/25, although 1/99 (1% military, 99% social) is widely used due to the above rule of unused social being filtered to funded military. Due to truncation, it loses a bit here and there, but more importantly, a 1/99 strategy will always result in less than a 100% military strategy because the filtered/funneled social production does NOT have the military bonus applied to it. For instance, interstellar warfare, space militarization, and planetery improvements combine for a 30% military bonus. With 50 industry on the planet funded at 100% military, this results in 65 military production. With 50 industry on the planet funded at 1/99, this results in 49 military production (0.5 is truncated to 0, 49.5 is truncated to 49, and together they are 49).
Obviously, any point between 100/0 and 0/100 will lead to some sacrifice, but the above points are optimal because they tend to avoid the truncation as well as keep a large portion of the bonus.
Hopefully this is clear enough (clear as mud, right?)-the wiki also has some very good (and relevant) information, namely military, social, and, yes, research.