Step 1: Define the size of the test.
The size of the test is the probability of rejecting \( H_0 \) when \( H_0 \) is true. This is the probability that \( X \in \{0, 3\} \) when \( \frac{1}{4} \leq \theta \leq \frac{3}{4} \). In other words, we need to compute:
\[
\text{Size of the test} = \Pr(X = 0 \mid \frac{1}{4} \leq \theta \leq \frac{3}{4}) + \Pr(X = 3 \mid \frac{1}{4} \leq \theta \leq \frac{3}{4}).
\]
Step 2: Calculate the probability mass function for \( X \).
For a binomial distribution \( X \sim \text{Bin}(3, \theta) \), the probability mass function is:
\[
\Pr(X = x) = \binom{3}{x} \theta^x (1 - \theta)^{3 - x}.
\]
Thus, for \( X = 0 \) and \( X = 3 \):
\[
\Pr(X = 0) = \binom{3}{0} \theta^0 (1 - \theta)^3 = (1 - \theta)^3,
\]
\[
\Pr(X = 3) = \binom{3}{3} \theta^3 (1 - \theta)^0 = \theta^3.
\]
Step 3: Integrate over the range \( \frac{1}{4} \leq \theta \leq \frac{3}{4} \).
The size of the test is:
\[
\int_{1/4}^{3/4} \Pr(X = 0 \mid \theta) d\theta + \int_{1/4}^{3/4} \Pr(X = 3 \mid \theta) d\theta.
\]
Substitute the expressions for \( \Pr(X = 0) \) and \( \Pr(X = 3) \):
\[
\int_{1/4}^{3/4} (1 - \theta)^3 d\theta + \int_{1/4}^{3/4} \theta^3 d\theta.
\]
Using standard integration, we find:
\[
\int_{1/4}^{3/4} (1 - \theta)^3 d\theta \approx 0.140625, \quad \int_{1/4}^{3/4} \theta^3 d\theta \approx 0.140625.
\]
Thus, the size of the test is approximately:
\[
0.140625 + 0.140625 = 0.28125.
\]
Thus, the size of the test is \( \boxed{0.28} \).