Load packages library(tidyverse) Intro A Gamma distribution is useful for modeling positive, right skewed data such as waiting times; it is a continuous function. In this post, we’ll illustrate some properties of the Gamma distribution by simulating a toy example. Simulate data and define structural model Let (X) be a discrete variable following uniform distribution, and (x_i \in {1,2,3}). set.seed(42) n <- 1000 X <- sample(x = c(1,2,3), size = n, replace = TRUE) hist(X) Let (y_i = …