During hydraulic fracturing, secondary fractures are created around hydraulic fractures and serve as important channels connecting the shale matrix and the hydraulic fractures. We developed an analytical model to simulate shale gas production from a multi-stage fractured horizontal well. The analytical model is based on the trilinear flow model, but it is free from the assumption that the length of secondary fractures is equal to the half-distance between hydraulic fractures. This analytical model captures the fundamental characteristics of a hydraulically fractured shale reservoir by incorporating transient gas flow in the matrix, secondary fractures, and hydraulic fractures. Because this model describes four linear flow systems (unstimulated reservoir volume, matrix in the stimulated reservoir volume, secondary fracture, and hydraulic fracture), it is called the quad-linear flow model. Production data from two shale gas wells were used to validate the model. Moreover, using the variance-based method and quasi-Monte Carlo simulation, we developed a stochastic framework to perform a probabilistic assessment of shale gas production. We also conducted a global sensitivity study with nine uncertainty parameters to identify important parameters and their interactions that affect well productivity. The results indicate that the existence of dense secondary fractures (the distance between secondary fractures is small) results in higher initial production rate and ultimate recovery, but a sharper decline in production rate. Increasing the length of the secondary fractures can more effectively enhance gas production in the presence of dense secondary fractures. Moreover, the benefits of dense secondary fractures are mostly limited to a high porosity shale reservoir.