Explanation:
given expression, \rho=\frac{3g}{4rG}ρ=
4rG
3g
where \rhoρ is density , g is acceleration due to gravity , r is radius and G is universal gravitational constant.
dimension of \rhoρ = [ML^-3]
dimension of g = [LT^-2]
dimension of r = [L]
dimension of G = [M^-1L^3T^-2]
expression will be dimensionally correct,
dimension of \rhoρ = dimension of {g/rG}
LHS = dimension of \rhoρ = [ML^-3]
RHS = dimension of {g/rG} = dimension of g/dimension of r × dimension of G
= [LT^-2]/[L][M^-1L^3T^-2]
= [ML^-3]
here, LHS = RHS
so, expression is dimensionally correct.