Log-likelihood function of the noncentral t-distribution

376 Views Asked by At

I'm trying to find an analytical expression of the log-likelihood function of the noncentral t-distribution as described here: https://en.wikipedia.org/wiki/Noncentral_t-distribution.

It is implemented somehow i Python's SciPy stats module (https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.nct.html) but I can't seem to find any expression for the log-likelihood function in the source code.

Is there an analytical expression of the log-likelihood function for the noncentral t-distribution, and if so, can someone help me find it?

Thanks,

Kristofer

1

There are 1 best solutions below

3
On BEST ANSWER

The log-likelihood function is a function of the parameters that is based on the probability density function $f(x;\nu,\mu)$ where $x$ is replaced with data and one or more of the parameters ($\nu$ and $\mu$) are taken as independent variables.

So, the log-likelihood function for $N$ observations $\{x_i \}_{i=1}^N$ of a noncentrally Student-$t$ distributed random variable is

$$L(\mu, \nu) = \sum_{i=1}^N \log f(x_i; \nu, \mu)$$

In SciPy, there is a noncentrally Student-$t$ distributed random variable called scipy.stats.nct; you can access its probability density function using the pdf method.

One way to create the log-likelihood function (for one observation) would be to do something along the lines of

L = lambda mu, nu : nct.logpdf(x, mu, nu)

where x is an observation defined before.