dphat {spc} | R Documentation |
Percent defective for normal samples
Description
Density, distribution function and quantile function
for the sample percent defective calculated on normal samples
with mean equal to mu
and standard deviation equal to sigma
.
Usage
dphat(x, n, mu=0, sigma=1, type="known", LSL=-3, USL=3, nodes=30)
pphat(q, n, mu=0, sigma=1, type="known", LSL=-3, USL=3, nodes=30)
qphat(p, n, mu=0, sigma=1, type="known", LSL=-3, USL=3, nodes=30)
Arguments
x , q |
vector of quantiles. |
p |
vector of probabilities. |
n |
sample size. |
mu , sigma |
parameters of the underlying normal distribution. |
type |
choose whether the standard deviation is given and fixed ( |
LSL , USL |
lower and upper specification limit, respectively. |
nodes |
number of quadrature nodes needed for |
Details
Bruhn-Suhr/Krumbholz (1990) derived the cumulative distribution function
of the sample percent defective calculated on normal samples to applying them for a new variables sampling plan.
These results were heavily used in Krumbholz/Zöller (1995) for Shewhart and in Knoth/Steinmetz (2013) for EWMA control charts.
For algorithmic details see, essentially, Bruhn-Suhr/Krumbholz (1990).
Two design variants are treated: The simple case, type="known"
, with known normal variance and the presumably much
more relevant and considerably intricate case, type="estimated"
, where both parameters of
the normal distribution are unknown. Basically, given lower and upper specification limits and the normal distribution,
one estimates the expected yield based on a normal sample of size n
.
Value
Returns vector of pdf, cdf or qf values for the statistic phat.
Author(s)
Sven Knoth
References
M. Bruhn-Suhr and W. Krumbholz (1990), A new variables sampling plan for normally distributed lots with unknown standard deviation and double specification limits, Statistical Papers 31(1), 195-207.
W. Krumbholz and A. Zöller (1995),
p
-Karten vom Shewhartschen Typ für die messende Prüfung,
Allgemeines Statistisches Archiv 79, 347-360.
S. Knoth and S. Steinmetz (2013),
EWMA p
charts under sampling by variables,
International Journal of Production Research 51(13), 3795-3807.
See Also
phat.ewma.arl
for routines using the herewith considered phat statistic.
Examples
# Figures 1 (c) and (d) from Knoth/Steinmetz (2013)
n <- 5
LSL <- -3
USL <- 3
par(mar=c(5, 5, 1, 1) + 0.1)
p.star <- 2*pnorm( (LSL-USL)/2 ) # for p <= p.star pdf and cdf vanish
p_ <- seq(p.star+1e-10, 0.07, 0.0001) # define support of Figure 1
# Figure 1 (c)
pp_ <- pphat(p_, n)
plot(p_, pp_, type="l", xlab="p", ylab=expression(P( hat(p) <= p )),
xlim=c(0, 0.06), ylim=c(0,1), lwd=2)
abline(h=0:1, v=p.star, col="grey")
# Figure 1 (d)
dp_ <- dphat(p_, n)
plot(p_, dp_, type="l", xlab="p", ylab="f(p)", xlim=c(0, 0.06),
ylim=c(0,50), lwd=2)
abline(h=0, v=p.star, col="grey")