A rat is in a maze, facing two doors. At each attempt, it chooses:
- the first door with probability p, and
- the second door with probability 1−p.
The consequences are:
- If it chooses the first door, it immediately returns to its starting point after one minute.
- If it chooses the second door, it moves to an intermediate point in one minute, then:
- it turns back with probability q, which takes another one minute, or
- it leaves the maze permanently with probability 1−q, after one minute.
All of the rat's choices are made independently of each other.
Let T denote the total time spent by the rat in the maze.
Questions:
- Determine the expectation E[T].
- Determine the probability distribution of T.