Compute confidence interval of the mean of series with an associated distribution

mean_confint(series, conf_level = 0.95, distribution = "t")

Arguments

series:

(HESeries)

conf_level:

(Optional: numeric, default 0.95) - Confidence level which must be in (0, 1).

distribution:

(Optional string, default "t") - if "norm", use Standard Normal distribution (z-distribution), else use Student's t-distribution.

Value

HESeries of length 2, containing lowerbound and upperbound of 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 <- mean_confint(he_series, conf_level = 0.95, distribution = "t")
res_norm <- mean_confint(he_series, conf_level = 0.99, distribution = "norm")
decrypt(res_t)
decrypt(res_norm)

res_t <- to_series(res_t)
res_norm <- to_series(res_norm)
}