Examples described herein include defibrillators or other medical equipment that may employ hidden Markov models to classify cardiac rhythms in ECG signals. Hidden Markov models may additionally or instead be used to determine presence of a chest compression from the thoracic impedance signal. Classification of cardiac rhythms may be used to determine when to deliver a shock to a patient. Other applications are also described.