Jackson Floyd

2022-03-27

Confidence of a failure
A joint of steel pipe (casing) has a 1% failure rate. 400 joints of casing are in a typical well. How may wells can I drill or joints can I run, before I am 90% confident of having at least one casing failure? You can leave out the well to simplify the problem: Casing has a 1% failure rate. How many joints of casing can I have before I am 90% confident in having a failure? Thanks for re teaching me. I think it is called gambler's ruin.

Esteban Sloan

This is a problem using the geometric distribution. Distributions with that name are defined in different ways.
My definition is that X is the number of the trial on which we see the first casing failure.
Then the PDF of X is $f\left(k\right)=P\left(X=k\right)=\left(1-p\right){p}^{k-1}$, for $k=1,2,\cdots$. Also, the CDF is $F\left(k\right)=P\left(X\le k\right)=\sum _{i=1}^{k}f\left(i\right).$
We can use R statistical software to make a table of the PDF and CDF for your problem and then print out the first few and the last few rows of the table:

$>TAB=cb\in d\left(x,pdf,cdf\right)$
$>head\left(TAB\right);tail\left(TAB\right)$
$\begin{array}{|cccc|}\hline & x& pdf& cdf\\ \left[1,\right]& 1& 0.01000000& 0.01000000\\ \left[2,\right]& 2& 0.00990000& 0.01990000\\ \left[3,\right]& 3& 0.00980100& 0.02970100\\ \left[4,\right]& 4& 0.00970299& 0.03940399\\ \left[5,\right]& 5& 0.00960596& 0.04900995\\ \left[6,\right]& 6& 0.00950990& 0.05851985\\ \hline\end{array}$
$\begin{array}{|cccc|}\hline & x& pdf& cdf\\ \left[225,\right]& 225& 0.001052649& 0.8957877\\ \left[226,\right]& 226& 0.001042123& 0.8968299\\ \left[227,\right]& 227& 0.001031701& 0.8978616\\ \left[228,\right]& 228& 0.001021384& 0.8988830\\ \left[229,\right]& 229& 0.001011170& 0.8998941\\ \left[230,\right]& 230& 0.001001059& 0.9008952\\ \hline\end{array}$
It seems that it will take 230 fittings to be 90% sure of a casing failure. I will leave it to you to figure out how to sum the geometric series to get the CDF. Then you can solve to find the smallest k such that $F\left(k\right)\ge .9.$
Note: The version of the geometric distribution programmed into R is for the random variable Y which counts the trials up to, but not including, the first casing failure. Thus in R, qgeom(.9, .01) returns 229.

Do you have a similar question?