A Mathematical Theory of Big Data