Learn R Programming

AccSamplingDesign (version 0.0.4)

muEst: Estimate Mean \(\mu\) Based on Specification Limits and Probability

Description

Computes the estimated mean \(\mu\) for a given level of quality and specification limit under either a normal or beta distribution.

Usage

muEst(p, USL = NULL, LSL = NULL, 
       sigma = NULL, theta = NULL, 
       dist = c("normal", "beta"))

Value

Returns the estimated mean \(\mu\) as a numeric value.

Arguments

p

Level of quality (numeric, between 0 and 1).

USL

Upper specification limit (numeric). Only one of USL or LSL should be provided.

LSL

Lower specification limit (numeric). Only one of USL or LSL should be provided.

sigma

Standard deviation (numeric) for the normal distribution. Must be provided if dist = "normal".

theta

Theta parameter (numeric) for the beta distribution. Must be provided if dist = "beta".

dist

Distribution type. Either "normal" or "beta".

Author

Ha Truong

Details

The function estimates the mean \(\mu\) corresponding to a given tail probability p, assuming that the process output follows either a normal or beta distribution, and that the probability of being beyond the provided specification limit equals 1 - p.

  • For the normal distribution, the mean is calculated using the inverse cumulative distribution function (quantile function) of the normal distribution.

  • For the beta distribution, the mean is solved numerically such that the CDF at the specified limit equals p, given the shape determined by theta.

Exactly one of USL or LSL must be provided to define whether the probability refers to the upper or lower tail.

Examples

Run this code
  # Example for normal distribution with lower specification limit (LSL)
  muEst(p = 0.95, LSL = 10, sigma = 2, dist = "normal")

  # Example for beta distribution with upper specification limit (USL)
  muEst(p = 0.95, USL = 0.7, theta = 500, dist = "beta")

Run the code above in your browser using DataLab