Stochasticity is becoming increasingly essential in traffic flow research, given its notable influence in several applications, such as real-time traffic management. To consider stochasticity in macroscopic traffic flow modeling, this paper introduces a stochastic Lighthill-Whitham-Richards (SLWR) model, which not only captures equilibrium values in steady-state conditions but also describes stochastic variabilities. The SLWR model follows a conservation law, in which the free-flow speed is randomized to represent heterogeneities of drivers. To more accurately reflect real-life traffic patterns, a nonlinear speed-density relationship is considered. For addressing this highly nonlinear problem, a dynamically bi-orthogonal (DyBO) method is coupled with the Taylor series expansion technique. The results of simulation experiments show that the SLWR model can effectively describe the evolution of stochastic dynamic traffic with temporal or geometric bottlenecks. Moreover, the DyBO solutions exhibit reasonable accuracy while significantly reducing computation costs compared with the Monte Carlo method.