Disclosed is a method and system for compressing a dataset of a plurality of datasets captured from one or more sensors. The system may comprise a data filtering module for filtering the dataset from the plurality of datasets based on an occurrence of an event. A determination module for determining a quality of information (QoI) index associated the dataset. A comparison module for comparing the QoI index with a list of QoI indices stored in a lookup table in order to identify a target QoI index and compression parameters corresponding to the QoI index. A data compression module for inputting the compression parameters in a compression algorithm in order to compress the dataset for achieving the target QoI index for deriving statistical inference by performing analysis on the dataset.