  We present GalMC, a MCMC algorithm designed to fit the spectral energy
distributions (SED) of galaxies to infer physical properties such as age,
stellar mass, dust reddening, metallicity, redshift, and star formation rate.
We describe the features of the code and the extensive tests conducted to
ensure that our procedure leads to unbiased parameter estimation and accurate
evaluation of uncertainties. We compare its performance to grid-based
algorithms, showing that the efficiency in CPU time is ~ 100 times better for
MCMC for a three dimensional parameter space and increasing with the number of
dimensions. We use GalMC to fit the stacked SEDs of two samples of Lyman Alpha
Emitters (LAEs) at redshift z=3.1. Our fit reveals that the typical LAE
detected in the IRAC 3.6 micron band has age = 0.67 [0.37 - 1.81] Gyr and
stellar mass = 3.2 [2.5 - 4.2] x 10^9 M_Sun, while the typical LAE not detected
at 3.6 micron has age = 0.06 [0.01-0.2] Gyr and stellar mass = 2 [1.1 - 3.4] x
10^8 M_Sun. The SEDs of both stacks are consistent with the absence of dust.
The data do not significantly prefer exponential with respect to constant star
formation history. The stellar populations of these two samples are consistent
with the previous study by Lai et al, with some differences due to the improved
modeling of the stellar populations. A constraint on the metallicity of z=3.1
LAEs from broad-band photometry, requiring Z < Z_Sun at 95% confidence, is
found here for the first time.
