November 2018
Beginner to intermediate
420 pages
10h 4m
English
Previously, in the Running t-tests with R section, we used the bigger sample to run a t-test; but what about the smaller sample? Speaking of R, yes, we can run it. The next code block shows how, but you shouldn't trust a sample so small:
t.test(small_sample, mu = 10, alternative = 'two.sided')# One Sample t-test# # data: small_sample# t = -2.2169, df = 9, p-value = 0.05384# alternative hypothesis: true mean is not equal to 10# 95 percent confidence interval:# 5.043347 10.050084# sample estimates:# mean of x # 7.546716
The test now came close to rejecting the null hypothesis with a 95% confidence level (and, as we already know, the sample does come from a normal distribution with a mean, µ, equal to 10). This test is not all mighty ...
Read now
Unlock full access