# Why does the pivotal quantity $g(X,θ)$ have to be a monotonic function of $θ$ for a fixed $X$?

I'm learning about pivotal quantities, which are functions $$g(X,θ)$$ of the data $$X$$ and the parameter $$θ$$. One property they must satisfy is that $$g(X,θ)$$ is a monotonic function of $$θ$$ for a fixed $$X$$.

I'm told the reason for this, is to be able to manipulate inequalities.

For example, if we have a random sample

$$X_1, X_2, ... , X_n$$ from $$N(θ,σ^2)$$, we can construct a confidence interval for $$θ$$ by creating a pivotal quantity: $$\frac{\bar X - \theta}{\sigma/\sqrt n}$$

So that for example, $$P(-1.96 \leq \frac{\bar X - \theta}{\sigma/\sqrt n} \leq 1.96) = 0.95$$

Now, it is apparently this property of $$\frac{\bar X - \theta}{\sigma/\sqrt n}$$ being monotonic in $$θ$$ for a fixed $$X$$ that allows us to manipulate these inequalities and write this as

$$P(\bar X - 1.96 \frac{σ}{\sqrt n} \leq θ \leq \bar X + 1.96 \frac{σ}{\sqrt n}) = 0.95$$.

But I do not understand any part of this. Why does it need to be monotonic in $$θ$$? What does it mean for it to be monotonic in $$θ$$? Why does $$X$$ need to be fixed? Why does this let us manipulate the inequalities?

In a sense you want a sort of inverse to go from $$\mathbb P(c_1 \le g(X, \theta) \le c_2) \le k$$ to one of:
• (if monotonic increasing): $$\mathbb P(h(X,c_1) \le \theta \le h(X,c_2)) \le k$$ or
• (if monotonic decreasing): $$\mathbb P(h(X,c_2) \le \theta \le h(X,c_1)) \le k$$
and having $$g(X,\theta)$$ monotonic in $$\theta$$ for given $$X$$ enables such an inverse $$h(X,c)$$ to exist