Calculates the p-value for the proposed difference of the mean between 2 samples (t distribution).

pval_t2(x1, s1, n1, x2, s2, n2, dmu = 0, side = c("two", "one"))

Arguments

x1

Sample's 1 mean

s1

Sample's 1 standard deviation

n1

Sample size of sample 1

x2

Sample's 2 mean

s2

Sample's 2 standard deviation

n2

Sample size of sample 2

dmu

Proposed difference between sample means (Default is 0)

side

To either get a two-tail or one-tail p-value (Default is "two")

Value

P-value

Examples

x1 <- 34.67 s1 <- 4.97 n1 <- 15 x2 <- 40.87 s2 <- 5.36 n2 <- 15 pval_t2(x1, s1, n1, x2, s2, n2)
#> [1] 0.00274