Last chance! 50% off unlimited learning
Sale ends in
Compute the probability that at least one out of
predIntNormTestPower(n, df = n - 1, n.mean = 1, k = 1, delta.over.sigma = 0,
pi.type = "upper", conf.level = 0.95)
vector of positive integers greater than 2 indicating the sample size upon which the prediction interval is based.
vector of positive integers indicating the degrees of freedom associated with
the sample size. The default value is df=n-1
.
positive integer specifying the sample size associated with the future averages.
The default value is n.mean=1
(i.e., individual observations). Note that all
future averages must be based on the same sample size.
vector of positive integers specifying the number of future observations that the
prediction interval should contain with confidence level conf.level
. The
default value is k=1
.
vector of numbers indicating the ratio delta.over.sigma=0
.
character string indicating what kind of prediction interval to compute.
The possible values are pi.type="upper"
(the default), and
pi.type="lower"
.
numeric vector of values between 0 and 1 indicating the confidence level of the
prediction interval. The default value is conf.level=0.95
.
vector of values between 0 and 1 equal to the probability that at least one of
What is a Prediction Interval?
A prediction interval for some population is an interval on the real line
constructed so that it will contain predIntNorm
computes a standard prediction interval based on a
sample from a normal distribution. The function predIntNormTestPower
computes the probability that at least one out of
The Form of a Prediction Interval
Let mean=
sd=
n.mean=
For a normal distribution, the form of a two-sided tolIntNorm
).
Similarly, the form of a one-sided lower prediction interval is:
predIntNormK
.
Computing Power
The "power" of the prediction interval is defined as the probability that at
least one out of the pi.type="upper"
) is given in Equation (6) of the help
file for
predIntNormSimultaneousK
, where df=
ncp=
a=
b=
The quantity
If we are interested in using averages instead of single observations, with
n.mean
For a given confidence level delta.over.sigma=0
, the value of delta.over.sigma
increases above 0, the power
increases.
When pi.type="lower"
, the same value of K
is used as when
pi.type="upper"
, but Equation (4) is used to construct the prediction
interval. Thus, the power increases as delta.over.sigma
decreases below 0.
See the help files for predIntNorm
and
predIntNormSimultaneous
.
predIntNorm
, predIntNormK
,
plotPredIntNormTestPowerCurve
, predIntNormSimultaneous
,
predIntNormSimultaneousK
,
predIntNormSimultaneousTestPower
, Prediction Intervals,
Normal.
# NOT RUN {
# Show how the power increases as delta.over.sigma increases.
# Assume a 95% upper prediction interval.
predIntNormTestPower(n = 4, delta.over.sigma = 0:2)
#[1] 0.0500000 0.1743014 0.3990892
#----------
# Look at how the power increases with sample size for a one-sided upper
# prediction interval with k=3, delta.over.sigma=2, and a confidence level
# of 95%.
predIntNormTestPower(n = c(4, 8), k = 3, delta.over.sigma = 2)
#[1] 0.3578250 0.5752113
#----------
# Show how the power for an upper 95% prediction limit increases as the
# number of future observations k increases. Here, we'll use n=20 and
# delta.over.sigma=1.
predIntNormTestPower(n = 20, k = 1:3, delta.over.sigma = 1)
#[1] 0.2408527 0.2751074 0.2936486
# }
Run the code above in your browser using DataLab