An Introduction to Statistical Inference and Its Applications with R