Indoor air quality and thermal comfort play important roles in the productivity and health of the employees in an office space. Moreover, detecting the actual occupancy of the building contributes to the air quality of the indoor space and the increase of energy savings, through the adjustments made in the HVAC system based on this actual occupancy. Furthermore, detecting real-time occupancy can be realized with various virtual sensors such as: Electromagnetic Signals, CO2 or passive-infrared (PIR); each sensor presents several benefits and downsides. Therefore, the current research investigated mainly two aspects: indoor air quality and real-time occupancy sensors; and the correlation between these two. More specifically, indoor air quality is quantified in this research by CO2 emission, temperature and humidity levels. Patterns in two office spaces are predicted based on historical data, based on the month, weekday and time of the day. The accuracy of different sensors for occupancy detection is analyzed based on literature and the connection between occupancy and the indoor air quality parameters is assessed. For this purpose, descriptive analyses and the Bayesian Belief Network estimation are used, by generating scenarios that could help analyze the occupancy and indoor air quality patterns. The estimated network models show that the CO2 is dependent on the actual occupancy in the office space. The temperature depends on the CO2 emission and therefore on the occupancy, however the humidity is not influenced by any of the two.