An introduction to probability theory