00:01
All right, so let's let q be equal to 1 minus p.
00:05
So starting with $1 after the first game with probability q, she loses and then reaches 0 in one game.
00:13
And then with probability p, she wins and goes to $2.
00:17
So from $2 to get ruined, she must eventually go from $2 to $1, then from $1 to $0.
00:24
So by independence, the generating function is h of z squared.
00:30
So the generating function, h of z, so satisfies here, h of z is equal to qz plus pz times h of z squared.
00:46
We then rearrange to get this as pz, h squared, minus h plus qz equal zero.
00:57
We use the quadratic formula here.
01:00
We choose the minus sign because h of 0 should be 0.
01:06
So we have that h of z is going to be equal to 1 minus the square root of 1 minus 4 pqz squared, divided by 2 p z and then we plug in z being equal to 1 but since 1 minus 4 pq is equal to p minus q all squared we get that h of 1 is equal to 1 minus absolute value of p minus q divided by 2p so we have that if q is less than or equal to p then the absolute value of p minus q is equal to p minus q so h of one is equal to q over p and if q is greater than equal to p then the absolute value of p minus q is equal to q minus p so h of one is equal to one...