compare.tail.to.normal: Compare tails of a sample to normal expectation.

Description Usage Arguments Value Examples

Description

Compares the proportion of observations in a vector beyond k standard deviations to the expectation under a normal distribution. The output is a ratio of the proportion of data beyond k standard deviations from the expectation divided by the Normal-theory probability of observations beyond k standard deviations from the expectation.

Usage

1

Arguments

x

A numeric vector

k

The number of standard deviations beyond which is considered the "tail" (for the purpose of the computation)

mu

The expectation of a normal distribution to which x will be compared

sigma

The standard deviation of a normal distribution to which x will be compared

Value

A ratio of the proportion of data beyond k standard deviations from the expectation divided by the Normal-theory probability of observations beyond k standard deviations from the expectation.

Examples

1
2
compare.tail.to.normal(rnorm(10000, 0, 1), 3, 0, 1)
compare.tail.to.normal(rt(10000, 2), 3, 0, 1)

mdedge/stfspack documentation built on May 9, 2019, 8:17 a.m.