Durations are commonly found in practice. For example the duration between visitors to a landing page, or api requests or signups, etc. In fact mixtures frequently occur together. The following shows how a mixture of two gamma distributions (often characterizing durations but sometimes other things) can be combined like Gamma A / (Gamma A + Gamma B) to form a beta distribution. The final graph shows the beta distribution fit to the two combined gamma distributions. The fit is perfect illustrating the relationships between two gammas and the beta distribution.

This is mind blowing and awesome to me. It makes sense durations and counts being different sides of the same coin and all, but this is a really cool and elegant mathematical relationship. #rstats https://t.co/kmsEhtIvKy pic.twitter.com/ctnxiOk0Fb

— Christopher Peters (@statwonk) November 12, 2017

This is a gamma distributed variable I’ll call “X1”,

hist((X1 <- rgamma(n = 1e4, shape = 0.5, scale = 200)))

This is a gamma distributed variable I’ll call “X2”,

hist((X2 <- rgamma(n = 1e4, shape = 3, scale = 200)))

plot(fitdist({ X1 / (X1 + X2) }, distr = "beta"))

LS0tCnRpdGxlOiAiUmVsYXRpb25zaGlwIG9mIHR3byBHYW1tYSBkaXN0cmlidXRpb25zIGFuZCB0aGUgQmV0YSBkaXN0cmlidXRpb24iCm91dHB1dDoKICBodG1sX2RvY3VtZW50OiBkZWZhdWx0CiAgaHRtbF9ub3RlYm9vazogZGVmYXVsdAotLS0KCmBgYHtyLCBlY2hvID0gRkFMU0UsIG1lc3NhZ2U9RkFMU0UsIHdhcm5pbmc9RkFMU0V9CnN1cHByZXNzUGFja2FnZVN0YXJ0dXBNZXNzYWdlcyh7IGxpYnJhcnkoZHBseXIpOyBsaWJyYXJ5KGZpdGRpc3RycGx1cykgfSkKYGBgCgpEdXJhdGlvbnMgYXJlIGNvbW1vbmx5IGZvdW5kIGluIHByYWN0aWNlLiBGb3IgZXhhbXBsZSB0aGUgZHVyYXRpb24gYmV0d2VlbiB2aXNpdG9ycyB0byBhIGxhbmRpbmcgcGFnZSwgb3IgYXBpIHJlcXVlc3RzIG9yIHNpZ251cHMsIGV0Yy4gSW4gZmFjdCBtaXh0dXJlcyBmcmVxdWVudGx5IG9jY3VyIHRvZ2V0aGVyLiBUaG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