Skip to contents

twosamplet calculates a two sample t-test and/or interval from summary data. It defaults to a hypothesized population mean difference of 0. You can optionally set an alternative hypothesis and confidence level for a two-sided confidence interval.

Usage

twosamplet(
  x1,
  sd1,
  n1,
  x2,
  sd2,
  n2,
  hypothesized = 0,
  alternative = NULL,
  conf.level = 0
)

Arguments

x1

Observed mean for group 1.

sd1

Observed standard deviation for group 1.

n1

Sample size for group 1.

x2

Observed mean for group 2.

sd2

Observed standard deviation for group 2.

n2

Sample size for group 2.

hypothesized

Hypothesized difference in population means.

alternative

"less", "greater", or "two.sided"

conf.level

Confidence level.

Value

The t value, p value, and confidence interval.