  We consider a birth and death process in which death is due to both `natural
death' and to competition between individuals, modelled as a quadratic function
of population size. The resulting `logistic branching process' has been
proposed as a model for numbers of individuals in populations competing for
some resource, or for numbers of species. However, because of the quadratic
death rate, even if the intrinsic growth rate is positive, the population will,
with probability one, die out in finite time. There is considerable interest in
understanding the process conditioned on non-extinction.
  In this paper, we exploit a connection with the ancestral selection graph of
population genetics to find expressions for the transition rates in the
logistic branching process conditioned on survival until some fixed time $T$,
in terms of the distribution of a certain one-dimensional diffusion process at
time $T$. We also find the probability generating function of the Yaglom
distribution of the process and rather explicit expressions for the transition
rates for the so-called Q-process, that is the logistic branching process
conditioned to stay alive into the indefinite future. For this process, one can
write down the joint generator of the (time-reversed) total population size and
what in population genetics would be called the `genealogy' and in
phylogenetics would be called the `reconstructed tree' of a sample from the
population.
  We explore some ramifications of these calculations numerically.
