my_t.test: Student's T Test

Description Usage Arguments Value Examples

View source: R/my_t.test.R

Description

Performs a one-sample t-test on the given vector of data

Usage

1
my_t.test(x, alternative, mu)

Arguments

x

a numeric vector of data

alternative

a character string specifying the alternative hypothesis, must be one of "two.sided", "greater", or "less"

mu

the null hypothesis value of the mean

Value

List with entries for the t-statistic, the degrees of freedom, the alternative hypothesis, and the p-value of the test

Examples

1
2
my_t.test(c(1, 2, 1.5, 3, 2.1), "two.sided", 2)
my_t.test(c(3, 1, -2, -1, 0, -1), "less", 0)

Codax2000/mypackage documentation built on Dec. 17, 2021, 2:59 p.m.