We present a novel online unsupervised anomaly detection method for human activities. The proposed approach is based on one-class support vector machine (OCSVM) clustering, where the novelty detection SVM capabilities are used for the identification of anomalous activities. Particular attention is given to activity classification in absence of a priori information on the distribution of outliers. Activities are represented by variable-length event sequences, but the most commonly used kernels are defined on fixed-dimension spaces. To solve the problem, we develop a novel sequence-similarity kernel, the n-grams kernel. Our kernel is conceptually simple and efficient to compute and performs well in comparison with state-of-the-art methods for anomaly detection. Moreover, most SVM algorithms require large number of memory to store the kernel matrix, or repeated access to the training samples. This makes it infeasible for online anomaly detection. In this paper, we develop simple and computationally efficient online learning algorithms for anomaly detection.