  We present an analysis on the heavy flavor hadron decay electrons with charm
and beauty contributions decomposed via a data driven method in p+p and Pb+Pb
collisions at $\sqrt{s_{\mathrm{NN}}}$ = 5.02 TeV at LHC. The transverse
momentum $p_{\mathrm{T}}$ spectra, nuclear modification factor
$R_{\mathrm{AA}}$ and azimuthal anisotropic flow $v_2$ distributions of
electrons from charm and beauty decays are obtained. We find that the electron
$R_{\mathrm{AA}}$ from charm ($R_{\mathrm{AA}}^{\mathrm{c\rightarrow e}}$) and
beauty ($R_{\mathrm{AA}}^{\mathrm{b\rightarrow e}}$) decays are suppressed at
$p_{\mathrm{T}}$ $>$ 2.0 and $p_{\mathrm{T}}$ $>$ 3.0 GeV/$c$ in Pb+Pb
collisions, respectively, which indicates that charm and beauty interact with
and lose their energy in the hot-dense medium. A less suppression of electron
$R_{\mathrm{AA}}$ from beauty decays than that from charm decays at 2.0 $<$
$p_{\mathrm{T}}$ $<$ 8.0 GeV/$c$ is observed, which is consistent with the
mass-dependent partonic energy loss scenario. A non-zero electron $v_2$ from
beauty decays ($v_{2}^{\mathrm{b\rightarrow e}}$) is observed and in good
agreement with ALICE measurement. At low $p_{\mathrm{T}}$ region from 1.0 to
3.0 GeV/$c$, a discrepancy between RHIC and LHC results is observed with 68\%
confidence level, which suggests different degree of thermalization of beauty
quark under different temperatures of the medium. At 3.0 GeV/$c$ $<$
$p_{\mathrm{T}}$ $<$ 7.0 GeV/$c$, $v_{2}^{\mathrm{b\rightarrow e}}$ deviates
from a number-of-constituent-quark (NCQ) scaling hypothesis, which favors that
beauty quark is unlikely thermalized in heavy-ion collisions at LHC energy.
