Performance of a HRES (hybrid renewable energy system) is highly affected by changes in renewable resources and therefore interruptions of electricity supply may happen in such systems. In this paper, a method to determine the optimal size of HRES components is proposed, considering uncertainties in renewable resources. The method is based on CCP (chance-constrained programming) to handle the uncertainties in power produced by renewable resources. The design variables are wind turbine rotor swept area, PV (photovoltaic) panel area and number of batteries. The common approach in solving problems with CCP is based on assuming the uncertainties to follow Gaussian distribution. The analysis presented in this paper shows that this assumption may result in a conservative solution rather than an optimum. The analysis is based on comparing the results of the common approach with those obtained by using the proposed method. The performance of the proposed method in design of HRES is validated by using the Monte Carlo simulation approach. To obtain accurate results in Monte Carlo simulation, the wind speed and solar irradiance variations are modelled with known distributions as well as using time series analysis; and the best fit models are selected as the random generators in Monte Carlo simulation.