Approximate the expected number of jobs in a year.

149 Views Asked by At

A person is employed for one day at a time. When he is out of work, he visits the job agency in the morning to see if there is work for that day. There is a job for her with probability $\frac{1}{2}$. If there is no work, he comes back the next day. When he has a job, he will be called back to the same job for the next day with probability $\frac{2}{3}$. When he is not called back, he goes to the job agency again the next morning to look for a new job. Approximate the average number of jobs the person works in a year.

My approach :

Let us denote $p_n$ as the probability that he has a job on day $n$. By the law of total probability,

$P[$Job on Day $n] = P[$ Job on Day $n \ \cap$ same job as Day $n-1$$] + P[$ Job on Day $n \ \cap$ different or no job as Day $n-1$$]$.

This implies the recursion :

$p_n = \frac{2}{3} p_{n-1} + \frac{1}{2}(1-p_{n-1})$.

Solving this recursion and I guess introducing the total number of jobs as a sum of indicators will give my expected number of jobs in a year.

But I feel a bit weird about this recursion and I think it is not correct. Can anyone have a different approach to this?

3

There are 3 best solutions below

2
On

I'd look at this as a Markov Chain with two states $J$ (job) and $N$ (no job). Draw the transition probabilities. Then assume at steady state there's a $p_J$ and $p_N$. Set up your equations $(p_J = \dfrac 23 p_J + \dfrac 12 p_N$ and $p_N = \dfrac 13 p_J + \dfrac12 p_N)$. Solving those I get $p_J = \dfrac 35$, so 60% of the time she has a job on any given day (in steady state).

0
On

You should expect to work around 91 different jobs a year.

Here's a way to look at the same problem.

  • You wake up in the morning where there are $n$ days left in the year. How many new jobs do you expect to get over the remaining $n$ days, including today?

    The answer depends on whether you had a job yesterday or not. Let's let $p_n$ denote the expected number of future jobs given that you worked yesterday, and let $q_n$ denote the expected number of future jobs given that you didn't work yesterday.

  • The probabilities for finding, keeping, and losing a job help us set up a recursive relationship among the $p_i$ and $q_i$:

    $$q_{n+1} = \frac{1}{2}\left(1 + p_n\right) + \frac{1}{2}q_n$$ $$p_{n+1} = \frac{2}{3}p_n +\frac{1}{3}q_{n+1} $$

    These recurrence relations represent the facts that (1) if you wake up with $n+1$ days left in the year and you had no job yesterday, then half the time you find one (+1) new job and work until tomorrow, half the time you find no job and have to start again, jobless, tomorrow. (2) If you wake up with $n+1$ days left in the year and you had a job yesterday, two thirds of the time you simply keep your job and wake up tomorrow with one day elapsed; one third of the time you're in exactly the same situation as if you woke up and hadn't worked yesterday.

  • I'd like to combine like terms and also plug in the formula for $q_{n+1}$ where it appears on the right hand side of the second equation. We get:

    $$q_{n+1} = \frac{1}{2} + \frac{1}{2} p_n + \frac{1}{2}q_n$$ $$p_{n+1} = \frac{1}{6} + \frac{5}{6}p_n + \frac{1}{6}q_{n}$$

  • With these linear equations, we can actually write a matrix encoding the relationship between the $p_i$ and $q_i$ :

$$\begin{bmatrix}p_{n+1}\\ q_{n+1}\\ 1\end{bmatrix} = \begin{bmatrix}\frac{5}{6} & \frac{1}{6} & \frac{1}{6} \\\frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & 1\end{bmatrix}\begin{bmatrix}p_n\\q_n\\1\end{bmatrix}$$

  • And more generally

$$\begin{bmatrix}p_{n+1}\\ q_{n+1}\\ 1\end{bmatrix} = \begin{bmatrix}\frac{5}{6} & \frac{1}{6} & \frac{1}{6} \\\frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & 1\end{bmatrix}^{n+1}\begin{bmatrix}p_0\\q_0\\1\end{bmatrix}$$

  • And because $p_0=q_0=0$ (once you have 0 days left in the year, your expected number of future jobs is zero regardless), this becomes:

