  When looking for gravitational wave signals from known pulsars, targets have
been treated using independent searches. Here we use a hierarchical Bayesian
framework to combine observations from individual sources for two purposes: to
produce a detection statistic for the whole ensemble of sources within a
search, and to estimate the hyperparameters of the underlying distribution of
pulsar ellipticities. Both purposes require us to assume some functional form
of the ellipticity distribution, and as a proof of principle we take two toy
distributions. One is an exponential distribution, defined by its mean, and the
other is a half-Gaussian distribution defined by its width. We show that by
incorporating a common parameterized prior ellipticity distribution we can be
more efficient at detecting gravitational waves from the whole ensemble of
sources than trying to combine observations with a simpler non-hierarchical
method. This may allow us to detect gravitational waves from the ensemble
before there is confident detection of any single source. We also apply this
method using data for 92 pulsars from LIGO's sixth science run. No evidence for
a signal was seen, but 90\% upper limits of $3.9\ee{-8}$ and $4.7\ee{-8}$ were
set on the mean of an assumed exponential ellipticity distribution and the
width of an assumed half-Gaussian ellipticity distribution, respectively.
