Energy detection (ED) is a popular spectrum sensing technique in cognitive radios. In this thesis, we consider the effect of random arrival and departure of primary signals and derive the exact detection probability for ED. We also propose a Bayesian based ED to improve the performance. We then consider the scenario with late arrival of primary signals, and propose a weighted ED to enhance the detection performance. Simulation results are used to validate our theoretical study and to illustrate the performance of the proposed schemes.