0
$\begingroup$

Let's say a worker can perform 4 types of tasks in a day: A,B,C,D.

Each of which tasks takes time that is distributed according to some probability distribution, say

$$ T_A \sim Gamma(\alpha_A, \beta_A)\\ T_B \sim Gamma(\alpha_B, \beta_B)\\ T_C \sim Gamma(\alpha_C, \beta_C)\\ T_D \sim Gamma(\alpha_D, \beta_D) $$ The data that we have is the total number of tasks per category performed by a person as well as the total time. In other words: $$ T_{total} = T_A\times n_A + T_B\times n_B +T_C\times n_C + T_D\times n_D $$ The problem: infer $\alpha_A, \beta_B, \ldots, \alpha_D, \beta_D$, given $n_A, n_B, n_C, n_D, T_{total}$.

Is there any way to do this in pymc3 or stan or winbugs (or anything else)? Or do I have to derive the probability distribution of $T_total$ in terms of all of the parameters?

$\endgroup$
0

1 Answer 1

2
$\begingroup$

A Gamma-distributed random variable that is multiplied by a constant is Gamma-distributed with the same shape and a new scale (see Wikipedia). So $T_j \times n_j$ is Gamma-distributed with shape $\alpha_j$ and scale $\beta_j \times n_j$. Furthermore, the distribution of the sum of Gamma-distributed random variables is known and has several forms (for a review, see this paper by Nadarajah, which uses the alternate inverse-scale parameterization of the Gamma distribution).

In principle, such a distribution could be utilized for the likelihood of $T_{\mbox{Total}}$ in Stan (via its increment_log_prob() and log_sum_exp() functions) but in practice, you would have to make some decision about how to truncate the infinite summation in the PDF.

$\endgroup$
0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.