Lockpick

Lockpick costs 1 and 2  at Sho'guul's lair.

It unlocks doors, chests, and blocks without consuming the peasant's keys. Each time it is used its probability to break goes up by 2%. Its chance, in percentage, can be found on the relic's icon. The lockpick will still spare the use of a key when it breaks.

It can be combined with to obtain the.

On average, it is worth about 9.5 Keys (See derivation below).

The chance of the lockpick breaking can be reset to 0 by placing it on the Relic Altar and removing.

Positive

 * : Combines into the.
 * : More keys saved is more damage had with Key Blade.

Statistical Analysis of the Lockpick
A statistical analysis is useful for determining how many keys finding the lock pick will save you. The following sections will walk through the derivation and steps taken to determine the statistics behind the item.

Derivation of the Probability Density Function
Let X be the number of keys the lockpick saves the peasant. Since the lockpick saves the peasant a key even when it breaks, the minimum number of keys saved is 2 and the maximum number of keys saves is 51.

Therefore, X = {2, 3, …, 50, 51}.

In order to derive the average number of keys the lockpick will save the peasant, a probability density function (PDF) must be found. To derive this expression, let f(X) be the probability of the lockpick not breaking until the point of breaking for X number of saved keys. Similarly, let g(X) be the probability of the lockpick breaking for X number of saved keys. Constructed below is a table of f(X) and g(X) for early values of X.

From the table, it is easy to see a linear relationship between the probabilities of breaking (or not breaking), and the amount of keys the lockpick has saved the peasant. These relationships can be expressed using:

$$ f(X) = 1.04 - 0.02X $$

$$ g(X) = 0.02 (X-1) $$

Now that the probabilities of breaking and not breaking for the number of saved keys in known, it is possible to derive the PDF for the number of keys saved. The probability for saving X amount of keys is equal to the probability of the lockpick surviving X-1 times and breaking on the Xth try.

Therefore:

$$ P_X(X) = g(X) \prod_{i=2}^X f(i) $$

$$ = 0.02(X-1) \prod_{i=2}^X 1.04 -0.02i $$

A quick check of the summation of probability across the entire sample space shows that the probability of all events is 1:

$$ \sum_{X=2}^{51} 0.02(X-1) \prod_{i=2}^X 1.04 -0.02i = 1 $$

Mean and Variance
Now that the PDF of the amount of keys saved is known, all that is needed now is to apply the definitions of mean and variance.

Mean is calculated by:

$$ E[X] = \mu = \sum_{}^{k} k P_X(k) $$

Variance is calculated by:

$$ Var(X) = \sigma^2 = \sum_{}^{k} (k-\mu)^2 P_X(k) $$

Applying these definitions results in:

$$ E[X] = \sum_{k=2}^{51} 0.02k(k-1) \prod_{i=2}^k 1.04 -0.02i = 9.54 $$

$$ Var(X) = \sum_{k=2}^{51} 0.02(k-\mu)^2(k-1) \prod_{i=2}^k 1.04 -0.02i = 18.47 $$

Thus, the lockpick, on average, will save the peasant 9.5 keys.