In this paper, we study the large N behavior of the moment-generating function (MGF) of the linear statistics of N×N Hermitian matrices in the Gaussian unitary, symplectic, orthogonal ensembles (GUE, GSE, GOE) and Laguerre unitary, symplectic, orthogonal ensembles (LUE, LSE, LOE) at the edge of the spectrum. From the finite N Fredholm determinant expression of the MGF of the linear statistics [35], we find the large N asymptotics of the MGF associated with the Airy kernel in these Gaussian and Laguerre ensembles. Then we obtain the mean and variance of the suitably scaled linear statistics. We show that there is an equivalence between the large N behavior of the MGF of the scaled linear statistics in Gaussian and Laguerre ensembles, which leads to the statistical equivalence between the mean and variance of suitably scaled linear statistics in Gaussian and Laguerre ensembles. In the end, we use the Coulomb fluid method to obtain the mean and variance of another type of linear statistics in GUE, which reproduces the result of Basor and Widom [7].