A one sample t-test enables us to test whether two means are significantly different; a two sample t-test allows us to test whether the means of two independent groups are different. Using t-tests, we can find how significant the difference is and if the difference has happened by chance. In this recipe, we will discuss how to conduct one sample t-test and two sample t-tests using R.