Description Usage Arguments Value Examples
This function calculates values associated to the t-test such as the test statistics, p-value, degree of freedom, and the conclusion on whether we reject or fail to reject the null hypothesis tested from lifeExp data in the gapminder package.
1 | my_t.test(x, alternative, mu)
|
x |
the numeric vector of lifeExp pulled from the gapminder data |
alternative |
the one-sided or two-sided test |
mu |
the mean value tested given from the null hypothesis (mu = 60) |
A list indicating test statistics, p-value, degree of freedom, and the conclusion on whether we reject or fail to reject the null hypothesis tested from lifeExp data in the gapminder package.
1 2 3 4 | set.seed(302)
p <- 0.4
flip_coin <- rbinom(100, size = 1, prob = p)
my_t.test(as.numeric(flip_coin), alternative = "greater", mu = p)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.