prob_gn: ProbGn

View source: R/prob_gn.R

prob_gnR Documentation

ProbGn

Description

This function replicates the ProbGn function from chapter 2. This program computes the probability of K(n) > c*sigma for given alpha and sample size.

Usage

prob_gn(alpha, n, c_min = 0, c_max = 10, by = 0.04, dec = 4)

Arguments

alpha

The selected significance level.

n

The selected sample size.

c_min

The minimum value of c to try in the calulcations, default = 0.

c_max

The maximum value of c to try in the calculations, default = 10.

by

The increment of the sequence between c_min and c_max, default = 0.04.

dec

The number of decimal places to use when removing probabilities of 0 and 1 from the ends of the results.

Value

A sequence of values of c and the corresponding calculated probabilities.

Author(s)

Bhargab Chattopadhyay Bhargab@iiitvadodara.ac.in, Ken Kelley kkelley@nd.edu

References

Mukhopadhyay, N., \& de Silva, B. M. (2009). Sequential Methods and Their Applications. New York: CRC Press.

Examples

alpha = 0.05
n = 20
vals <- prob_gn(alpha = alpha, n = n)
vals


yelleKneK/SMSD documentation built on Nov. 23, 2022, 6:40 p.m.