You have a random sample of $n$ observations
$X_1, X_2, \dots, X_n$ from a population with
distribution $\mathsf{Gam}(\mathrm{shape}=5, \mathrm{scale}=\theta),$ where $\theta$ is
unknown.
Suppose you wish to use these data to make a 95%
confidence interval for $\theta.$
Let $T = \sum_{i=1}^n X_i,$ which has $E(T) = 5n\theta.$
You propose using the pivotal quantity $Y = T/\theta,$
which has distribution
$\mathsf{Gam}(\mathrm{shape}=5n, \mathrm{scale}=1)$
and $E(Y) = 5n.$ [Note: Your density function for
the distribution of $Y$ needs to have denominator
$\Gamma(5n),$ not $\Gamma(5n-1).]$
If $L$ and $U$ cut probability 0.025 from the lower and upper tails, respectively, of $\mathsf{Gam}(5n,1),$ then with $n = 30,$ we can use R statistical software to find that
$L=126.9562, U= 174.9372.$ [Note: In R, the second parameter is the rate $\lambda$, which is the reciprocal of the scale. But here both rate and scale are $1.]$
a = 5; n = 30
LU = qgamma(c(.025,.975), a*n, 1); LU
[1] 126.9562 174.9372
Then
$$ 0.95 = P(L < Y = T/\theta < U)
= P(T/U < \theta < T/L),$$
so that a 95% confidence interval of $\theta$ is
$(T/U,\, T/L).$
Example: As an example, we let $\theta = 9$ and use R to get a random sample of size $n = 30$ from
$\mathsf{Gam}(\mathrm{shape} = \alpha = 5, \mathrm{scale} = 9).$
a = 5; th = 9
x = rgamma(n, a, 1/th)
summary(x)
Min. 1st Qu. Median Mean 3rd Qu. Max.
11.92 28.20 45.19 46.48 58.94 99.61
t = sum(x); t
[1] 1394.351
The resulting 95% CI for $\theta$ is $(7.97, 10.98).$
t/qgamma(c(.975,.025), a*n, 1)
[1] 7.970578 10.982932
So my random sample was among the 'lucky' 95% of
samples that produces a CI covering $\theta = 8.$
Note: If you're allergic to software, you can express
the distribution $\mathsf{Gam}(5n, 1)$ as an equivalent chi-squared distribution and use printed
chi-squared tables to find lower and upper boundaries.
qchisq(c(.025,.975), 300)/2
[1] 126.9562 174.9372
qgamma(c(.025,.975), 150, 1)
[1] 126.9562 174.9372
self-study
tag if this is homework. $\endgroup$