CImu_data {exams.forge}R Documentation

Confidence Intervals

Description

The CImu_data function is designed for the generation of confidence intervals pertaining to a population mean mu. The function accommodates scenarios in which a dataset x is either provided or generated through a random sampling process from a normal distribution, with user-specified parameters such as a mean mu and a standard deviation sigma. Subsequently, the function computes essential statistical measures, including the sample mean xbar and the standard deviation sd. Confidence intervals for the population mean are then calculated at user-defined confidence levels (conf.level). The output is a structured list containing pertinent statistics, encompassing the mean, sample standard deviation, confidence intervals, and other relevant details.

Usage

CImu_data(
  x = NULL,
  n = length(x),
  xbar = NULL,
  sd = NULL,
  conf.level = c(0.9, 0.95, 0.99),
  mu = NULL,
  sigma = NULL
)

dcimu(
  x = NULL,
  n = length(x),
  xbar = NULL,
  sd = NULL,
  conf.level = c(0.9, 0.95, 0.99),
  mu = NULL,
  sigma = NULL
)

Arguments

x

numeric: vector of data values

n

numeric: length of the vector x (if n<1 then n=5 is used)

xbar

numeric: sample mean

sd

numeric: sample standard deviation

conf.level

numeric: vector of confidence levels of the interval (default: c(0.9, 0.95, 0.99))

mu

numeric: true value of the mean

sigma

numeric: vector of possible variance

Value

a list with

Examples

# with data
x <- rnorm(100)
CImu_data(x, conf.level=0.95)
# simulate data internally
CImu_data(n=100, conf.level=0.95, mu=0, sigma=1)

[Package exams.forge version 1.0.10 Index]