The kinematic dependences of the relative production rates, $f_{\Lambda_b^0}/f_d$, of $\Lambda_b^0$ baryons and $\bar{B}^0$ mesons are measured using $\Lambda_b^0 \rightarrow \Lambda_c^+ \pi^-$ and $\bar{B}^0 \rightarrow D^+ \pi^-$ decays. The measurements use proton-proton collision data, corresponding to an integrated luminosity of 1 fb$^{-1}$ at a centre-of-mass energy of 7 TeV, recorded in the forward region with the LHCb experiment. The relative production rates are observed to depend on the transverse momentum, $p_T$, and pseudorapidity, $\eta$, of the beauty hadron, in the studied kinematic region $1.5 < p_T < 40$ GeV/$c$ and $2 < \eta < 5$. Using a previous LHCb measurement of $f_{\Lambda_b^0}/f_d$ in semileptonic decays, the branch...