Calculate T-test for the mean of one group of scores. This is a test for the null hypothesis that the expected value (mean) of sample of independent observations column is equal to the given population mean, mu.

t_test(...)

# S3 method for heaan_sdk.frame.series.HESeries
t_test(series, mu = 0, conf.level = 0.95)

# S3 method for default
t_test(
  x = x,
  y = NULL,
  alternative = c("two.sided", "less", "greater"),
  mu = 0,
  paired = FALSE,
  var.equal = FALSE,
  conf.level = 0.95,
  ...
)

Arguments

series:

(HESeries)

mu:

(Optional: numeric, default 0) - Expected value in null hypothesis

conf.level:

(Optional: numeric, default 0.95) - Confidence level.

Value

list of two HESeries length 2, containing statistic:t value and degrees of freedom. conf.int: confidence interval.

Examples

if (FALSE) {
params <- heaan_sdk.HEParameter("FGb", "real")
context <- heaan_sdk.Context(
           params,
           key_dir_path = "keys-real",
           load_keys = "all",
           generate_keys = FALSE)

series_1 <- rnorm(100, 0, 10)
he_series <- HESeries.from_series(context, series)

encrypt(he_series)
res <- t_test(he_series, mu = 0)
decrypt(res)
res<- to_series(res)
}