Let the total number of marbles in the bag be 'x'.
Given that exactly 25% of the total marbles are black,
[tex]\begin{gathered} \text{ No. of black marbles}=25\text{ percent of total marbles} \\ \text{ No. of black marbles}=25\text{ percent of x} \\ \text{ No. of black marbles}=\frac{25}{100}\cdot x \\ \text{ No. of black marbles}=0.25x \end{gathered}[/tex]Also, given that there are total 8 marbles in the bag,
[tex]x=8[/tex]Then the number of black marbles will be obtained by substituting x=8,
[tex]\begin{gathered} \text{ No. of black marbles}=0.25(8) \\ \text{ No. of black marbles}=2 \end{gathered}[/tex]Thus, there are 2 black marbles in the bag.