# FxPaul

Math in finance or vice versa

## Hidden Markov Model for application store ratings

Hidden Markov model (HMM) is a statistical model in which the system is assumed to be a Markov process with hidden states. Those states can be recovered by outputs, observed sequences. In other words, it is possible to infer some probabilistic properties of the system by outputs.

As an off-topic, application stores usually give ranking to apps by user comments and rankings. The simplest way to derive an app rating is to calculate average or median, i.e. some statistical property based on rating samples. For average rating not being a robust statistics, its value is affected by outliers, for instance, by deviant rankings submitted by users. Thus a robust procedure might be used to improve ranking.

In fact we can apply HMM mechanics to infer real application rating by the most likely explanation of observed user rankings. Let’s see how to do that.

Written by fxpaul

November 2, 2011 at 17:10

Posted in thoughts

Tagged with , ,

## Maximum Likelihood Estimation of Stochastic Process Parameters

Maximum Likelihood estimation (MLE) is a method of parameter estimations of statistical model. The base idea is to establish joint density probability for observations and to maximize its value by model’s parameters. To say it differently, we are looking for the most probable explanation of observed data.

### Problem setup

Assume that we’re given a one-dimensional stochastic process:
$dS_t = \mu dt + \sigma dW_t$
where $\mu$ and $\sigma$ are some functions of arguments $\theta$.

We observe this process by measuring $\latex S_i(t_i)$ where $i=1..N$. For sake of simplicity assume that observations are equidistant in time, i.e. $\Delta t = t_{i-1} - t_i = const$.

So, let’s estimate parameters.

Written by fxpaul

November 2, 2011 at 08:00