class_docstr: A class to compute confidence intervals and hypothesis tests involving
  mean, variance, kurtosis and skewness of a univariate random variable.
  
  Parameters
  ----------
  endog : 1darray
      Data to be analyzed
  
  Attributes
  ----------
  endog : 1darray
      Data to be analyzed
  
  nobs : float
      Number of observations
class_docstr_tok: ["A","class","to","compute","confidence","intervals","and","hypothesis","tests","involving","mean",",","variance",",","kurtosis","and","skewness","of","a","univariate","random","variable",".","Parameters","--","--","--","--","--","endog",":","1darray","Data","to","be","analyzed","Attributes","--","--","--","--","--","endog",":","1darray","Data","to","be","analyzed","nobs",":","float","Number","of","observations"]
docstr: Returns - 2 x log-likelihood ratio, p-value and weights
  for a hypothesis test of the mean.
  
  Parameters
  ----------
  mu0 : float
      Mean value to be tested
  
  return_weights : bool
      If return_weights is True the function returns
      the weights of the observations under the null hypothesis.
      Default is False
  
  Returns
  -------
  test_results : tuple
      The log-likelihood ratio and p-value of mu0
docstr_tok: ["Returns","-","2","x","log-likelihood","ratio",",","p-value","and","weights","for","a","hypothesis","test","of","the","mean",".","Parameters","--","--","--","--","--","mu0",":","float","Mean","value","to","be","tested","return_weights",":","bool","If","return_weights","is","True","the","function","returns","the","weights","of","the","observations","under","the","null","hypothesis",".","Default","is","False","Returns","--","--","--","-","test_results",":","tuple","The","log-likelihood","ratio","and","p-value","of","mu0"]
code: def test_mean(self, mu0, return_weights=False):
      """
      Returns - 2 x log-likelihood ratio, p-value and weights
      for a hypothesis test of the mean.
  
      Parameters
      ----------
      mu0 : float
          Mean value to be tested
  
      return_weights : bool
          If return_weights is True the function returns
          the weights of the observations under the null hypothesis.
          Default is False
  
      Returns
      -------
      test_results : tuple
          The log-likelihood ratio and p-value of mu0
      """
      self.mu0 = mu0
      endog = self.endog
      nobs = self.nobs
      eta_min = (1.0 - (1.0 / nobs)) / (self.mu0 - max(endog))
      eta_max = (1.0 - (1.0 / nobs)) / (self.mu0 - min(endog))
      eta_star = optimize.brentq(self._find_eta, eta_min, eta_max)
      new_weights = (
          (1.0 / nobs) * 1.0 / (1.0 + eta_star * (endog - self.mu0))
      )
      llr = -2 * np.sum(np.log(nobs * new_weights))
      if return_weights:
          return llr, chi2.sf(llr, 1), new_weights
      else:
          return llr, chi2.sf(llr, 1)
  
imports: import numpy
  from scipy import optimize
  from scipy.stats import chi2, skew, kurtosis
  from statsmodels.base.optimizer import _fit_newton
  import itertools
  from statsmodels.graphics import utils
label_desc: Use image node_id 2 for calling the DescStatUV obj's underlying member method code with example usage: obj.test_mean(mu0, return_weights) and returns: llr,  chi2,  new_weights, llr,  chi2