Skip to contents

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

Usage

onesamplet(
  xbar,
  sd,
  n,
  hypothesized = 0,
  alternative = NULL,
  conf.level = NULL
)

Arguments

xbar

Observed mean.

sd

Observed standard deviation.

n

Sample size.

hypothesized

Hypothesized population mean.

alternative

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

conf.level

Confidence level.

Value

The t value, p value, and confidence interval.