Integrating Logic and Statistics