iscamonesamplet: One Sample T-Test

iscamonesampletR Documentation

One Sample T-Test

Description

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

iscamonesamplet(
  xbar,
  sd,
  n,
  hypothesized = 0,
  alternative = NULL,
  conf.level = NULL,
  verbose = TRUE
)

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.

verbose

Logical, defaults to TRUE. Set to FALSE to suppress messages

Value

The t value, p value, and confidence interval.

Examples

iscamonesamplet(
  xbar = 2.5,
  sd = 1.2,
  n = 30,
  alternative = "greater",
  hypothesized = 2
)
iscamonesamplet(
  xbar = 10.3,
  sd = 2,
  n = 50,
  alternative = "less",
  hypothesized = 11
)
iscamonesamplet(
  xbar = 98.2,
  sd = 2,
  n = 100,
  alternative = "two.sided",
  conf.level = 0.95
)
iscamonesamplet(xbar = 55, sd = 5, n = 40, conf.level = 0.99)

ISCAM documentation built on Feb. 12, 2026, 5:07 p.m.