Basics of applied statistics and probability: applications with R