4. Take a random eight-digit number composed of 0s and 1s. The probability that the sum of the digits in the even positions is equal to the sum of the digits in the odd positions is $\qquad$ .
4. $\frac{35}{128}$.

Let $n$ be the eight-digit number that satisfies the condition.
According to the problem, the number of 1s in the even positions of $n$ is the same as the number of 1s in the odd positions.

Thus, the number of 1s in the odd positions and even positions can be $1, 2, 3$ or 4.
Note that the first digit is 1.
We will discuss the cases separately.
(1) There is one 1 and three 0s in both the odd and even positions, which gives $\mathrm{C}_{3}^{0} \mathrm{C}_{4}^{1}=4$ possibilities;
(2) There are two 1s and two 0s in both the odd and even positions, which gives $\mathrm{C}_{3}^{1} \mathrm{C}_{4}^{2}=18$ possibilities;
(3) There are three 1s and one 0 in both the odd and even positions, which gives $\mathrm{C}_{3}^{2} \mathrm{C}_{4}^{3}=12$ possibilities;
(4) There are four 1s in both the odd and even positions, which gives $\mathrm{C}_{3}^{3} \mathrm{C}_{4}^{4}=1$ possibility.

Thus, there are $4+18+12+1=35$ natural numbers $n$ that satisfy the condition.

Since there are $2^{7}=128$ eight-digit numbers composed of 0 and 1, the required probability is $\frac{35}{128}$.