predIntLnormAltSimultaneousTestPower {EnvStats} R Documentation

## Probability That at Least One Set of Future Observations Violates the Given Rule Based on a Simultaneous Prediction Interval for a Lognormal Distribution

### Description

Compute the probability that at least one set of future observations violates the given rule based on a simultaneous prediction interval for the next r future sampling occasions for a lognormal distribution. The three possible rules are: k-of-m, California, or Modified California.

### Usage

  predIntLnormAltSimultaneousTestPower(n, df = n - 1, n.geomean = 1, k = 1,
m = 2, r = 1, rule = "k.of.m", ratio.of.means = 1, cv = 1, pi.type = "upper",

### Details

What is a Simultaneous Prediction Interval?
A prediction interval for some population is an interval on the real line constructed so that it will contain k future observations from that population with some specified probability (1-\alpha)100\%, where 0 < \alpha < 1 and k is some pre-specified positive integer. The quantity (1-\alpha)100\% is called the confidence coefficient or confidence level associated with the prediction interval. The function predIntNorm computes a standard prediction interval based on a sample from a normal distribution.

The function predIntLnormAltSimultaneous computes a simultaneous prediction interval (assuming lognormal observations) that will contain a certain number of future observations with probability (1-\alpha)100\% for each of r future sampling “occasions”, where r is some pre-specified positive integer. The quantity r may refer to r distinct future sampling occasions in time, or it may for example refer to sampling at r distinct locations on one future sampling occasion, assuming that the population standard deviation is the same at all of the r distinct locations.

The function predIntLnormAltSimultaneous computes a simultaneous prediction interval based on one of three possible rules:

• For the k-of-m rule (rule="k.of.m"), at least k of the next m future observations will fall in the prediction interval with probability (1-\alpha)100\% on each of the r future sampling occasions. If obserations are being taken sequentially, for a particular sampling occasion, up to m observations may be taken, but once k of the observations fall within the prediction interval, sampling can stop. Note: When k=m and r=1, the results of predIntNormSimultaneous are equivalent to the results of predIntNorm.

• For the California rule (rule="CA"), with probability (1-\alpha)100\%, for each of the r future sampling occasions, either the first observation will fall in the prediction interval, or else all of the next m-1 observations will fall in the prediction interval. That is, if the first observation falls in the prediction interval then sampling can stop. Otherwise, m-1 more observations must be taken.

• For the Modified California rule (rule="Modified.CA"), with probability (1-\alpha)100\%, for each of the r future sampling occasions, either the first observation will fall in the prediction interval, or else at least 2 out of the next 3 observations will fall in the prediction interval. That is, if the first observation falls in the prediction interval then sampling can stop. Otherwise, up to 3 more observations must be taken.

Computing Power
The function predIntNormSimultaneousTestPower computes the probability that at least one set of future observations or averages will violate the given rule based on a simultaneous prediction interval for the next r future sampling occasions for a normal distribution, based on the assumption of normally distributed observations, where the population mean for the future observations is allowed to differ from the population mean for the observations used to construct the prediction interval.

The function predIntLnormAltSimultaneousTestPower assumes all observations are from a lognormal distribution. The observations used to construct the prediction interval are assumed to come from a lognormal distribution with mean \theta_2 and coefficient of variation \tau. The future observations are assumed to come from a lognormal distribution with mean \theta_1 and coefficient of variation \tau; that is, the means are allowed to differ between the two populations, but not the coefficient of variation.

The function predIntLnormAltSimultaneousTestPower calls the function
predIntNormSimultaneousTestPower, with the argument delta.over.sigma given by:

\frac{\delta}{\sigma} = \frac{log(R)}{\sqrt{log(\tau^2 + 1)}} \;\;\;\;\;\; (1)

where R is given by:

R = \frac{\theta_1}{\theta_2} \;\;\;\;\;\; (2)

and corresponds to the argument ratio.of.means for the function
predIntLnormAltSimultaneousTestPower, and \tau corresponds to the argument cv.

### Value

vector of values between 0 and 1 equal to the probability that the rule will be violated.

### Note

See the help files for predIntLnormAltSimultaneous and predIntNormSimultaneousTestPower.

### Author(s)

Steven P. Millard (EnvStats@ProbStatInfo.com)

### References

See the help file for predIntLnormAltSimultaneous.

predIntLnormAltSimultaneous,
plotPredIntLnormAltSimultaneousTestPowerCurve,
predIntNormSimultaneous,
plotPredIntNormSimultaneousTestPowerCurve,
Prediction Intervals, LognormalAlt.

### Examples

  # For the k-of-m rule with n=4, k=1, m=3, and r=1, show how the power increases
# as ratio.of.means increases.  Assume a 95% upper prediction interval.

predIntLnormAltSimultaneousTestPower(n = 4, m = 3, ratio.of.means = 1:3)
#[1] 0.0500000 0.2356914 0.4236723

#----------

# Look at how the power increases with sample size for an upper one-sided
# prediction interval using the k-of-m rule with k=1, m=3, r=20,
# ratio.of.means=4, and a confidence level of 95%.

predIntLnormAltSimultaneousTestPower(n = c(4, 8), m = 3, r = 20, ratio.of.means = 4)
#[1] 0.4915743 0.8218175

#----------

# Compare the power for the 1-of-3 rule with the power for the California and
# Modified California rules, based on a 95% upper prediction interval and
# ratio.of.means=4.  Assume a sample size of n=8.  Note that in this case the
# power for the Modified California rule is greater than the power for the
# 1-of-3 rule and California rule.

predIntLnormAltSimultaneousTestPower(n = 8, k = 1, m = 3, ratio.of.means = 4)
#[1] 0.6594845

predIntLnormAltSimultaneousTestPower(n = 8, m = 3, rule = "CA", ratio.of.means = 4)
#[1] 0.5864311

predIntLnormAltSimultaneousTestPower(n = 8, rule = "Modified.CA", ratio.of.means = 4)
#[1] 0.691135

#----------

# Show how the power for an upper 95% simultaneous prediction limit increases
# as the number of future sampling occasions r increases.  Here, we'll use the
# 1-of-3 rule with n=8 and ratio.of.means=4.

predIntLnormAltSimultaneousTestPower(n = 8, k = 1, m = 3, r = c(1, 2, 5, 10),
ratio.of.means = 4)
#[1] 0.6594845 0.7529576 0.8180814 0.8302302


[Package EnvStats version 2.8.1 Index]