Comparison of the mean photospheric magnetic field and the interplanetary magnetic field