Sample size dependent magnetic critical current density has been observed in magnesium diboride superconductors. At high fields, larger samples provide higher critical current densities, while at low fields, larger samples give rise to lower critical current densities. The explanation for this surprising result is proposed in this study based on the electric field generated in the superconductors. The dependence of the current density on the sample size has been derived as a power law j}R1/n @n is the n factor characterizing E2j curve E 5Ec( j/ jc)n]. This dependence provides one with a method to derive the n factor and can also be used to determine the dependence of the activation energy on the current density.