In this paper,we assume that relationship between earthquake occurrence and time follows stationary Poisson model; and earthquake magnitude M is an exponential distribution with parameter 1/β,β=b/loge.Earthquake catalog are generated based on this assumption.We use the least square method to estimate b values,and analysis the error of b values from number of samples,magnitude interval,and magnitude respectively.Statistical analysis shows that the standard deviation of b values decreases with the increase of the number of samples,the standard deviation of b values decreases with the increase of the magnitude interval,and magnitude error makes the standard deviation of b value bigger.