Proof of First Quartile in Uniform Distribution For an uniform distribution between [a,b], find the first quartile Q1, as P(X>Q1)=0.75.
How do I proof that in this uniform distribution f(x)=1/(b-a), the Q1 is 0.25?
 A: First problem: Let $X \sim \mathsf{Unif}(a, b).$ In the first problem you seek $q_1$ such that
$P(X > q_1) = 0.75.$ That is
$$P(X > q_1) = \int_{q_1}^b \frac{1}{b-a}\,dx = \frac{1}{b-a}\int_{q_1}^b 1\,dx = \frac{b-q_1}{b-a}.$$
So $\frac{b-q_1}{b-a} - .75$ and $q_1 = .75a + .25b.$
Second problem: Then the second problem starts with
$$P(X \le q_1)= \int_a^{q_1} \frac{1}{b-a}\,dx = .25.$$
Solve for $q_1$ in terms of $a$ and $b.$ Do you get the same answer as above?
Numerical computations and graph. Consider the specific case with $a=2, b=6.$ In R a uniform CDF is denoted punif and a quantile function (inverse CDF)
is denoted qunif. Then we have:
a = 2;  b = 6
q.1 = qunif(.25, a, b)l  q.1
[1] 3
.75*a + .25*b
[1] 3

1 - punif(q.1, a, b)
[1] 0.75     # first problem

punif(q.1, a, b)
[1] 0.25     # second problem


curve(dunif(x, a, b), a-.2, b+.2, lwd=2, n=10001, 
      ylab="Density", main="UNIF(2, 6)")
 abline(h=0, col="green2")
 abline(v=3, col="red", lwd=2, lty="dotted")

A: *

*Let $U \sim \text{Unif}(0,1)$, then show that the quantile function $Q_U$ (the inverse of the CDF more or less) is the identity: $Q_U(p) := F_U^{-1}(p) = p$. That is, the $p$-th quantile is just $p$, hence the first quartile is 0.25.

*Show that if $X = (b-a) U + a$ then $Q_X(p) = (b-a) Q_U(p) + a$. This should also be intuitively obvious: If a random variable undergoes an affine transformation, the quantile function undergoes the same. See also this post.

The second fact is more general. In your case, if $U \sim \text{Unif}(0,1)$, then $X \sim \text{Unif}(a,b)$.
