image thumbnail


version 1.0.5 (3.14 KB) by Viktor Witkovsky
Nonparametric estimate of the stress-strength reliability parameter R = P(X<Y)


Updated 08 Oct 2018

View License

Function StressStrengthR calculates the nonparametric estimate of the reliability parameter R = P(X<Y) in stress-strength models, with continuous and/or discrete distributions of the random variables X and Y, based on the random samples (X1,...,Xn) from the distribution of X, and the random sample (Y1,...,Ym) from the distribution of Y, computed by using the Wilcoxon-Man-Whitney statistic W = sum_{i=1}^n sum_{j=1}^m [I(X(i)<Y(j)) + I(X(i)==Y(j))/2]. The reliability parameter R is then estimated by R = W/(n*m).

Moreover, the algorithm generates B realizations of the reliability parameter R from the bootstrapped samples, which are used to calculate the estimated confidence interval for R. Under null hypothesis (that the distribution of X is equivalent with the distribution of Y) the true probability value is P(X<=Y) = P(Y>=X) = 0.5 should be covered by the confidence interval with stated probability (1-alpha).

In medicine, important example of applications of the parameter R = P(X<Y) is given by treatment comparisons. Here X is the response (the diagnostic test value) for a control group, and Y refers to a treatment group, P(X<Y) measures the effect of the treatment, which is close to 1 only in exceptional cases. This index can be interpreted as the probability that in a randomly selected pair of healthy and diseased individuals the diagnostic test value is higher for the diseased subject.

For more details and alternative methods for estimation the parameter R = P(X<Y) see e.g. Kotz, Lumelskii and Pensky (2003) and Zhou (2008).

Cite As

Viktor Witkovsky (2022). StressStrengthR (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2018b
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!