def LikelihoodRatioSignificance(LLnull, LLalt, ndof=1):
    """
    Test the significance given two fit results of different models to the SAME data assuming an approximate chi2 statistic.

    Parameters
    ----------
    LLnull: int
      value of log likelihood of null hypothesis data
    LLalt: int
      value of log likelihood of alt hypothesis data

    Returns
    -------
    int, p-value of probability of null hypothesis being true compared to alt hypothesis
      calculating 1 - cdf(d, 1), this is the p-value connected with correctness of the null hypothesis
      a small value of sf means that the probability of the null hypothesis being true compared to the alternative is small
      however, the p-value is not the probability itself!
      neither the one of null being false, nor the one of alt being true!

    Example
    --------
    >>> from scipy.stats import gaussian_kde
    >>> import numpy as np
    >>> from pyik.numpyext import multivariate_gaussian, LikelihoodRatioSignificance
    >>> m1 = [-0.9, -0.1, -0.0, 0.7, 1.3, 0.4, 0.6, -1.9, 0.2, -1.1]
    >>> m2 = [ 0.1, 0.7, -0.9, -0.1, -0.5, -0.7, -0.9, -0.2, -0.2, -0.5]
    >>> data = np.array([m1, m2])
    >>> kernel = gaussian_kde(data)
    >>> kde_values = kernel(data)
    >>> LLalt = np.sum(np.log(kde_values))
    >>>
    >>> cov = np.cov(data)
    >>> mu = np.mean(data, axis=1)
    >>> gauss = [0]*len(data[0])
    >>> data = data.T
    >>> for row in range(len(data)): gauss[row] = multivariate_gaussian(data[row], mu, cov)
    >>> LLnull = np.sum(np.log(gauss))
    >>> round(LikelihoodRatioSignificance(LLnull,LLalt), 4)
    0.15

    Authors
    -------
    Alexander Schulz
    """
    from scipy.stats import chi2
    d = 2 * LLalt - 2 * LLnull
    if d < 0:
        raise AssertionError(
            'The log-likelihood ratio is negative, you are probably doing it wrong :D!'
            )
    sf = chi2.sf(d, ndof)
    return sf
