The answer to this question is not easy or straightforward. In cases like this, it's a good idea to simplify the problem as much as possible in order to understand what's going on. Let's say we have a system with two pins, three depths, one master key, and one position held constant in the RC keying scheme. We'll ignore MACS concerns now, because they really complicate things. Since the bitting at each position is independent, all master keys behave the same way by symmetry, so we can assume we have the master key 11 (we'll also ignore practical concerns about why this would be a bad master key bitting to use).
If we're given a single change key under this system, it gives us information about what the master key might be. For example, a master key of 23 could never give us a change key of 12 under this system, so if we ever see the change key 12 we know the master key isn't 23. So given a change key, we can write out a list of the possible master keys which could have given us that change key. If we have multiple change keys, the master key has to exist in each list. For the system described, we are able to enumerate the possibilities. Format is "CK_ID:CK_bitting:{set of possible master keys}"
MK = 11
A:12:{11,13,22,32}
B:13:{11,12,23,33}
C:21:{11,22,23,31}
D:31:{11,21,32,33}
If we're given change keys A and B, the only possible master key in both lists is 11, so we have found the master key.
If we're given change keys A and C, the master key could be 11 or 22, so we have not found the master key for sure.
Thus, given T=4,X=2,P=2,H=3,M=1, we can't say for sure what the probability is that we can predict the master key. It could be 100% or it could be 50%. You could compute the expected probability, which would lie somewhere between 0.5 and 1.0 (in this case it happens to be 66%), and you might even be able to get an equation in terms of X. I would expect this expression to be rather complicated, however.
Perhaps a better question would be "What is the expected number of unique change keys I must observe before I know the master key with 100% certainty?" In the example above, we can again examine the entire set of possibilities. The format is "Sequence of received change keys:length of that sequence:probability that the sequence occurs"
AB:2:1/(4*3)
ACB:3:1/(4*3*2)
ACD:3:1/(4*3*2)
ADB:3:1/(4*3*2)
ADC:3:1/(4*3*2)
BA:2:1/(4*3)
BCA:3:1/(4*3*2)
BCD:3:1/(4*3*2)
...and so on. The pattern is fairly consistent.
Thus we can compute the expected length as 4*(2*1/12+3*1/24+3*1/24+3*1/24+3*1/24) = 8/3.
That is, in this simple system, we would have to examine 8/3~=2.67 change keys on average before we knew the master key with 100% certainty.
To return to your original question, check out
viewtopic.php?f=9&t=57939.
It might be better (and would probably be simpler mathematically) to analyze TPP first, since then we know every bitting on the change key is different from the master key.
This isn't an easy problem, and looks like it has a lot of fun details to consider. I recommend keeping the details to an absolute minimum as you go through your analysis, then generalizing. Perhaps only consider systems with 3 depths, or systems with only 2 pins. Even that could get fairly in depth.
Best of luck!