my_rf_cv: the t-test calculator

Description Usage Arguments Value Examples

View source: R/my_rf_cv.R

Description

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.

Usage

1

Arguments

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)

Value

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.

Examples

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)

anasmuhd/FirstPackage documentation built on Dec. 19, 2021, 2:33 a.m.