onesampsgn: One-Sample Sign Analysis

Description Usage Arguments Details Value References Examples

Description

Calculates a distribution free confidence interval for a sample median by deriving for the 100pth distribution percentile of a continuous random variable. .

Usage

1
2
onesampsgn(x, test = FALSE, alt = 0, theta0 = 0, alpha = 0.05,
  maktable = TRUE, plotb = FALSE)

Arguments

x

Sample of size 'n'

test

Computes a two-sided sign test about theta0. If test is true, then H_0: theta = theta0 vs. H_1: theta != theta0 is conducted.

alt

Computes a one-sided sign test for theta0. If alt equals 1, then the test H_1: theta > theta0 is conducted. If alt equals -1, then H_1: theta < theta0 is conducted.

theta0

Variance of sample x

alpha

Level of significance

maktable

If true provides more descriptive output for x

plotb

If true a boxplot is produced

Details

Computes the solution to Example 1.3.3 (8th Edition)

Value

The probability bday of at least two people having the same birthdays

References

Hogg, R. McKean, J. Craig, A. (2018) Introduction to Mathematical Statistics, 8th Ed. Boston: Pearson.

Examples

1
2
3
x <- c(56, 70, 89, 94, 96, 101, 102, 102, 102, 105, 106, 108, 110, 113, 116)
# Confidence interval for the median:
onesampsgn(x, alpha = 0.12)

joemckean/mathstat documentation built on May 30, 2019, 2:01 p.m.