  In an era of large spectroscopic surveys of stars and big data, sophisticated
statistical methods become more and more important in order to infer
fundamental stellar parameters such as mass and age. Bayesian techniques are
powerful methods because they can match all available observables
simultaneously to stellar models while taking prior knowledge properly into
account. However, in most cases it is assumed that observables are uncorrelated
which is generally not the case. Here, we include correlations in the Bayesian
code BONNSAI by incorporating the covariance matrix in the likelihood function.
We derive a parametrisation of the covariance matrix that, in addition to
classical uncertainties, only requires the specification of a correlation
parameter that describes how observables co-vary. Our correlation parameter
depends purely on the method with which observables have been determined and
can be analytically derived in some cases. This approach therefore has the
advantage that correlations can be accounted for even if information for them
are not available in specific cases but are known in general. Because the new
likelihood model is a better approximation of the data, the reliability and
robustness of the inferred parameters are improved. We find that neglecting
correlations biases the most likely values of inferred stellar parameters and
affects the precision with which these parameters can be determined. For
example, we apply our technique to massive OB stars, but emphasise that it is
valid for any type of stars. For effective temperatures and surface gravities
determined from atmosphere modelling, we find that masses can be underestimated
on average by $0.5\sigma$ and mass uncertainties overestimated by a factor of
about 2 when neglecting correlations. At the same time, the age precisions are
underestimated over a wide range of stellar parameters. [abridged]
