Solved – Calculating discrete hazard rates problem

discrete datahazardstochastic-processes

I am working on an assignment for a Stochastic Modeling class and am stuck on the following question:

Let $X$ have probability mass function $p_j = P \lbrace X = j \rbrace $ for $j \geq 1$. Let

$\lambda_n = P \lbrace X = n|X > n − 1 \rbrace = \frac{p_n}{1-\sum^{n-1}_{j=1} p_j}$.

The quantities $\lambda_n$, $n \geq 1$ are called the discrete hazard rates.
The following is called the discrete hazard rate method of generating
samples of $X$:

  • Step 1: Set $X = 1$
  • Step 2: Generate a uniform random number $U$ on $[0, 1)$
  • Step 3: If $U < \lambda_X$ stop and output $X$.
  • Step 4: Else, set $X = X + 1$ and go to step 2.

(a) Show that the output of the above algorithm has the desired probability mass function.

(b) Assume X is a geometric random variable with parameter p. Determine λ n and explain how the above algorithm operates in this case.

I am trying to follow the method for generating samples of $X$ but get stuck when trying to evaluate the discrete hazard rates $\lambda_n$. For $X = 1$, I get

$\lambda_1 = P \lbrace X = 1|X > 0 \rbrace = \frac{p_1}{1-\sum^{0}_{j=1} p_j}$

Given that the summation has poorly defined limits, I increment to $X = X + 1 = 2$, which gives:

$\lambda_2 = P \lbrace X = 2|X > 1 \rbrace = \frac{p_2}{1-\sum^{1}_{j=1} p_j}$

now I am not sure how to calculate $p_2$. The assigment gives the pmf as $p_j = P \lbrace X = j \rbrace $ for $j \geq 1$, which means $p_2 = P \lbrace X = 2 \rbrace $, but I feel like there is information missing; am I supposed to assume a distribution for $P \lbrace X = 2 \rbrace $?

Best Answer

You have two sequences: $p_1,p_2,p_3,\ldots$ and $\lambda_1,\lambda_2,\lambda_3,\ldots$ knowing that the first is non-negative and sums to $1$.

You also have a method of calculating the second sequence from the first.

For (a) you need to show that the algorithm for sampling has the desired effect.

So using the algorithm and taking your example

$$P(X=2) = P(U_1 \ge \lambda_1)P(U_2 \lt \lambda_2) =(1-\lambda_1) \lambda_2 $$ $$= \left(1-\dfrac{p_1}{1}\right)\left(\dfrac{p_2}{1-p_1}\right) = p_2$$

which is the result you want.

You need to extend this to all other possible values of $X$.

Related Question