# Calculating expected number of failures using the CDF and SF

Using a simple model, I have produced an output distribution as

rv = scipy.stats.johnsonsu(1.874, 2.324, 52.633, 1.097)


If this is a manufacturing setting, and my lower spec limit is 45 and upper spec limit is 55, I want to know the expected failure rates (x < 45 or x > 55). I can check the cumulative density function and the survival function, respectively, to perform each of the single tailed tests:

>>> rv.cdf(45)
1.035e-05
>>> rv.sf(55)
3.564e-08


Since this random variable represents an independent draw during manufacturing, if I assemble 1e6 units, should I expect none of them will be larger than 55 but 10 will be less than 45?

• Why are you doing this? Where did you get those parameters? – eric_kernfeld Aug 21 '18 at 15:56
• I want to understand the expected failure rates for the given distribution and the upper/lower limits. Those parameters came from fitting that distribution to a histogram of data. That data was produced by doing a monte carlo simulation of a simple polynomial model with random variable inputs. – pixels Aug 22 '18 at 14:26
• Well, I think you're doing it right. – eric_kernfeld Aug 22 '18 at 17:40