I***e 发帖数: 1136 | 1 There might be quicker solutions but a standard solution goes as the
following:
1. Assume that K is the max number of consecutive heads before the current
time t, then E(T-t|K) = f(K) does not depends on t.
2. The problem is essentially asking for a value of f(0).
3. We have 20 unknowns f(0), f(1), f(2), ..., f(19)
4. We have the following 20-unknown linear equations:
f(0)=1+f(0)/2+f(1)/2;
f(1)=1+f(0)/2+f(2)/2;
...
f(18)=1+f(19)/2+f(0)/2;
f(19)=1+f(0)/2;
Icare
伤 | I***e 发帖数: 1136 | 2 This is the standard 'one-step-ahead' analysis in dealing with markov chains.
The reason for f(0)=1+f(0)/2+f(1)/2 is:
f(0)=E(T|starting from 0 wound).
Now consider what can happen at t=1. The person can have a wound with 1/2
probability. In which case we need to wait on average f(1) plus the 1 day
already passed. The other half of the case, the person does not have a wound
and we still need to wait f(0) plus the one day already passed.
This gives:
f(0)= 1/2 [1+f(0)] + 1/2 [1+f(1)] = 1 + f(0)/2 + | d******e 发帖数: 551 | 3 This is reasonable solution
By testing the Probability (One get 20 or more consecutive head per
2^21-2=2097150 toss), we get 0.6321. So at least it's not a rediculous
solution. Where can I find more details?
Solution by Matlab of Probability (One get 20 or more consecutive head per
2^21-2=2097150 toss) (Apply MArkov Chain):
k=20;
M = zeros(k+1,k+1);
for (i=1:k)
M(i,1)=0.5;
M(i,i+1)=0.5;
end;
M(i+1,i+1)=1;
S=M^2097150;
S(1,k+1)
1/2
day
wound |
|