$$\begin{bmatrix}p_{n+1}\\ q_{n+1}\\ 1\end{bmatrix} = \begin{bmatrix}\frac{5}{6} & \frac{1}{6} & \frac{1}{6} \\\frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & 1\end{bmatrix}^{n+1}\begin{bmatrix}0\\0\\1\end{bmatrix}$$

  • For example, if there is only one $(n=1)$ day left in the year, then $$\begin{bmatrix}p_{1}\\ q_{1}\\ 1\end{bmatrix} = \begin{bmatrix}\frac{5}{6} & \frac{1}{6} & \frac{1}{6} \\\frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & 1\end{bmatrix}^{1}\begin{bmatrix}0\\0\\1\end{bmatrix} = \begin{bmatrix}\frac{1}{6} \\ \frac{1}{2} \\ 1\end{bmatrix}$$

    Meaning that on this final day, you'd expect on average to get 1/6 new jobs if you had a job yesterday (because you'd have to lose your old job and secure a new one, which happens 1/6 of the time) and 1/2 if you didn't have a job (because you'd have to secure a new job, which happens 1/2 the time).

  • After calculating the matrix product with a computer, I find that if there are 365 days in the year, we have:

$$\begin{bmatrix}p_{365}\\ q_{365}\\ 1\end{bmatrix} = \begin{bmatrix}\frac{5}{6} & \frac{1}{6} & \frac{1}{6} \\\frac{1}{2} & \frac{1}{2} & \frac{1}{2}\\ 0 & 0 & 1\end{bmatrix}^{365}\begin{bmatrix}0\\0\\1\end{bmatrix} = \begin{bmatrix}\frac{3}{4} & \frac{1}{4} & 91\,\frac{1}{8}\\ \frac{3}{4} & \frac{1}{4} & 91\,\frac{5}{8} \\ 0 & 0 & 1\end{bmatrix} \begin{bmatrix}0 \\ 0 \\ 1\end{bmatrix} = \begin{bmatrix}91\,\frac{1}{8}\\91\,\frac{5}{8}\\1\end{bmatrix}$$

So, on average, you should expect to work an average of around 91 different jobs every year. Since you presumably start the year without a job, the exact expected value is $q_{365} = 91\frac{5}{8}$. The average is slightly higher because people without jobs are slightly more likely to "become hired".

0
On

Note that the problem asks for the number of jobs, not the number of days the person has a job. If the person holds the same job for 5 days, that only counts as one job.

We can model this as a Markov chain with three states: new job, same job, and unemployed. Then the expected number of jobs in a 365-day year is $P[\text{same job on day 1}] + \sum_{i=1}^{365} P[\text{new job on day $i$}]$ (by linearity of expectation).

If the person is not called back, the problem is ambiguous as to whether he goes to the job agency (a) the morning after the last day with the previous job, or (b) the morning after the first day without the previous job. The two interpretations lead to different Markov chains.

Interpretation (a). The transitions are

  • new job → same job with probability $\frac23$, new job with probability $\frac16$, unemployed with probability $\frac16$;
  • same job → same job with probability $\frac23$, new job with probability $\frac16$, unemployed with probability $\frac16$;
  • unemployed → new job with probability $\frac12$, unemployed with probability $\frac12$.

The steady-state probabilities satisfy the system

$$n = \frac16 n + \frac16 s + \frac12 u, \quad s = \frac23 n + \frac23 s, \quad u = \frac16 n + \frac16 s + \frac12 u, \quad n + s + u = 1,$$

whose solution is $n = \frac14, s = \frac12, u = \frac14$, leading to an expected $\frac12 + 365 · \frac14 = \mathbf{91\frac34}$ jobs in a year.

Interpretation (b). The transitions are

  • new job → same job with probability $\frac23$, unemployed with probability $\frac13$,
  • same job → same job with probability $\frac23$, unemployed with probability $\frac13$,
  • unemployed → new job with probability $\frac12$, unemployed with probability $\frac12$.

The steady-state probabilities satisfy the system

$$n = \frac12u, \quad s = \frac23n + \frac23s, \quad u = \frac13n + \frac13s + \frac12u, \quad n + s + u = 1,$$

whose solution is $n = \frac15, s = \frac25, u = \frac25$, leading to an expected $\frac25 + 365 · \frac15 = \mathbf{73\frac25}$ jobs in a year.