Heart rate is one of the most informative data point that we can collect non-invasably. Heart rate reflects anxiety, stress, sleep quality, physical exercise, illness, ingestion of drugs and many other events that we might experience on a day-to-day basis. In this master thesis a use for heart rate data collected by smart watches is suggested - an online algorithm that can detect an abnormal heart rate behavior and raise an alert to the wearable device user. Creation of an effective online detection algorithm could be implemented into wearable devices and be used as a preventative measure to combat the rise of the heart diseases. The thesis exploits functional data analysis to smooth the point-wise measurements into functions for each 24 hour period. Using additional data of active calories burned, the heart rate data set is grouped into specific activity level clusters using functional expectation maximization algorithm. The results of clustering are cleaned of outliers using functional outlier detection by depth measures. Then the deepest functions are found for each group and L^2-distances are calculated between the deepest function and all the rest in the group. The 99.9% percentile value of each group is set as the threshold for alerting. The testing data set is then taken one day at a time, assigned to a particular group using the methodology described, then the L^2-distance between the day considered and its group's deepest function is calculated. If the calculated value exceeds 99.9% percentile value the day is registered as an outlier if not - it is added to the group and the statistics are recalculated before the end of iteration. The suggested algorithm reached the accuracy of 91.67% with the testing data set.