Governments have been challenged to provide timely medical care to face the COVID-19 pandemic. Under this pandemic, the demand for pharmaceutical products has changed significantly. Some of these products are in high demand, while, for others, their demand falls sharply. These changes in the random demand patterns are connected with changes in the skewness (asymmetry) and kurtosis of their data distribution. Such changes are critical to determining optimal lots and inventory costs. The lot-size model helps to make decisions based on probabilistic demand when calculating the optimal costs of supply using two-stage stochastic programming. The objective of this study is to evaluate how the skewness and kurtosis of the distribution of demand data, collected through sensors, affect the modeling of inventories of hospital pharmacy products helpful to treat COVID-19. The use of stochastic programming allows us to obtain results under demand uncertainty that are closer to reality. We carry out a simulation study to evaluate the performance of our methodology under different demand scenarios with diverse degrees of skewness and kurtosis. A case study in the field of hospital pharmacy with sensor-related COVID-19 data is also provided. An algorithm that permits us to use sensors when submitting requests for supplying pharmaceutical products in the hospital treatment of COVID-19 is designed. We show that the coefficients of skewness and kurtosis impact the total costs of inventory that involve order, purchase, holding, and shortage. We conclude that the asymmetry and kurtosis of the demand statistical distribution do not seem to affect the first-stage lot-size decisions. However, demand patterns with high positive skewness are related to significant increases in expected inventories on hand and shortage, increasing the costs of second-stage decisions. Thus, demand distributions that are highly asymmetrical to the right and leptokurtic favor high total costs in probabilistic lot-size systems.