  Scalar-tensor gravity, exemplified by Brans-Dicke (BD) gravity, introduces
additional scalar polarization modes that contribute scalar radiation alongside
tensor modes. We conduct a comprehensive analysis of how gravitational wave
generation and propagation effects under Brans-Dicke gravity are encoded into
the astrophysical stochastic gravitational wave background (AGWB). We perform
end-to-end analyses of realistic populations of simulated coalescing binary
systems to generate AGWB mock data with third-generation gravitational wave
detectors and conducted a complete Bayesian analysis for the first time. We
find the uncertainties in the population properties of binary black holes (BBH)
significantly affect the ability to constrain BD gravity. Under the most
favorable conditions, the upper limit may suggest $\omega_{\rm BD} > 816$.
Furthermore, we explore the detectability of potential scalar backgrounds
arising from binary neutron star (BNS) mergers, setting upper limits on scalar
backgrounds expected to be two orders of magnitude lower than the total
background contributed by both BBH and BNS in one year of observational data.
We conclude that for ambiguous populations, employing waveform matching with
individual sources provides a more robust approach to constrain Brans-Dicke
gravity. However, the future detection of a potential scalar background within
the AGWB could provide significant support for gravity theories beyond General
Relativity.
